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

21 Sep 2011

Pixel Game

Literally the WORST game ever, but my first try at making something game-like with an actual visual interface.
Download format is .Zip, unzip it and run setup (this was generated by Visual Studio).
To uninstall, just find it in Add or Remove Programs.

Basically, you use the buttons in the top left (no key control at the moment I'm afraid) to move a white pixel around and place it, making pretty black-and-white pictures in a painfully slow and annoying fashion.

U, D, L and R are to move the current pixel Up, Down, Left and Right respectively.
S should save it but I have no idea where, it's like a single line of code that I've never even seen before I used it.
X gives you a completely new blank image. No idea if you can start by pressing X instead of N, but just press N anyway.
E erases a white pixel. Move the current pixel over an already white pixel so it turns grey, then press E and it is erased. The current pixel remains there though, but the one beneath it is now black.

Basically, move the white pixel with the direction buttons, place it with N and then move the next one. As I just said, white pixels will turn grey when you place the current pixel over them to show that there is already a white one there instead of a black one (it also means the program can easily tell it has to put a white pixel back there when you move off it, but you don't need to know that).

Download (Dropbox):

New Start

If you (incredibly) haven't come from my DA page, its dakshen3.deviantart.com, have a look, I do more than just sit and code (not much more though). Otherwise, just carry on.

Anyway, now I'm at the University of Lincoln doing Games Computing (+Masters) I thought that it would be a good time to actually use this old, run-down blog to show off the various bits of crap I create during my learning experience. It also gives me a good place to come if I ever think I'm not good at coding, so I can look back and think 'Wow, look how badly I sucked at coding back then, I'm actually way better now' and hopefully feel a bit better about it.

So, yeah. From now on, Electric Sheep and my DA page should be quite closely linked. DA will be more about my ideas and plans and such, this will be the technical part.

On a completely unrelated note, apparently my neighbour the Incredible Disappearing Luke (he just seems to vanish for hours on end, then you find out he was in his room or something. He did it when we moved in, turns out he had slept from like 2pm to the next morning so I was the only person who had seen him at any point until he emerged for breakfast) has met Dean of OMFGItsJackAndDean, who are friends (I assume) with Tom (aka TomSka) of Eddsworld fame, who unfortunately graduated at the end of last year, so we never got to meet him. So yeah, that's my incredibly insignificant, dilute, indirect and roundabout claim to fame for the time being.