I'm trying to create a multiplayer game where,
- For every 2 players, the server will create 1 room (my game is PvP, one vs one)
- Each room handle the game logic
- I will use
Java.Util.Timer
as my game loop - Server FPS = 5
- Each room will handle player movement and little physics
On to the actual question:
What kind of game loop should I use based on the points below? What are the pros or cons of each type of game loop below.
- Each room will have their own game loop ( timer )
- All rooms handled in a single game loop ( timer )
- All room handled in a single game loop, but when the total room count = 50, the server will create another new game loop.
EDIT
What I tried so far:
I used the game loop in point 1, But some rooms don't have a chance to update their game loop. I'm confused about whether I need to change my game loop or if I need to change my code in each loop or if the issues is because Java.Util.Timer
.