Pages: [1]
  Print  
Author Topic: Restructure the auto download system  (Read 16895 times)
sago007
Posts a lot
*

Cakes 62
Posts: 1664


Open Arena Developer


WWW
« on: March 30, 2010, 01:26:38 PM »

There is something I have thought of for some time and I might as well get it out for a discussion.

The current Auto download system has some problems, not least:
It might download files that breaks the base game.
It downloads maps that might contain textures: while mapping those textures are impossible to recognize so you might make one of your maps depend on it.

What we want:
Ability to download new maps without getting a new version of OpenArena
Ability to download mods to get a different gameplay. Mods should not need special work before working.
Ability to distinguish downloaded maps from original ones.

My idea:
Introduce a new extension in addition to pk3: ".oamap".
.oamap-files should always have priority under pk3-files, so you cannot overload the original files with them. Only map-relevant files are read: bsp, png, pcx, aas, arena, shader, ogg and the like (shader is a bit dangerous, because it can affect baseoa files that does not have a shader. I have not completly though of how to handle this).
ONLY .oamap-files can be downloaded to baseoa and missionpack folders!
pk3 files can be downloaded to other folders such as "myserver".

This would protect the base game while allowing maps and mods to be downloaded.
Because *Radiant does not read oamap-files only official textures will appear while designing maps, preventing the java-trap.

This would require some server admins to do a little extra:
Custom maps would need to be renamed to use the oamap extension.
If a server would like to use other that maps (like models) these should be placed in a different folder such as "SERVERNAME" so that they wont affect baseoa.
Mods that has there own folder should just work.

Problems I see so far (aside from technical ones):
Different
Patches such as 0.8.5 must be downloaded once for each server (unless manually installed), because the servers cannot place it in baseoa.
Work renaming files.
Must be done in a larger upgrade (not patch).
The different folders makes the server list stop showing gametype... there must be a technical solution to this.



So far this is just something to think about... there might be many reasons why work on this should never start or extra problems it will create. There might exist a better or simpler solution.
Logged

There are nothing offending in my posts.
Falkland
Member


Cakes 6
Posts: 590


« Reply #1 on: March 30, 2010, 04:06:21 PM »

I've suggested a better download system in some of my previous post , in particular about Q4 autodownload which prompts for files to be downloaded by client side ( a description here : http://openarena.ws/board/index.php?topic=3291.msg27298#msg27298 ) and about dfengine download system which has the explicit /download command and some controls over the file to be downloaded  eg a control based on MIME/type to allow only pk3 zip files format and a control over the name of the file ( http://openarena.ws/board/index.php?topic=3363.msg27738#msg27738 and also on RN forum : http://rainbow.furver.se/index.php?name=Forums&file=viewtopic&t=1558 )

EDIT : and the system has also an exception that treats the case of name collision :

Quote
[...] Name collision with an existing pk3 file will result in a failure and
be left to the user to sort out.


They've improved the system in their latest version.

Quote
                                HTTP DOWNLOAD

DFEngine has built-in support for HTTP downloads based on libcurl. It adds a
/download command that allows requesting map packs from a web server. Such a
feature has been made possible thanks to the efforts involved in the
http://q3a.ath.cx/ online repository which covers an extensive number of maps.
An alternative repository can be set up with the dl_source cvar.

  download [mapname] (&)
      download command - appending & to the command makes the download run in
      the background

  cl_mapAutodownload [0,1]
      whether to download missing maps automatically when the client connects to
      a server

  curl_version
      version string of the curl library built into the engine

  dl_showmotd [0,1]
      whether to show the download server motd in the console

  dl_showprogress [0,2]
      whether to show the download progress in the console (1 writes new lines
      continuously, 2 writes in place)

  dl_source [URI]
      URI from which to request maps - token %m inside the string is replaced
      with the requested mapname before issuing the HTTP request

  dl_usebaseq3 [0,1]
      whether to issue the downloaded packs in baseq3 (1) or in the current
      gamedir (0)

  dl_verbose [0,2]
      verbose modes for debugging purposes


« Last Edit: March 30, 2010, 04:29:06 PM by Falkland » Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 35
Posts: 14520



