by Gez » Sat Jun 20, 2009 12:30 pm
HotWax wrote:How many times does someone need to provide code patches that accomplish the "impossible" 10 minutes after someone says it's impossible before someone gets the hint?
I didn't say it was impossible, I said it needed to massively rewrite the engine code.
The engine is written so as to have the same ticrate for everything. Actors, scripts, and so on. Every DObject calls Tick() every tic. For what you want, DObject needs to be given a variable corresponding to its own ticrate, and the engine needs to sort the DObjects by their ticrate so as to activate them at the proper time.
Making the ticrate a variable is trivial; a search and replace can do most of the required work. Giving each object its own ticrate -- basically what is needed to have some monsters affected by slomo and some not -- is definitely not that easy since the design must be rethought at a fundamental level.
Let's not forget that, as well as the core simulation system (making stuff move and react), you'd have to rewrite the save/reload code, the demo code, and the netcode too, since they too make assumptions about the ticrate. With a variable, but universal, ticrate, you can still have the savegame and demo work -- great for tool-assisted demos. The netcode should still work as well if every computer keeps using the same ticrate, so there's just some synch code to add there. (Might also want to serialize the ticrate in the savegame code, by the way. All that isn't hard.) It's pretty much useless, IMO, but it's easy.
Making it variable on an object-basis? Now that's a clusterfuck in the making. The easiest way would be to ditch the entire simu, save and netgame codebase and rewrite it from the ground up. Definitely easier than hacking the existing code to make it do what it was never designed to do.
[quote="HotWax"]How many times does someone need to provide code patches that accomplish the "impossible" 10 minutes after someone says it's impossible before someone gets the hint?[/quote]
I didn't say it was impossible, I said it needed to massively rewrite the engine code.
The engine is written so as to have the same ticrate for everything. Actors, scripts, and so on. Every DObject calls Tick() every tic. For what you want, DObject needs to be given a variable corresponding to its own ticrate, and the engine needs to sort the DObjects by their ticrate so as to activate them at the proper time.
Making the ticrate a variable is trivial; a search and replace can do most of the required work. Giving each object its own ticrate -- basically what is needed to have some monsters affected by slomo and some not -- is definitely not that easy since the design must be rethought at a fundamental level.
Let's not forget that, as well as the core simulation system (making stuff move and react), you'd have to rewrite the save/reload code, the demo code, and the netcode too, since they too make assumptions about the ticrate. With a variable, but universal, ticrate, you can still have the savegame and demo work -- great for tool-assisted demos. The netcode should still work as well if every computer keeps using the same ticrate, so there's just some synch code to add there. (Might also want to serialize the ticrate in the savegame code, by the way. All that isn't hard.) It's pretty much useless, IMO, but it's easy.
Making it variable on an object-basis? Now that's a clusterfuck in the making. The easiest way would be to ditch the entire simu, save and netgame codebase and rewrite it from the ground up. Definitely easier than hacking the existing code to make it do what it was never designed to do.