Friday update!
Key Changes:- New faster lighting algorithm
- Zombies with zombie AI
- Shooting (no melee yet)
- Window breaking
- New crosshair on targeted enemy
Playable Build:www.jonathansfox.com/ZSS/Z_Alpha_Week2.swf- Click the screen to give it keyboard focus.
- Use WASD, number pad, or arrow keys to move.
- F to toggle flashlight.
- Space to shoot.
I started the week by working to optimize the lighting and field of view calculations, substituting a faster but more restrictive algorithm. Performance gains seem to be good, but I'm still testing on a relatively fast machine, and will need to hear how the game is running on other computers as well. I added zombies, zombie movement and hunting, window breaking, and shooting. I needed a break from just re-implementing old features, so I also added a crosshair that shows on the currently targeted zombie if the attack button is being held.
The previous overlay for bullet trails actually used a map-sized bitmap in memory that was written to and erased from on a frame-by-frame basis, which was forgivably clunky on a small map, but proved completely unfeasible on the huge map I'm currently using. The new tracer fire looks almost the same, but should run much faster -- the only major difference is that the layering has the gunshots drawing on top of the player and the zombies, rather than the characters drawing over the gunshots. I liked the other way more, but I'll need to change how the characters are drawn to support moving them off the map layer.
Of the things in the preview video that aren't yet re-implemented, the major remaining features are melee attacks, blood, door opening, and items. Weapons are only half-made -- they can shoot, and track ammo, but aren't in the world and don't interact with the HUD properly.