Resource Commands

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Resource Commands

Post by LOVER$BOY »

/me is feeling awesome :D

Just kidding but really, I am :D I have coded a system in the current resource downloading section for it and it works! :D

All it uses is RESOURCE_REPOSITORY_BACKUP host1;host2; Along with that I put a handy system that checks if the map is a valid one or not. IF it's not, then it won't download. So we won't have failed map downloads and then the download of a new map won't be blocked because of the currently existing failed map.

Currently I have it working like this:

Code: Select all

RESOURCE_REPOSITORY_BACKUPS http://resource.armagetronad.net/resource/;http://crazy-tronners.com/resource/;http://vertrex.tk/aa/resource/;
IF you want to manually change these, you will need to re-enter the whole list again.

I'll be committing it into my branch as I've tested it out with Crazy Tronners and with a couple of manual MAP_FILE loads and it works like a charm! And it took me only a day to code :D

Although I don't know if you guys will be happy with it though :? The only thing I don't like about this is that it sometimes gives a delay when downloading a map. Sometimes it simply bugs out :( Th second one is rare but still it's annoying. I know where the delay is though. It's in the map verification code. I'm thinking of using map parsing which is much easier. This method is rather rough and not smooth in my opinion.

Anyway, here's the new revision: http://vertrex.tk/wiki/index.php?title=Revisions
Image
User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2346
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: The main Armagetronad Resource Repository.

Post by compguygene »

For the purposes of performance, would it not be wiser to have any map validation code not on the client side, but in the uploading/management of the Repositories?
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: The main Armagetronad Resource Repository.

Post by LOVER$BOY »

That will work but there is another problem. Sometimes, those files that need to be downloaded WILL still download for some reason :? It has happened to convict and a few others.

Especially with my host, it created a temporary file of that and that's a problem. Can't have broken files downloading, can we?
Image
User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2346
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: The main Armagetronad Resource Repository.

Post by compguygene »

This and several other reasons are why it may be better to use the existing system that works completely outside if the game, just using servers. However, I would encourage you to keep playing with the code. If you get a solution that works, it may get incorporated. To do this right, you do need to curate the mirrors to have all of the files. I am going to be setting up my map repository after I am done getting my 8 new hosting servers ready to host full tournaments. Almost there....
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: The main Armagetronad Resource Repository.

Post by LOVER$BOY »

Actually, my original idea was to download the file and everything. Next step was to parse it and check if it's a valid file. If it's not, remove it and return false to the previous function. That would be a lot quicker and there won't be much of a delay when double parsing file at the point of download.

The problem I keep facing there is (File unable to be deleted). I am struggling with that one stupid problem. I know I'm using the right parameters for removing file but still it's no good.

Yes thanks for the encouragement comp. I'll try to delve deeper into the code if I must to find a solution to that pesky problem. If anyone else has any ideas on deleting files in c++, let me know please.
Image
User avatar
Titanoboa
Reverse Outside Corner Grinder
Posts: 1795
Joined: Sun Feb 22, 2009 8:07 pm

Re: The main Armagetronad Resource Repository.

Post by Titanoboa »

Just curious, should this really be under "General"?
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: The main Armagetronad Resource Repository.

Post by LOVER$BOY »

I don't know for sure Titan. Comp made the post here but I think it should really fit in either the "Programming" section but this topic is still related to the improvement of the file management system.

Comp I've added a new command. It's

Code: Select all

RESOURCE_REPOSITORY_CHECK  # Type in a Map Location and it'll search through the backup list to ensure that file exists in there.
I've also removed the in download parsing of the map files. Now they will be downloaded and then parsed. If the parsing doesn't return the valid stuff that only a map has, then that file is deleted.

Sweet ah?

There is only one draw back with that new command. When your searching for the file, it freezes for a couple of seconds as it tries to make contact. I have absolutely no clue why it just keeps freezing like a maniac. I'll see what I can do about it.

UPDATE: Committed it into my branch. You can find the latest news here.
Image
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Resource Commands

Post by Z-Man »

Split because these commands have nothing to do with the repository itself.
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: Resource Commands

Post by LOVER$BOY »

Yes, your right Z-Man. Ah well, it looks like we can get to the main point now ;)
Image
Post Reply