Time to start a new project!

This one’s called Zombie Run, where you’ll actually play as a zombie.

As you can tell from the screenshot, this project is in an oldschool pseudo-3d style, much like the sprites in Wolfenstein 3D. It’ll work with vanilla Java installed (no OpenGL). I get to practise my maths and my pixel art skills.

Edit 28/06/2013:

By reversing the code that translates world-space to screen-space positions, I was able to texture map the floor. The resolution of the floor texture is around 120×150 here, and the buffer that it is written to is 400×200. Sampling per-pixel is too costly at the moment, but there may be some improvements i can do.

Edit 02/07/2013:

Now Zombies walk towards humans (faster than they walk randomly), and humans will run away from zombies in the opposite direction if they get too close. The ground is generated in chunks for 32×32 pixels, based on the seed of the map. These pseudo random values also populate the map with threes and NPCs

Edit 04/07/2013:

I’ve added hands and another type of human (Louis from L4D) . There are also shadows under static objects (trees) and a mud texture. I’ve addeda little “shock” animation around the human’s head to show when they notice a zombie and are about to run away

My latest update allows the player to kill humans, the whole point of the game. It took a while to get to this point because I got destracted by the AI and the random map generation. The humans need a bit more attention, as they are pretty dumb, and they can’t shoot yet. If I leave the game for a minute, all the zombies kill all of the humans.. but i want some left for the player to kill.

Update 10/07/2013:

Previously sections of the ground (32×32 pixels, and associated sprites) were generated whenever they became within +/- 4 sections of the player. There’s no real lag yet, but i expect the frame rate to drop for that frame if I increase the complexity of the section generation. To fix this, each request for a section that isn’t get generated goes into a queue, and then one chunk is generated per frame (if any are in the queue). This means that the calculations are much more spread out, so I can add more complexity to it.

In this image, I also created a new font for the kills, and added a spooky tree.

Update 11/07/2013:  Humans shoot back!

That’s pretty much it. A trail of temporary sprites are created to show where the bullet came from, and the damage is based on the difference. The AI for huimans is less random than the zombies, they shoot when they can, retreat when in danger or when they reload, and wander around otherwise. At this stage the zombies still win if left to their own devices, but it is a closer match. I think some more tweaking is required

Leave a comment

Your email address will not be published. Required fields are marked *