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

Map switching #127

Closed BR- closed 9 years ago

BR- commented 9 years ago

Working on it... My current method only switches the map, though it should be extendable with some work to switch gamemode, mods, client code, etc as well.

Currently has a few bugs: I need to reset state (score, etc), respawn people, and find all the things that are calculated once on map load.

rakiru commented 9 years ago

Do we have any way of firing events or something that other things can listen for, so they could reset themselves on map change or something?

The better way to do this would be to basically reset the entire VM and start again, but that would be horrible without caching, and I'm not sure if it's entirely feasible either.

BR- commented 9 years ago

Not as far as I know. I want a quick-fix for the event, we can work on a more proper way after.

rakiru commented 9 years ago

Yeah, your current method works fine for now. A basic event system may be useful for a lot of things like this though, where we want arbitrary parts of the game to react to other arbitrary things.