
If you're sticking with the radiosity solution (which basically works by treating every surface as a lightsource of some intensity, then getting each surface in turn to radiate its light), the obvious thing to do would be to switch the lighting on each side of the destroyed wall surface. It's not like you can make a small isolated change to a map's lighting when a wall is destroyed. Sure it's possible, but not worth doing IMO.
#UFO ALIEN INVASION DESTRUCTIBLE TERRAIN CODE#
Not without writing a load of code yourself. While it's an unfortunate loss, it's too late to put that right now. Adding it on now would be silly - it'd defeat most of the purpose of using the quake2 engine in the first place. This is the sort of thing that ought to be sorted out at the beginning of the project (and was I guess - they're not doing it). I'm not sure I could do it, but it would be largely a waste of time even if I could. You're also making the game look a lot worse in most cases, since I'm guessing your real time cobbled-together-and-hacked-in lighting system doesn't look as good as Carmack's pre-designed, off-line approach.Īnyone capable of doing this could spend their time better elsewhere. It does mean that you're going through a load of work adding a simple, dated lighting system to a badly documented, out-of-date engine which is written to support a different system. In some ways that's a good thing, since you can stick to simple lighting. On top of re-writing a load of map creation and compilation code, you'd need to rewrite the lighting from scratch. You'd probably conclude fairly quickly that using radiosity in such circumstances isn't a great idea (unless you've got your eye on a phD).Īssuming you're not using radiosity, you've just thrown out the lighting system used by quake 2 maps. The type of situation you'd be doing it for would be pretty much the worst possible - mix of open and closed spaces dynamic changes between spaces preventing clean division some areas open to the sky, others not good solutions required in seconds rather than minutes. Perhaps that's easier to follow than C++ without much aid, but it's still somewhat unfamiliar (to me at least).Įven then, getting a radiosity solution to work in real time would be tricky. That's with the pretty much non-existant documentation to the quake 2 engine - which is also in C. To put the radiosity stuff in game is an option, but you'd have to adapt/re-write it yourself. To use this directly each turn would amount to altering and recompiling the map at the end of each turn, then loading it back into the game.

#UFO ALIEN INVASION DESTRUCTIBLE TERRAIN OFFLINE#
I looked (briefly and unwisely) at doing this myself.Īll the radiosity lighting is done offline on the maps before the game starts.
