As I can see there are several monkeys playing with sim-eth-es. I currently try to implement the game cycle. In my case (my first game mode) it will be a time limited dead match mode.
The hook of the game seems the GameServer.class and the hosting part is then GameSessionHostedService.java which also do have the list of all player entities (not equal to ship entities). I now would like to have a joinGame functionality for the first 30 seconds, after that point you can not join the game and you have to wait. And then I would have a endGame functionality after for example 5 minutes. The endGame should reset all counters and reset the old ship and place it in the start area gain for the next round.
Now my question, where should this “game” mode class take place? I currently did add a resetSession method to the GameSessionImpl class. But where and how do I observe those time slices (joinGame, endGame)? In the GameSessionHostedSevice? This does not have an update loop, so maybe I need a own game state with an update loop, but how does this have access to the player session? Via GameSessionHostedService maybe (I guess but a bit unsure).
EDIT: Some more ideas The GameSessionHostedService do have method “startJoiningState”, “stopJoiningState”, “endGameState”. So the game system only needs to call this in his update loop at the given time. But still unsure
Hints, are welcome…