WWW
« Reply #2 on: March 30, 2010, 04:17:54 PM »

I liked UT2K4/Darkplaces's cache folder idea.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
Falkland
Member


Cakes 6
Posts: 590


« Reply #3 on: March 30, 2010, 04:24:50 PM »

I liked UT2K4/Darkplaces's cache folder idea.

Uhm ... how does it work ? I've never played any of those games.
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 35
Posts: 14520



WWW
« Reply #4 on: March 30, 2010, 04:44:00 PM »

From what I recall in Darkplaces: You autodownload, it goes into a subfolder called cache/, gets slapped with a checksum in its name somehow, and loads only when package checksum matches, if not, tries to download the correct package from the server. The cache folder is never automatically loaded.

UT2004 did the same, but it completely mangles up the filename with a more elaborate sum, and has days of expiry.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
Falkland
Member


Cakes 6
Posts: 590


« Reply #5 on: March 30, 2010, 04:52:18 PM »

From what I recall in Darkplaces: You autodownload, it goes into a subfolder called cache/, gets slapped with a checksum in its name somehow, and loads only when package checksum matches, if not, tries to download the correct package from the server. The cache folder is never automatically loaded.

UT2004 did the same, but it completely mangles up the filename with a more elaborate sum, and has days of expiry.

They sound interesting ... both systems prevent an eventual overwrite of existing files and preserve games installations.
Logged
sago007
Posts a lot
*

Cakes 62
Posts: 1664


Open Arena Developer


WWW
« Reply #6 on: March 31, 2010, 09:15:24 AM »

I have also thought about the cached folder, mainly because it will allow files to be reused between servers as long as the checksum matches.

In Unreal Tournament it was annoying that you could not use autodownloaded maps (there did exist tools though). The pk3 packages sorta solves that problem by grouping relevant files together (unlike all the files in Unreal Tournament, one for the map, some for textures, some for sound).

The cache does not solve the problem that any pk3-files I manually installed would pollute NetRadiant.

As a good design principle I would never ask the user what to download either the user gets used to just clicking yes or they have absolutely no idea what files to accept.
Logged

There are nothing offending in my posts.
davidd
Half-Nub


Cakes 6
Posts: 99


[Z] server maintainer


« Reply #7 on: March 31, 2010, 05:08:35 PM »

why dont you download the map in a separate different directory what gets read with lower priority.

perhaps mirror the directory tree structure in .openarena/downloaded/
Code:
.openarena/downloaded/baseoa/mapname.pk3

perhaps even with some download history so that one can remove the last few breaking .pk3
with mapping you could perhaps disable the download directory from getting listed.

I dont see any benefit in getting prompted after I have enabled downloading.
It would be nice if somehow a total amount of megabytes to be downloaded could be shown instead of on a per file basis. After a few pk3s at slow speed I disconnect.
Logged

Openarena, the freedom to contribute and extend.
andrewj
Member


Cakes 24
Posts: 584



« Reply #8 on: March 31, 2010, 06:46:11 PM »

why dont you download the map in a separate different directory what gets read with lower priority.
I was about to suggest the same thing -- use folders instead of a different file extension.
Logged
davidd
Half-Nub


Cakes 6
Posts: 99


[Z] server maintainer


« Reply #9 on: April 01, 2010, 09:41:56 AM »

why dont you download the map in a separate different directory what gets read with lower priority.
I was about to suggest the same thing -- use folders instead of a different file extension.
Ok thx, let me emphasise it a bit extra,

I would like to see a file "downloadhistory.txt" that lists the downloaded files, which time they were downloaded and what the remote filesize was at that time (perhaps also list the server that provided the download)
Logged

Openarena, the freedom to contribute and extend.
RMF
Member


Cakes 12
Posts: 694



« Reply #10 on: April 14, 2010, 09:16:26 AM »

i like davids ideas about total filesize and a downloadlog, i'm sometimes annoyed too by having to download many pk3s without no clear endtime. And with the dllog you can actually fix any changes pk3s made to OA without having to remember each dled file or go through the whole folder.
Logged
Pages: [1]
  Print  
 
Jump to: