|
-
May 2nd, 2006, 09:43 AM
#1
Algo : the simplest things are always the more complex ones
Hello. I'm currently developping a game (language doesn't matter for the question) with, at first view, a simple feature: user move from tile to tile on a grid. Each tile he passed on turn into his color. The feature is that if the user draw a square on the grid, I need to detect it and fill it. Easy no?
But it can be really tricky 'cause it's a multiplayer game so; more than 1 color (4 for now). And, since it's the server that keep the grid's info, the check need to be really optimized 'cause it will be called really often (at each move of every players * nb of games running on the server).
I don't know if i'm enough clear? The concept remember me this old pinguin game that were skating on the ice and we needed to draw square too, but in this case we cannot keep in memory the last 4 move of each player since a player can connect with tiles he marked his own 2-3 minutes before....
Is there something somewhere that already exist?
Does somebody have any idea or link?
I'm really in the dark right now. I have written something that seem to work, but it's 3 huge function of 300 lines each that are recursive so; the server will probably die if there's more than 4 games running... :S
Thanks a lot,
sam
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|