[ARCHIVE] SimAntics & World Development

Status
Not open for further replies.
Noticed a pattern with "footprint extension" - the value seems to be 4 offsets of up to 16:

enter from back: 0x0006
enter from left: 0x6000
enter from right: 0x0060
enter from front: 0x0000

I'm not sure how it affects anything though. Chairs seem to use "snap to sitting and flip" for the final direction adjustment, which has only the flag "snap to direction". From the logic I've worked out so far, having no search directions places the result position directly on top of the chair, but the slot also specifies that it should be "Facing towards object", which it can't possibly as it's on top of it.
 
Rhys, in yourJavascript city renderer, did you use the flags for lot costs?

Pizsars and francot: Yes, I'm slowly working my way towards lot purchasing. But keep in mind that in order to make players see each other and interact with objects, we'll have to run a distributed SimAntics.
And that could take month(s), because we've only theorized how to do it so far. SimAntics isn't even finished yet, and until it is I'll work on async lot loading when zooming and bringing back the information panel when hovering over a lot. And lot purchasing. But there are some issues: which algorithm is used to calculate the cost of a lot?? And how much money does a player start out with?
I need to store money in the DB as well.
 
And lot purchasing. But there are some issues: which algorithm is used to calculate the cost of a lot?? And how much money does a player start out with?
Every new Sim starts out with the normal 20k, last I remember. All I know regarding lot prices is that the closer you are to the beach, the higher the cost. Not sure if the same applies to mountains.
 
Sigh, I'm going to have to add money to characters either way, I might as well add cost to the house Table.
Aidan: That's great, things just got complicated. City renderer currently has no Notion of distance to sea, and to figure it out we'll have to look at... hardcoding it? o_O
Either that, or provide the server with the map data and figure out how to calculate it based on tile types...
 
Dat pathfinding :D
I love it when he just goes through the sofa to sit on it. And sound gettin' all messed up in the middle of video. What happened with that fridge though? It's like if he remotely got food from it - I want that at my home. :D And that moment when you're trying to make him eat something and he just goes to the bathroom in - "IM NOT HUNGRY, GRANDMA" way xD

On the other hand, you did a hell of a job just in last couple of days. Keep it up~! ^^
 
Last edited:
Fucking damnit!
Code:
public LotTileEntry[] LotTileData; //the renderer requests this on entry, so it must be populated before initilizing the CityRenderer!

Seems my original plan of sending housedata along with player information (which would have been the sane thing to do) just went down the drain. Looks like I'm going to have to make the client specifically request this data in a big, huge packet as part of the city login process. Sigh...
 
Sigh, I'm going to have to add money to characters either way, I might as well add cost to the house Table.
Aidan: That's great, things just got complicated. City renderer currently has no Notion of distance to sea, and to figure it out we'll have to look at... hardcoding it? o_O
Either that, or provide the server with the map data and figure out how to calculate it based on tile types...
I'm assuming it was hard coded into the client and then the purchase was passed to the server.
 
Last edited:
I love the endless sighs of relief.
For some reason the sounds for the fireplace have been set to loop - despite that making no sense at all.

Rhys, in yourJavascript city renderer, did you use the flags for lot costs?
The idea is that more detailed lot information is requested from the server when the lots are hovered over. This will prevent cities with 500+ houses sending a huge collection of data including all their names, net worths, descriptions etc. This includes lot costs, which should be generated once by the server (so they are a fixed price) and sent to clients on request. Take a look at some videos to get an idea of the costs of various lot types - I don't think it's as complicated as a "distance to the sea", just things like how many sides of the lot have water on them, the lot type (sand > grass > dirt?) and a random modifier. I made a post about this a while back - I think I might have worked out some values? Can't really remember.

Just a reminder that the lot table should only include the metadata used by the map - the actual lot will be stored in a .pdlot file (tbd, maybe directory should be /lots/(id).pdlot and /lots/(id)_big.png + /lots/(id)_sml.png for lot images) and loaded into a simulation server instance on request. Eventually avatars should also hold a copy of their Person Data attributes which are sent to lots when they attempt to log in - but that's a problem for another time.

The lot id, if they are online/spotlight and position etc WILL be sent when logging into the server though, as that is required to display the city's state correctly.

What happened with that fridge though? It's like if he remotely got food from it - I want that at my home. :D And that moment when you're trying to make him eat something and he just goes to the bathroom in - "IM NOT HUNGRY, GRANDMA" way xD
There's a bug with routing to objects outside that makes the sim skip walking to the object for some reason. I think it might have occurred indoors once or twice, but I can't really remember. It's worth investigating.

I'm not sure why the sim only takes one bite out of the food before washing the plate - I'll need to debug that.
 
For now we'll be going with a simple A* path find, that will check only the 4 horizontal adjacent tiles for each tile. However, the original game allows the sims to move freely diagonally (not even just 45 degrees!), which definitely looks a lot cleaner. We should be able to optimize the final route by testing subsets of the route with Bresenham's (or some other) line algorithm, meaning that we try to cut waypoints out by determining if the path between them is possible/shorter. Here's an illustration:

routeOpt.gif

The actual optimization might be a lot more complicated than this. The idea is that it's faster than checking all possible routes to all possible tiles for each step in the routing during the A*, and is still "okay", in that it looks nice but obviously is not the optimal route.

A problem here might be checking the line against walls for collisions. The A* path find is the goal for now though.
 
What about detecting if player is indoors or outside, if outside - handle the whole place as an obstacle and then recalculate the way when you're inside and when you're indoors, the other way around?
 
Yes, I'm slowly working my way towards lot purchasing. But keep in mind that in order to make players see each other and interact with objects, we'll have to run a distributed SimAntics.

Lot purchasing?? what will be the house lot avaliables?? and you will use blueprint for those??

distributed SimAntics?? what that means??
 
Lot purchasing?? what will be the house lot avaliables?? and you will use blueprint for those??
The blueprints are used for job lots. Purchasable lots in The Sims Online are purchased by finding empty land. In EA-Land, a deed system was created to make buying and selling your own lot easier. Before that, the first roommate on the left would become the next owner, if the previous owner left. If all roommates and owners were gone, expect you, you become the owner.
 
Last edited:
The Sims considers any room that isnt the current one (including pools, which are rooms by the way) an obstscle, and you can't traverse tile borders where a wall is in the way. These can actually be turned off by objects like doors using a flag in the routing SLOT.
 
screenshot_86212.jpg screenshot_86213.jpg
This might help give an idea on lot price range. Left is the actual price on grass land, right is the size of the land based on the price. All land purchased starts out small and needs to be upgraded.
 
Last edited:
The Sims considers any room that isnt the current one (including pools, which are rooms by the way) an obstscle, and you can't traverse tile borders where a wall is in the way. These can actually be turned off by objects like doors using a flag in the routing SLOT.

Rhys, please answer me message about slots, need some directions.

This might help give an idea on lot price range. Left is the actual price on grass land, right is the size of the land based on the price. All land purchased starts out small and needs to be upgraded.

How do you get those images...
And where is stored the data for the lot houses??
 
View attachment 392 View attachment 393
This might help give an idea on lot price range. Left is the actual price on grass land, right is the size of the land based on the price. All land purchased starts out small and needs to be upgraded.

For now I set all lots to have a default value of 2000 simoleons in the DB (simoleons isn't defined though, so technically it could be dollars, cents, yen, euro, rubles, anything really) for now. I think if the server is supposed to calculate the price of lots it would have to happen on startup.
 
Status
Not open for further replies.
Back
Top