Forums » Union Coders »
Storing world state on server with Union?
Added by Jonathan Sandness 614 days ago
So i'm doing this mulitplayer game and i've realized that i need smoother interaction of players. The solution i've come up w/ is to play the game back in time so the server logs the last 10-15 seconds of play the "state of the world" every 50ms or so over that span of time. So i need a way to hold that data for quick retrieval. The clients will all poll the server for this data based on their own lag. The solution I came up with was to have a class on the server side for each player and some other important game elements and just send chunks of AS code back to each client whenever the ask for it. To me, this sounds wildly inefficient. Any ideas, maybe implementing a database to store the data and have the server grab data from the database whenever users ask for it.
I'm really at a loss here so any help would be appreciated.
If you're curious about what I have working right now, just look here:
tinykevo.webs.com
Have two computers/browser windows connect to the web page and move one of them around using space bar and use the mouse to rotate. It runs decently smoothly but I'd really like to make it faster.
Replies
RE: Storing world state on server with Union? - Added by colin moock 614 days ago
here's how quake 3 does it:
http://trac.bookofhook.com/bookofhook/trac.cgi/wiki/Quake3Networking
there are lots more questions answered here:
http://www.gamedev.net/community/forums/showfaq.asp?forum_id=15
that multiplayer game forum is very active. you might want to post your question there:
http://www.gamedev.net/community/forums/forum.asp?forum_id=15
hope that helps,
colin