Development time: 270 minutes (running total: 1030 minutes).
This morning was one of those rare occasions when I had just enough time to finish everything I intended. I won’t pretend it was anything beyond luck, but it still feels nice. There is now a visible science stat generated by surviving scientists, gets used up in a burst of sparks when hitting enemies, and gives a nice boost to damage.
Science stat at work.
I used a scrollbar to mimic a progress bar for the science meter, which was very quick and close enough to what I want. The game controller keeps track of the amount, and the code for scientists to generate it and the damage amplification is trivial. I added sparks using a particle emitter – ideally I would use a single emitter, perhaps attached to the crowbar, and have it emit bursts of particles, but I had some trouble accessing the emitter programatically so decided to cut my losses and use the less efficient option of instantiating emitters from a prefab and destroying them after a few seconds.
Death by science.
Not the prettiest sparks in the world, but good enough without spending long on them.
With the science stat working close to the way it was originally envisaged, I tackled the final major problem with gameplay. Up to this point the crowbar’s movement has been limited to a plane a few units above the ground, and had to be waved through the enemies like a magic wand to make them die. That isn’t the sort of feel I’m going for, and meant that mindlessly flailing back and forth was a winning strategy. To get more of a bludgeoning feel, I moved the basic plane of movement up to about the scientists’ head height, well above the hopping height of enemies, and added a bashing animation activated by a keypress.
A jaunty angle
The movement uses a coroutine that activates over several physics update frames. It moves down and rotates forward for 4 frames, then does the reverse. The rotation uses local coordinate space, whereas the movement uses world space – the default local space movement would cause a net forward movement due to tilting of the y axis, which isn’t desired here.
At last, some proper bludgeoning…
With these changes I’m just about ready to try for some sort of difficulty balance, but I’ll be leaving that to the last minute since it’s a task that can balloon out to any number of hours, and I can make up lies about the target audience if people start claiming it is too easy or difficult.
Goal for day 5 (afternoon/evening): survival and special effects.
Survival mode isn’t properly functional after the spawner changes made for campaign mode, so I’ll spend a little while getting that back up and running. Tutorial mode can wait until tomorrow or later, but I’ll add some basic instructions to the main menu as a stopgap. I’ll spend any remaining time today on adding some textures, models and audio.