29 Sep 2011

Aggressive Pixels

Not quite as bad as PixelGame, though I think the name is even worse. It was originally gonna be AngryPixels, but I thought it would sound like a really rubbish angry birds rip. Anyway, this is the VERY FIRST simulation of some of the VERY BASIC elements of the Call-based AI idea I have for my Zombies (details under the instructions).

There are some in the program itself but anyway, here's the full set.
In the zip are two files, this one you don't have to install like PixelGame (I found the Build button)
The Map.bmp file you put somewhere that you can easily type the location of, like C:\Map.bmp
The .exe file you put wherever the hell you want really. To run the program, just double click the .exe

1: Enter the file address of the map (e.g. C:\Map.bmp or Q:\A\Really\Stupid\Place\StupidlyNamedMap.bmp)
2: Press Startup ONCE. I'm not yet sure what happens if you do it more than once, but it involves Zombies so it can't be good.
3: Press Process. The simulation with start and the display will show the map you chose populated with white zombie pixels (white because its easy to see, dark red was a nightmare.)
4: Press Stop Processing to stop the sim. You can press Process again to continue it, but to restart the sim you have to close and reopen the whole program. Sorry.
6: Profit!

The boring stuff about Calling zombies and things like that
Basically, the way the AI works in this (or will work, it's not complete by any stretch of the imagination) is that the zombie communicate by Calling and Hearing. A Call finds all other zombies within the Caller's speech radius and starts a hear event for each Hearer. If the Caller is within the Hearer's hearing radius, they receive the information, in this case the Caller's target location which overwrites the Hearer's target. Soon the Zombies should be able to choose between accepting and rejecting the information depending on whether their's is better (i.e. nearer and/or tastier) or not. Eventually, this will become an integral part of my final game as all sorts of things will be able to Call, such as guns when fired, explosions, falling stuff and basically anything that makes noise. However, these will not carry any information apart from their origin, so it only really makes for good Zombie distractions. Also, there will be human NPCs which when they Hear a zombie they will add the call's origin to their list of locations. Then they can communicate that to others, warning of potential zombie-infested areas or give that information to the player. These location will also have a timestamp so that newer reports can overwrite older ones, so that if one guy is raving about zombies in the old mill and another guy has just been there, he can set him straight. But all that complicated stuff is way, way, way down the line. In the short term, this will probably develop into a tool for testing Call/Hear events and zombies hunting humans (or vice versa) with a movable human character (probably ArrowKeys/WASD-controlled if I can get it working) and ploppable zombies as well as 3Dish terrain (things move slower uphill and faster downhill).

Making a new map for Aggressive Pixels
This is actually really simple, it just has to be a 512x512 pixel 24-bit bitmap (the default type paint makes, just use the draggy thing to resize it). Only rule in terms of colour is that [192,128,64] is the colour for inaccessible areas, Zombies will be placed randomly anywhere that isn't this colour, but can't move past walls of it. So yeah, go nuts.

Download (Dropbox):
Aggressive Pixels

No comments: