Yesterday I made some more fixes to the editor, and added the sunlight filter option to the level. This is a
monochrome filter that's modulated with the sunlight static shadow term to represent the sun filtered through clouds,
or a high forest canopy, etc. It can scroll, which gives a nice sense of movement to the level.
Here is a shot of the new area controls :
I also added some tooltips to the editor, although not all of them are showing up. I'm pretty baffled by this -
two similar controls are right next to each other, and one shows its tooltip, and the other doesn't...
The last thing I accomplished was to track when lightmaps needed updaing. This is something I'd been meaning to do
for a while. The editor tracks when anything changes that could effect the lighting for the level, like geometry changes,
static mesh changes, or light changes. When exporting the file for the game engine, it sets a flag in the file that the
lighting is dirty.
When the level is loaded, the flag is checked to see if lighting needs to be re-created. If so, the flag is cleared so
it can be skipped next time. I could actually try to track this on a per-light basis, but it doesn't seem worth it.
This is nice for a couple of reasons - one is one doesn't have to track when to rebuild the lightmaps, and also you can make
many changes to the level, like entities, sounds, fog, etc. and the engine knows not to rebuild the lightmaps. I should do
a similar flag for the navigation map, because that takes a while to build right now.
Gameplay wise, I'm going to add something closer to the final attacking code in the next few days. Right now, you just
fire, and if your gun has energy, it shoots a bolt. This is simple, but lame, because I really want our game to have a
sense of rhythm to it, especially with the combat.
One approach I played with a while ago was to make the attack button start your character aiming, and then you release
it to fire. This doesn't work great because :
a) It's unfamiliar to folks.
b) If you just click & let go, it doesn't seem different than just regular click-to-fire, except its inaccurate.
So, instead, we're going to make the engine track your character's movement over the last few seconds in a moving average.
The most recent movements will be weighted more heavily, and this value, combined with your character's stats and weapon
skill, will affect the accuracy. We will add an accuracy meter, either on the screen bottom, or perhaps by changing the
I think we will end up tuning it so that you really have to stand still to fire, at least briefly, to have a realistic chance
of hitting something. This will hopefully provide the rhythm I'm looking for, and also will provide a nice cue that the
enemies are about to shoot when they stop & raise their gun.