[ARCHIVE] SimAntics & World Development

Status
Not open for further replies.
The height is not at object property data?? I think there are only three heights values: floor, onto object and onto wall...
There are quite a few height settings... The Object Data field Allowed Height Flags defines which heights are valid for placement, including floor (bit 1). Each bit corresponds to its bit number as a height in the target slot.
 
RHYS COULD YOU LEAVE SIMANTICS IN THIS UNFINISHED STATE AND TAKE CARE OF THINGS THAT ACTUALLY MATTER TO THE GAMEPLAY, LIKE CURSORS? -_-
Booth are important, wich cursors are you meaning, the windows cursor for mouse in game, or the game cursors, that are objects and work also with the sims antics...

Each bit corresponds to its bit number as a height in the target slot.
Ok, thats parts of slots fixing then...
 
Ok i missed that was sarcasm, but anyway having cursors will not so bad, but will be better if sims antics is complete...
 
Okay, so different types of table have a different "height", though it looks like this height's value does not directly relate to the height the contained object should be displayed at. It's probably more like a lookup table, with the options for end table, table and counter obviously preset to the same height:

d81ef6d78e62436e6b6a700c6fa6f950.gif

(here's the current setup which guesses the height from the height number. only really accurate for counters)

Another weird thing, you can place counter objects on this table? Not sure why that is.
upload_2015-7-6_2-21-52.png
 
Okay, false alarm. Looks like the table only works like a counter because it's the job lot version of that specific table. Not sure why they switched it like that...
upload_2015-7-6_13-46-43.png
(the table on the left is the normal version, the one on the right is the job lot version, with counter height)
 
Server had been restarted due to an update or something. When I rebooted the software, it seems like the city server immediately got the lot information packet, but it crashed when processing it. So if I can fix the crash, all that's left to do is debug the lot buy packet :)
 
Hey Rhys, great work! If you wrote documentation on the translation between mouse coordinates and world coordinates, I would read it, so I could appreciate what was done in order to get this to work.

> All heights now have assigned heights, including the only-used-like-once height "low-table":

Where did you get the assigned heights?
 
So epic progress have you made with the heighs values, now counter should work great, but those can be used in any table object??

Rhys said:
It was a download for the sims 1, not sure if it was available for normal purchase in TSO?
http://sims.wikia.com/wiki/McDonald's_Food_Kiosk

Are you using EA Land to do this test???

Fatbag said:
Where did you get the assigned heights?
Those should be located in objects data or slots?? did not Rhys??
 
Hey Rhys, great work! If you wrote documentation on the translation between mouse coordinates and world coordinates, I would read it, so I could appreciate what was done in order to get this to work.
This is probably like, the thing that least needs documentation. It's actually kinda hacky right now actually though, since our world rendering is this horrible 2d/3d hybrid monster, but it makes sense:
Code:
        public Vector2 GetTileFromScreen(Vector2 pos) //gets floor tile at a screen position w/o scroll
        {
            Vector2 result = new Vector2();
            switch (State.Rotation)
            {
                case WorldRotation.TopLeft:
                    result.Y = (pos.Y / TilePxHeightHalf - pos.X / TilePxWidthHalf) / 2;
                    result.X = result.Y + pos.X / TilePxWidthHalf;
                    break;
                case WorldRotation.TopRight:
                    result.Y = (- pos.Y / TilePxHeightHalf - pos.X / TilePxWidthHalf) / 2;
                    result.X = -result.Y - pos.X / TilePxWidthHalf;
                    break;
                case WorldRotation.BottomRight:
                    result.Y = (-pos.Y / TilePxHeightHalf + pos.X / TilePxWidthHalf) / 2;
                    result.X = result.Y - pos.X / TilePxWidthHalf;
                    break;
                case WorldRotation.BottomLeft:
                    result.Y = (pos.Y / TilePxHeightHalf + pos.X / TilePxWidthHalf) / 2;
                    result.X = pos.X / TilePxWidthHalf - result.Y;
                    break;
            }
            return result;
        }
The game assumes that you are mousing over a ground tile for placing objects, similar to how the real game works, but different in that table placed objects actually offset this down a little bit. This will be fixed soon.

Object clicking is handled by a special render target that contains object ids z-sorted as normal. The original game does not do this... It instead uses z sorted bounding boxes, but that will be easy enough to switch to if it becomes important.

> All heights now have assigned heights, including the only-used-like-once height "low-table":

Where did you get the assigned heights?
Made them up. Table/counter/end table are exactly 4/5 tiles high, small table is 1/2 tile high, chair slot is 7/5 (don't even ask, the old guesstimate divided the SLOT Height by 5 and it just so happened that it worked for counters (4) and chairs (7)).
 
Status
Not open for further replies.
Back
Top