The idea of the game is to allow all user to input their moves for 20 
seconds. Every 20 seconds the server will gather all the moves made by all 
players in a game and calculate the new situation for all the players at 
the same time.

The server must receive the various input and then, when the 20 second 
timeout expires, it paas all these info to the game engine for the move 
results.

Nicola.


Il giorno martedì 18 settembre 2012 22:03:02 UTC+2, Ruben Rodriguez II 
(cha0s) ha scritto:
>
> This is just my opinion, and you haven't really said much about the 
> architecture, but it seems odd to me to have a hybrid 
> polling/event-based engine. Why can't you update the state incrementally 
> as you receive events and get rid of the incremental sweeping updates 
> altogether? 
>
> To answer your question, I'm imagining you'd want to inherit 
> EventEmitter and emit an event, perhaps in a setInterval callback? 
>
> On 09/18/2012 12:11 PM, Nicola Lepetit wrote: 
> > Hi, 
> > I'd like to create a multi room gaming system that must be able to: 
> > 1. gather all the input from all users in all rooms 
> > 2. Once every ## seconds, analyze all the input gathered and update 
> > the game situation, room by room. 
> > 
> > I already have a room system and the game logic is simple (i.e. not 
> > important now). 
> > 
> > Question is: How do I setup a recurring event on the server that 
> > manage all the input gathered in the last ## seconds ? Should I use a 
> > mongo DB or similar to store data or keep everything in memory ? 
> > 
> > Thanks, 
> > Nicola. 
> > 
> > 
> > -- 
> > Job Board: http://jobs.nodejs.org/ 
> > Posting guidelines: 
> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines 
> > You received this message because you are subscribed to the Google 
> > Groups "nodejs" group. 
> > To post to this group, send email to [email protected]<javascript:> 
> > To unsubscribe from this group, send email to 
> > [email protected] <javascript:> 
> > For more options, visit this group at 
> > http://groups.google.com/group/nodejs?hl=en?hl=en 
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to