iamgreaser / iceball

Open-source rewrite of the VOXLAP version of Ace of Spades.
http://iceball.build
GNU General Public License v3.0
113 stars 32 forks source link

Rewrite initialization code #232

Open fkaa opened 8 years ago

fkaa commented 8 years ago

Re-starting the application via execv destroys any connection that external programs have with the process (debuggers, steam overlay etc.).

AFAICT the current initialization process goes like this:

To get it to one continous process we would need a way to tear down the launcher code and start up game code. Should this be a hardcoded function? eg. ib_connect_server(ip, port)

iamgreaser commented 8 years ago

Main reason for execv is because from a security standpoint it's easier to just dump everything and start again from a clean slate.

I'll be blunt and say this issue isn't something I would be willing to attempt, but if you want to have a go at it, feel free.

If anything, it'll make the steam overlay behave for those who like the overlay.

rakiru commented 8 years ago

Ensuring all setup/teardown is done in one place, that shouldn't be an issue, since reinitialisation should follow the same code path as the original initialisation did, so anything we don't clean wouldn't have been setup in the first place (although any static variables could catch you out I guess). The main problem I see with this is that you'd be deep in the call stack when you want to reset, and you need to get back out of there.