SimAntics & World Development (archive)

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

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

    francot514 Well-Known Member

    Ok, thats sound good, also i have tested some Ea land objects, partially working except those that still need npcs..

    Attached Files:

    Tori Sim and yoyo like this.
  2. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    That's a multiplayer job object, those will need to be coded separately from all the normal simantics stuff (at least, the ui+inputs will need to be)
  3. Fatbag

    Fatbag Member

    At first I thought you meant that when you move the Hand Tool over a tile on the ground, if a surface object exists on that tile, then the game will shift the sprite of the object you're placing away from your true mouse coordinates up onto the surface. If the user is moving an object from one surface onto another of equal height, then he can't tell that his mouse coordinates have been shifted up.

    However, I checked this behavior ingame, and that wasn't the case. So when you said "table placed objects actually offset this down a little bit", you meant that they offset the range of screen coordinates for which the object will be placed on that counter upwards away from the ground. (And of course, the sprite of the object will be shifted upwards onto the counter).

    So when the user switches to the Hand Tool, you could create the mapping "The screen coordinate (x,y) corresponds to this object (or the ground) at tile (u,v) with z-order distance 'z'" for all (x,y), and then iterate over each of these mappings from farthest z-order distance to nearest; if the object at that coordinate (x,y) is a surface object, you create the new mapping "Screen coordinate (x,y+height) gets mapped to the surface of the surface object on tile (u,v) with z-order distance 'z'" (overwriting the old mapping).

    However, since TSO lets you place new objects without pausing the game time, you would have to update the mappings after each SimAntics tick.
    Last edited: Jul 8, 2015
  4. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Working on the query panel now. Should be easy enough to populate with the relevant information:
    upload_2015-7-8_15-13-2.png
    One definite future problem will be rendering object thumbnails, which is needed both here and for object dialogs.

    Are you talking about using the hand tool for picking objects up? That's just performed by rendering the objects with an Object ID buffer instead of colour/depth, and getting the id at the pixel clicked. It's hilariously inefficient right now though (draws all objects every tick in update... ugh), and will be worked a bit more into the static buffers system once I clean that all up, so that it's simply rendered at the same time as the colour/depth buffers using multiple render targets for minimum cost.
  5. Fatbag

    Fatbag Member

    I was referring to placing (old or new) objects down on a new "tile" (or a new surface object).

    Of course, you pick an object up just by clicking on it. To know what the user is clicking on, of course you just refer to the screen z-buffer to see what object is nearest to the camera at that point.
  6. Fatbag

    Fatbag Member

    But again, just tell me if I'm wrong about anything. :p
  7. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    upload_2015-7-8_17-4-59.png
    Everything pretty much working like a charm (even with fade tween!), with a few things left to tie together + object thumbnails on the left.

    I had another look at the behaviour in the real game and the anchor position seems to change depending on where you picked it up from. I don't think there's anything fancy going on, just a hittest with the ground with an offset. Try picking up a big object like a fridge from multiple spots (top and bottom), and you'll see what I mean. I'll try and implement this for the next release.
    Tori Sim, pisarz1958, yoyo and 2 others like this.
  8. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Awnings are causing an interesting reaction. I have no idea what's causing this.
    upload_2015-7-8_19-9-25.png
  9. francot514

    francot514 Well-Known Member

    Good work, now i think you should check for some objects that has not catalog image, or maybe those are logical objects that you are not able to buy??

    Why this is going to be a future problem, you cna use oject sprite for rendering the thumbnails...
  10. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    It's not that simple. I need to render a drawgroup into a render target, and I need to calculate the total containing bounds of all the sprites before drawing it. Our draw code isn't exactly simple either.
  11. francot514

    francot514 Well-Known Member

    Yes, youre right, it uses Drawgroup, seems the one from OBJD, Base Graphics Id, i have removed that and no object thumbnail showed in catalog description (TSO Pre Alpha)
  12. yoyo

    yoyo Active Member

    Wow! all this progress is giving me chill down my spine! Can't wait to see more, this is great :D !
    Marvin732 likes this.
  13. pisarz1958

    pisarz1958 Administrator Staff Member Moderator

    That's one of the things I missed a lot. HELL YEAH~!

    I'd like to be able to remove the objects that are already there though. I guess this is something you'll be working on when the rest of the build mode works great. You still need to lock out moving used objects and make it impossible to place an object on a tile where another Sim is standing. That build is really good of course.

    Btw. I didn't expect this to work:
    [​IMG]
    Last edited: Jul 9, 2015
    Tori Sim likes this.
  14. Afr0

    Afr0 Well-Known Member

    That is completely untested. Please don't click yes!
    Rhys: awnings are from original game/expansions, right? I nearly facepalmed when I saw that, because it was screaming to me "another random IFF field change". That's where I'd look if I were you.
  15. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    A lot of things are from the original game/expansions and they all work fine. The problem here is likely a simantics bug.
  16. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Shift key to duplicate now works. Now you can place as many plants/fridges/whatever as you like! ;)
    [​IMG]
    Specific Info page is available when you pick up existing objects, but it looks like it's missing something (apart from the wear bar). Does anyone have any screenshots?
    [​IMG]
    yoyo, Marvin732 and AquilaSim like this.
  17. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Might be a problem with those images thanks to Gyazo totally losing it. Right click on them and click "open image in new tab" to see them.
  18. Marvin732

    Marvin732 Active Member

    Looks Really Nice ^^
  19. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    upload_2015-7-9_17-45-5.png
    Started working on thumbnails. Small problem here...
  20. -BloodFighter-

    -BloodFighter- Active Member

    Nice progress Keep up the good work ;)
    LetsRaceBwoi likes this.
Thread Status:
Not open for further replies.

Share This Page