I'm one of the engine programmers at All Out Games (https://allout.game/), a multiplayer-first gaming UGC platform where creators can make and play games with their friends. For scripting we wanted our creators to be able to jump in and create game mechanics without having to think about networking. If a developer had to manually send packets to/from client/server to get things to happen then we have failed. It is particularly bad if you are using AI tools because they struggle to keep in mind what code is meant to run where (client, server, or both) and remembering to manually sync pieces of data when needed.
To this end, in our networking layer the server will automatically send binary diffs of its game state to all the clients every few frames; then clients would roll back their game state to the last "server-approved" game state, apply the diffs, then resimulate forward to get back to the future. The client never has to ask the server for permission, it can just do whatever action and if it turns out that action was invalid (maybe your character got stunned by another player and your client didn't know it yet) it would automatically be corrected on receipt of a game state update from the server. In delay-based netcode you would have to make every little feature be rollback/resimmable to get this behavior, but we just rollback/resim everything all the time so you don't have to think about it. The engine allocates one large block of memory from the OS for the game state and we have custom heap and arena allocators to divvy that chunk up.
The main requirement here is that the we have to be in control of the memory, and it has to be easily diffable. We can't be manually traversing trees of objects individually allocated from the OS, jumping through tons of pointers. In fact pointers are especially bad because of ASLR; the address space of the server differs from that of the client, so pointers have to be manually patched after applying game state diffs. We also want the language to be typesafe, and it has to be able to run interpreted because on iOS you aren't allowed to download code and run it (again, we are a UGC platform so downloading and running games is what we do) unless it is interpreted.
For these reasons, all the usual scripting languages are out of the running. Maybe there is one out there that satisfies our needs but I couldn't find one. So, I made a custom scripting language. There are tons of other cool things I was able to do because I was making the language for this specific use-case, and I'd like to go into those in a blog post or something in the future.
If you want to try it out visit https://allout.game/create and use code `KHNGJP` to download the All Out Editor. We can also add you to the #game-devs channel in our Discord (https://discord.gg/QCFVZP99) where you can have direct access to the team and other creators, DM me (shwa) for access.
loading...