OpenArena Message Boards

id Tech 3 => Engine => Topic started by: sago007 on March 12, 2017, 04:19:08 AM



Title: Safer auto downloading
Post by: sago007 on March 12, 2017, 04:19:08 AM
There are very few engine side things that interest me but this I find interesting.
I really want to be able to auto download new maps in a safe way.

More than a year ago Simon McVittie opened an issue on the ioq3 github page about auto-download: https://github.com/ioquake/ioq3/issues/130

I thought it was pure speculation but about 18 hours ago Simon started to show code.

Small recap:
  • Auto downloaded files are downloaded to a separate directory.
  • They are only loaded if the server asks them to be loaded.
  • Auto downloaded files can no longer break the game. Restart the game and the files are no longer loaded.
  • Executable files (qvm files) that have been auto downloaded will NOT be executed

We have talked about this before but I get a bit excited then I see code.
Sure there are still some way to go (I still want to see how the problem of loading the files in the right order is solved) but I still wanted to share my excitement.


Title: Re: Safer auto downloading
Post by: fromhell on March 12, 2017, 09:49:23 PM
I'd want this in OA myself also.  Autodownloaded breakage is something i've always been annoyed with for a long time with any of the Quakes and it's about time there's something like UE1's cache directory

Sort of related, there's also this
https://github.com/Chomenor/ioq3_new_filesystem


Title: Re: Safer auto downloading
Post by: sago007 on March 13, 2017, 02:14:32 PM
Chomenor also references issue 130.

I am not to fond of the new filesystem. It seems that he are trying to use the engine to fix errors in the paks.

I really only have two problems with the ioq3 order:
  • Alphabetical loading is not respected for pk3 files in the home folder (it is loaded like it was a mod, I wanted it more like union fs)
  • Packed files takes precedence over unpacked files. (config files)

I don't like surprises in the load order.


Title: Re: Safer auto downloading
Post by: Suicizer on March 14, 2017, 02:35:50 AM
There are very few engine side things that interest me but this I find interesting.
I really want to be able to auto download new maps in a safe way.

More than a year ago Simon McVittie opened an issue on the ioq3 github page about auto-download: https://github.com/ioquake/ioq3/issues/130

I thought it was pure speculation but about 18 hours ago Simon started to show code.

Small recap:
  • Auto downloaded files are downloaded to a separate directory.
  • They are only loaded if the server asks them to be loaded.
  • Auto downloaded files can no longer break the game. Restart the game and the files are no longer loaded.
  • Executable files (qvm files) that have been auto downloaded will NOT be executed

We have talked about this before but I get a bit excited then I see code.
Sure there are still some way to go (I still want to see how the problem of loading the files in the right order is solved) but I still wanted to share my excitement.

So if you would (auto)download and your Quake/Open Arena will mess up, you wont be able to reproduce the situation? Perhaps good it will run like normal after restarting, but your version ends up with a lot of unused junk after a while...


Title: Re: Safer auto downloading
Post by: Gig on March 14, 2017, 07:18:47 AM
So, with the new system, you will not be able to later use locally a mod that you got by autodownloading?
Or maybe you may still use it locally, but you will have to manually copy/move it to somewhere else (basepath or homepath) or renaming it before being able to use it?


Title: Re: Safer auto downloading
Post by: smcv on March 14, 2017, 12:30:14 PM
Or maybe you may still use it locally, but you will have to manually copy/move it to somewhere else (basepath or homepath)?

Yes, this is the current plan.

You also have to rename it, if you want to enable any executable code that it contains - but obtaining executable code from a random OpenArena server is a terrible idea security-wise. Even if the admin of the server you connected to happens to be trustworthy, there's nothing to stop malicious people from getting between you and the server, hijacking the connection and directing you to download their malware instead.

Please get all mods, but particularly the ones that intentionally contain executable code, from somewhere trustworthy.


Title: Re: Safer auto downloading
Post by: smcv on March 14, 2017, 12:33:17 PM
I still want to see how the problem of loading the files in the right order is solved

I think my current prototype already gets this right - whatever order the server tells us to use (in the pure server pack list if it's a pure server, or the list of files it offers for auto-download if it's an impure server), that's the order we use. I think the server already sends the list in the right order.

If I'm wrong about that, which is entirely possible, please comment on the ioquake3 bug and say so.