So, I took a break from the project. I left the project being able to spawn a player/npc but not able to see them on the course. I generated binaries of my server code and shared a copy with a client so that people could test out the code. Not much was implemented such as the shops.
Picking the project back up again a month or so ago again I made further progress. Now being able to not only spawn a player/npc I could see them on the course!
I started as I always do with a 0’d packet data. The first car in the game is an AE86 and of course 0.0 is black so seeing a black AE86 was expected. So I started working on the expected structure. The result was:
Now, to get them moving. The client uses 2 packets to move the opponents around the course. One packet just updates the arrow on the mini map 0x780, the other has more detailed information about the car’s position 0x700. NPC’s and Players spawned handle these packets differently. If the packet used to move the arrow is used with an NPC it will move to that way point and have their own AI. Now this means unfortunately all NPC’s movements are controlled by the server. Not only that, the NPC’s expect to be given their name and car data from the server. This I of course don’t have so I’ll have to work with previous TXR games for this data. I extracted the data from TXR3 so planning on using that. As SBOL doesn’t have Hondas, any rival team that had Hondas aren’t in the game.
Players I suspected were going to be an easier task as I could just relay the movement packets received from the client. And that turns out mostly true. Some values need altering and I need to construct a 0x780 packet as the client never sends these. Finally I can process other players in the game!
I made a video of my progress and uploaded to YouTube here: https://www.youtube.com/watch?v=MY4Fkc1C8Qw&t=2s