Game Logic
Posted: 20 Apr 2006, 05:58
Hello 
First, thx for all the help thusfar, the way u guys assist developers is just great!
Now, I read in the documentation and tutorials that it is best for performance to put the game logic in the zone extension.
Now i came to the point i am going to write the game logic but i cant figure out how to put it in the zone extension instead of the room extension.
I am making a game where the server moves the players around, the players can only define their speed. The zone extension creates dynamic rooms for upcomming games (a game starts every x minutes), clients that have subscribed to that game can join the game, this is all done in the zone extension..
The room extension gets the settings for the game from te database and sents the game data to the clients. Logically i would put the movement and collision detection (all that stuff) in the room extension.. but as i read, for every room an instance of the extension is made, so performance wise it would be ideal to have only once function handling collision detection instead of 5 (if there are 5 rooms)..
The problem is that i cant figure out how the communication between the zone and the room extension would work and how i'm gonna use the game logic for every room if i put it in the zone extension..
Can u please give me some advice?
First, thx for all the help thusfar, the way u guys assist developers is just great!
Now, I read in the documentation and tutorials that it is best for performance to put the game logic in the zone extension.
Now i came to the point i am going to write the game logic but i cant figure out how to put it in the zone extension instead of the room extension.
I am making a game where the server moves the players around, the players can only define their speed. The zone extension creates dynamic rooms for upcomming games (a game starts every x minutes), clients that have subscribed to that game can join the game, this is all done in the zone extension..
The room extension gets the settings for the game from te database and sents the game data to the clients. Logically i would put the movement and collision detection (all that stuff) in the room extension.. but as i read, for every room an instance of the extension is made, so performance wise it would be ideal to have only once function handling collision detection instead of 5 (if there are 5 rooms)..
The problem is that i cant figure out how the communication between the zone and the room extension would work and how i'm gonna use the game logic for every room if i put it in the zone extension..
Can u please give me some advice?