Map Downloader Suggestion [message #427524] |
Tue, 04 May 2010 09:39 |
jez636363
Messages: 8 Registered: April 2004
Karma: 0
|
Recruit |
|
|
Hi Folks,
I'm not sure how you are planning on doing the map downloader, and I'm not familiar with the internals of Ren, but here is a suggestion that might make things easier to code.
First, assume you do not need to download new maps in a big hurry. As long as most people get it over a few days then that is fast enough.
To manage maps being unavailable to some players at first, implement a smart 'nextmap' chooser, so that it skips maps that are not available to every player in-game. Not sure if you can do that - if you can't then you have to allow more time for a map to trickle down is all, before including it in a rotation.
Second, assume you have access to some cheap webspace NOT on the gameservers.
Each new map would be split up into say 1MB chunks, and stored on a webserver somewhere out there - not the game server.
The background download process would gradually download the chunks and store them.
Whenever the whole program starts up, it would check for any maps that were fully downloaded, and install them - so that only happens when you are not in game. Perhaps you can insert maps while the game is running too, or at least make them load from the previously downloaded chunks, at the start of the game?
Thew background download would use async reads with a small packet size, to stop it interfering with the game. You would limit the frequeny of reads by monitoring the time between starting the read and getting the data, and limiting the download to say 30% of time or something appropriate.
That way, you can release new maps, they will start tricking down to players, and the server will only start using them when all the players have got them.
Yes, it would take more time to get maps out there, but its not the end of the world, and its easier, and gets rid of the problem of people being kicked out because of not having the right map.
Cheers,
Jez
[Updated on: Tue, 04 May 2010 09:53] Report message to a moderator
|
|
|
Re: Map Downloader Suggestion [message #427525 is a reply to message #427524] |
Tue, 04 May 2010 09:48 |
jez636363
Messages: 8 Registered: April 2004
Karma: 0
|
Recruit |
|
|
Or keep it even simpler. When you try to join a server, it first checks your maps against the map rotation, and does the necessary download right there, before game starts. Still download from a separate webserver somewhere, to avoid hurting gameserver bandwidth and so you can download at full speed.
|
|
|
Re: Map Downloader Suggestion [message #427529 is a reply to message #427525] |
Tue, 04 May 2010 11:51 |
|
Goztow
Messages: 9738 Registered: March 2005 Location: Belgium
Karma: 13
|
General (5 Stars) Goztoe |
|
|
jez636363 wrote on Tue, 04 May 2010 18:48 | Or keep it even simpler. When you try to join a server, it first checks your maps against the map rotation, and does the necessary download right there, before game starts. Still download from a separate webserver somewhere, to avoid hurting gameserver bandwidth and so you can download at full speed.
|
It will actually probably download the map when you need it, meaning just when it loads the map.
You can find me in The KOSs2 (TK2) discord while I'm playing. Feel free to come and say hi! TK2 discord
|
|
|
|
Re: Map Downloader Suggestion [message #427554 is a reply to message #427524] |
Tue, 04 May 2010 23:24 |
|
Goztow
Messages: 9738 Registered: March 2005 Location: Belgium
Karma: 13
|
General (5 Stars) Goztoe |
|
|
You will join the game once you have the map, but it obviously won't make the others wait for you.
You can find me in The KOSs2 (TK2) discord while I'm playing. Feel free to come and say hi! TK2 discord
|
|
|
|
|
|
Re: Map Downloader Suggestion [message #427649 is a reply to message #427524] |
Thu, 06 May 2010 13:06 |
StealthEye
Messages: 2518 Registered: May 2006 Location: The Netherlands
Karma: 0
|
General (2 Stars) |
|
|
Like I said "This system is mostly working already.". The issue you're describing needs to be looked at (I'm not quite sure, but I think it will finish downloading and then notice another map was started and start downloading that one, which would lag at most one game behind. But again: not sure.)
BlackIntel admin/founder/coder
Please visit http://www.blackintel.org/
[Updated on: Thu, 06 May 2010 13:06] Report message to a moderator
|
|
|
|