SimAntics & World Development (archive)

Discussion in 'Development News' started by RHY3756547, Feb 16, 2014.

Thread Status:
Not open for further replies.
  1. Marvin732

    Marvin732 Active Member

    Simantics Is Important !
  2. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    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.
  3. francot514

    francot514 Well-Known Member

    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...

    Ok, thats parts of slots fixing then...
  4. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Guys, it was obviously sarcasm...
    pisarz1958 likes this.
  5. LetsRaceBwoi

    LetsRaceBwoi Well-Known Member

    I know. He put it in caps and added a "-_-" at the end, couldn't make it more obvious.
    pisarz1958 likes this.
  6. francot514

    francot514 Well-Known Member

    Ok i missed that was sarcasm, but anyway having cursors will not so bad, but will be better if sims antics is complete...
  7. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    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:

    [​IMG]
    (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
    yoyo, Fatbag, Tirea and 3 others like this.
  8. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    upload_2015-7-6_2-23-35.png
    *water falls straight through the table onto the priceless rug*
  9. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    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)
    yoyo, Fatbag, Tirea and 1 other person like this.
  10. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    All heights now have assigned heights, including the only-used-like-once height "low-table":
    upload_2015-7-6_14-25-54.png
    It's probably worth mentioning that the computer object works now:
    upload_2015-7-6_14-27-30.png
    RainCloud, pisarz1958, yoyo and 5 others like this.
  11. LetsRaceBwoi

    LetsRaceBwoi Well-Known Member

    What's with the McDonalds? I don't remember seeing that...
    Marvin732 likes this.
  12. Afr0

    Afr0 Well-Known Member

    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 :)
    RainCloud, Marvin732 and LetsRaceBwoi like this.
  13. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

  14. LetsRaceBwoi

    LetsRaceBwoi Well-Known Member

  15. Fatbag

    Fatbag Member

    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?
    LetsRaceBwoi likes this.
  16. francot514

    francot514 Well-Known Member

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

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

    Those should be located in objects data or slots?? did not Rhys??
    LetsRaceBwoi likes this.
  17. LetsRaceBwoi

    LetsRaceBwoi Well-Known Member

    No, the McDonald's Food Kiosk was added early TSO, probably N&I.

    @Fatbag just so you know, the reply button embeds a quote for you so you don't need to use those reddit-style markups. Just a heads up :p
  18. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    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.

    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)).
    pisarz1958 and Fatbag like this.
  19. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    The game now reports errors in mostly the same way as the original. The object also only autorotates if it requires a wall on a side and it doesn't have that wall.
    upload_2015-7-7_16-24-23.png upload_2015-7-7_16-24-43.png upload_2015-7-7_16-25-4.png upload_2015-7-7_16-29-37.png upload_2015-7-7_16-30-14.png upload_2015-7-7_16-30-34.png upload_2015-7-7_16-31-43.png
    RainCloud, pisarz1958, yoyo and 5 others like this.
  20. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Walls can now be marked as used...
    upload_2015-7-7_17-17-16.png
    RainCloud, pisarz1958, yoyo and 4 others like this.
Thread Status:
Not open for further replies.

Share This Page