TSO-SE Discussion Thread

Discussion in 'Other TSO related projects' started by Blayer98, Jul 29, 2014.

  1. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    25 is a really unusual number... I've been lead to believe that the real value is 20/21 specifically by this function in onlinejobsglobals:
    ...though from videos of the restaurant show the clock driven by this going a little fast? I'm not sure. What I'm asking is, where did you find the value for this tick rate, and is it definite?

    Actions may not be scheduled to perform on fine tuned ticks, they may just be queued up and then sent in bulk between the server tick packets and then simply be buffered into a queue in the order they were sent then recieved over the tcp stream (eg. run 5 ticks, queue interaction # onto callee object # from caller object #). FreeSO works slightly different from this by instead sending command lists with every tick... but it's the same idea deep down.

    The gradual change in simulation speed is interesting, and is probably just there so that the illusion isn't shattered by the state suddenly jumping forward to where it's meant to be. You'll notice that our setup is incredibly stuttery on connections that are less than perfect right now.. This is because we're only buffering 2 ticks maximum at all times and just jumping forward to the latest if >2x the buffer size is queued. In future this is probably going to dynamically adjust by each client to tailor to connection quality, and something like a gradual change would probably help it not look terrible too.

    I don't think it deliberately buffers ticks after you recieve them - it probably just adds them to a queue immediately and tries to run through it, maybe slowing down as it gets closer to the end.
    Blayer98 likes this.
  2. Blayer98

    Blayer98 Active Member

    I seriously doubt the server would spam the client with a packet so many times and have it try to respond with another packet on top of that.
  3. Fatbag

    Fatbag Member

    You haven't been using the "sim_speed 25" cheat for Pre-Alpha NoNetwork mode, have you? :p http://forum.afr0games.com/index.php?threads/pre-alpha-hype-thread.246/page-2

    In Pre-Alpha, the sim_speed cheat defaults at 21. In Pre-Alpha -NoNetwork mode, before running the sim_speed cheat, I verified that my patch is increasing simulate_until by 21 per second: I paused inside the hook code, wrote down the initial value of the simulate_until variable and noted the current time, pressed F9, and pressed F2 to break inside the hook code again after exactly 1 minute (using time.gov). The result was: It started at 0x5e60 and ended at 0x634a. 634a-5e60 = 4EA ticks or 1258 ticks in one minute or 20.967 ticks in one second. So it is increasing simulate_until by 21 per second. However, the sprite animations, the character animations, and the time at the bottom of the screen all run too slowly until you run "sim_speed 25", at which point simulate_until increases by 25 per second.

    In Play Test RP -NoNetwork mode, the situation was the same, but you need to modify TSOServiceClientD.dll in order to change the sim_speed variable, since you do not have access to cheats.

    So it seems like simulate_until should increase by 25 per second.

    However, in naitrial online mode, sending kServerTickConfirmationMsg with simulate_until=7*60*5*25= 52500= 0xCD14 causes the game to simulate from 12:01am to 8:14am (shown in the above screenshot), and simulate_until=7*60*5*21= 44100= 0xac44 causes the game to simulate from 12:01am to 6:56am, which is much closer to the target of 7:01am. I have also confirmed that, inside ClientIdle, dword [esi+0x108] is exactly the value that I specified in the packet: 0xac44.

    So it seems that there is something different in -NoNetwork mode, or in Pre-Alpha or Play Test RP, or a combination thereof, where sim_speed needs to be changed from the "normal value" of 21 to 25 to run at the correct speed; but in naitrial online mode, the value should be 21.
    LetsRaceBwoi likes this.
  4. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    So 21 is definitely the correct speed online? Seems a little unusual that this would work differently in -nonetwork, but I suppose the mode technically isn't meant to function in most versions of the game anyways.
  5. LetsRaceBwoi

    LetsRaceBwoi Well-Known Member

    It could have been to speed things up so that the devs could test things quicker but I really don't see how it would...
    Blayer98 likes this.
  6. yoyo

    yoyo Active Member

    Maybe it was just an oversight, they probably forgot to change it once they started working on the online version.
    Blayer98, zc456 and LetsRaceBwoi like this.
  7. xXJDrocks450Xx

    xXJDrocks450Xx Well-Known Member

    I set up TSO-SE and I got flooded with nostalgia. Thanks for that! ;)
  8. -BloodFighter-

    -BloodFighter- Active Member

    How do you actually set up TSO-SE in the first place?
  9. Blayer98

    Blayer98 Active Member

    We've FINALLY got the patcher back up now! :3 And this time, it works. :3
    Below are screenshots and gifs. :3 (There's quite a few...)
  10. zc456

    zc456 Well-Known Member

  11. Amy

    Amy Member

    OMG!!!!!!!! THIS IS AWESOME!
  12. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Nice work! Have you managed to send custom updates yet? Ideas on how far that can be stretched?
    pisarz1958, Marvin732 and zc456 like this.
  13. Marvin732

    Marvin732 Active Member

    Yeah nice ! New Progress for NIOTSO :D
  14. Fatbag

    Fatbag Member

    The updater uses the Marimba Castanet protocol.

    Our server just says "Yep, you are running the latest version" unconditionally (regardless of which version of TSO you have and whether all your files are corrupt) so that the client proceeds to the game. From the server, we literally just send 11 bytes to the client: ca fe be ef 00 00 00 00 00 00 03.

    We did this extremely quickly thanks to the fact that there's still a Marimba Castanet transmitter running to date (http://trans.marimba.com/) and due to the fact that the Marimba Castanet protocol hasn't changed since 1997. You can try it out yourself: Back up your TSOPatch folder, and modify Buddy/Buddy.ini and TempBuddy/Buddy.ini and set PatchZero=http://trans.marimba.com/channelstore in both files and run the updater; the updater will ask you to download 20.9 MB to sync with Marimba's Channel Store repository. If you apply the update, the updater replaces itself with the Channel Store (although the TempBuddy folder isn't changed, for some reason). Then when you re-run the updater, it will say it's up-to-date, and using Wireshark, you'll see that the packet the transmitter sends to the client in the up-to-date case is those 11 bytes.

    We only figured out enough of the protocol to tell the client that it's up to date. We don't know how to distribute updates yet. But we found some helpful documents explaining the protocol (or the technology) somewhat:
    System and method for updating devices using limited amounts of random access memory
    Java Beyond the Browser: The Channel Metaphor
    Official Marimba Guide to Castanet

    Interestingly, my uni has a hard copy of "Official Marimba Guide to Castanet" including the CD-ROM (which includes a trial version of the Castanet Transmitter server) in the library:


    When I get back to school on Monday, I'll grab it and upload it. (Personally I'm not that interested in distributing updates through the patcher, but maybe somebody else is.)
  15. francot514

    francot514 Well-Known Member

    Good work, whos Laura Lemay?? Whats next for NIOTSO?
  16. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    The author of that book.
  17. Blayer98

    Blayer98 Active Member

    We're still figuring out how to create an object, although we're able to delete an object from the lot. (I'm not sure if we've talked about this already?)
    Fatbag will provide screenshots once we get around to writing this part up lol. :p
  18. francot514

    francot514 Well-Known Member

    So bad this is still taking some time, is one of the most importants features to allow people do play testing with NIOTSO.
  19. Blayer98

    Blayer98 Active Member

    Hello, quick OMG update, I've just randomly got Build Mode on the lot for some reason, not sure why, but it have it on!! 0.0


    I have more screenshots, I'll upload them later, right now, OMFGGGGG
    Last edited: Jan 15, 2016
  20. Blayer98

    Blayer98 Active Member

Share This Page