Hi everyone,
I woud like to develop a 2d game where the player can set up a team of fighters that will automatically fight against other players' teams in rounds. Rounds can last around 20-30 seconds. Physics are really simple (probabily just a bunch of area2D checks and bullets movement).
Rounds are played in the players' clients (no socket connections, just a simulation of team vs team), but I would like to simulate the expected round outcome at maximum speed on the server (using the Linux server build) to check for the correctness of the results.
I do not want to wait for the round to complete at normal speed on the server, I just want to simulate it as fast as possible.
First, I planned to use a simple method of linking game speed to fps on the server build then running the server at max fps it can handle, but discovered server builds are locked around 144-145 fps maximum. Got some informations here: https://github.com/godotengine/godot/issues/32404
Tested it and found it was true, so I had to abandon this route.
Second, I thought about changing the game time scale on the server (Engine.time_scale) but sadly I discovered that changing the time scale also changes the physics' behavior (I tested it with a simple bouncing ball on a static floor: for example, at higher time scales the ball passes through the floor, or skyrockets into space). This could lead to having the server simulation being different from the players simulation.
My last route is to write a simulation logic myself without using Godot physics, but I would have a very bad time playing it on player clients afterwards.
How would you do this? Is there something am I missing or did not think about?
Thank you!