I thought something likeklax wrote:philippeqc: I didn't get your idea of differencing arena:// and http://. What are you thinking when you say arena://??
arena://shape<(x1,y1),(x2,y2),(x3,y3)>spawn<(x4,y4),(x5,y5)>
You mentionned to just pass the description inside that string element. So I though, you only need to add a prefix to say its an arena, not a url.
Nota: Adapt with your own map format. I made one up on the fly.
I bow in front of you, master coder!klax wrote: Now I've done HTTP Fetcher work without installing any libraries. We could use it inside AA without installing any 3rd party library. I've tried in AA and it downloads an http file inside AA.
yes, allow for local caching based on the file name. If its not there, fetch from the Interweb. Be it on the game server or some other machine.klax wrote: Now some more doubts:
When you enter a server it will connect to a http url to download the arena. Do u think we should save that file to any directory? That way the next time you connect to the server it will look in a local directory for the arena file. That way the next time you connect to the server it will look in a local directory for the arena file.
Humm, I dissagree on that. It will be if your on a fat broadband and the server hosting the file is not under load. But imagine 16 player trying to get the same new map? Or our poor friends behind dial-up. You need a synchronization system where all the clients report when they are done loading the map so the server can proceed.klax wrote: But this way we'll have this problem: if the admin of the server updates the file and don't change the name, how will we detect if the file is new?
btw: the download of arena files will be semitransparent because of the few kbytes to download
Sorry, I'm not at home. I'm sure someone else will be able to lend a hand.klax wrote: k: Can you test if this minitest works in windows? You'll have to use the command line compiler of Visual C
Here is what I did to make it work the testfetch in linux:Code: Select all
gcc -o testfetch testfetch.c http_error_codes.c http_fetcher.c ./testfetch Page successfully downloaded. (www.google.com)
Very nice progress klax! I will probably not be able to do a thing before the weekend.
-ph