Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Map Downloader Suggestion
Map Downloader Suggestion [message #427524] Tue, 04 May 2010 09:39 Go to next message
jez636363 is currently offline  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 Go to previous messageGo to next message
jez636363 is currently offline  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 Go to previous messageGo to next message
Goztow is currently offline  Goztow
Messages: 9727
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 #427533 is a reply to message #427529] Tue, 04 May 2010 14:22 Go to previous messageGo to next message
jez636363 is currently offline  jez636363
Messages: 8
Registered: April 2004
Karma: 0
Recruit
I guess if it doesn't take too long that is easiest - I assume the game will start before everyone loads the map?
Re: Map Downloader Suggestion [message #427554 is a reply to message #427524] Tue, 04 May 2010 23:24 Go to previous messageGo to next message
Goztow is currently offline  Goztow
Messages: 9727
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 #427559 is a reply to message #427524] Wed, 05 May 2010 02:46 Go to previous messageGo to next message
StealthEye is currently offline  StealthEye
Messages: 2518
Registered: May 2006
Location: The Netherlands
Karma: 0
General (2 Stars)

It will download the map during the end game screen; if the map is not downloaded when the loading starts, you will 'leave' the game and 'rejoin' when the map finished loading. The 's because it's slightly more subtle on the netcode level (the connection from server to client is not broken, just put in some new 'inactive' state). This system is mostly working already.

BlackIntel admin/founder/coder
Please visit http://www.blackintel.org/
Re: Map Downloader Suggestion [message #427622 is a reply to message #427559] Thu, 06 May 2010 01:59 Go to previous messageGo to next message
jez636363 is currently offline  jez636363
Messages: 8
Registered: April 2004
Karma: 0
Recruit
Looking forward to it!
Re: Map Downloader Suggestion [message #427642 is a reply to message #427559] Thu, 06 May 2010 12:28 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
StealthEye wrote on Wed, 05 May 2010 03:46

It will download the map during the end game screen; if the map is not downloaded when the loading starts, you will 'leave' the game and 'rejoin' when the map finished loading. The 's because it's slightly more subtle on the netcode level (the connection from server to client is not broken, just put in some new 'inactive' state). This system is mostly working already.

What does it do if the map that you were downloading is won and another map you don't have is next in the cycle, does it quit downloading the previous and attempt to download the new one, or does it just keep adding maps onto your list?


Re: Map Downloader Suggestion [message #427649 is a reply to message #427524] Thu, 06 May 2010 13:06 Go to previous messageGo to next message
StealthEye is currently offline  StealthEye
Messages: 2518
Registered: May 2006
Location: The Netherlands
Karma: 0
General (2 Stars)

Like I said "This system is mostly working already.". Wink 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

Re: Map Downloader Suggestion [message #427749 is a reply to message #427649] Fri, 07 May 2010 23:07 Go to previous message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
StealthEye wrote on Thu, 06 May 2010 14:06

Like I said "This system is mostly working already.". Wink 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.)

This is going to take a while to fix isn't it lol, because I just made that up off the top of my head, as far as I know it won't be an issue at all, so there is probably 1000x more real issues to go. Ah well, we shall wait XD


Previous Topic: nickname Spoofers fix?
Next Topic: Can TT fix
Goto Forum:
  


Current Time: Thu May 23 05:30:48 MST 2024

Total time taken to generate the page: 1.07796 seconds