August 24th-27th 2012 :: Theme: Evolution

Back to Browse Entries


by pknowles - 48 Hour Compo Entry

Requires WebGL. Tested with firefox and chrome with HD5850, GTX670, GTX560 and Quadro4000.

The submission ( had some bugs, which didn't appear on my 660, so I've put together a "post-compo version" which should give an idea of what the game was meant to be.

== The Game ==
You are red. Only red blobs can be moved by you.
The aim: to eat food (green), reproduce and attack blue, becoming the dominant blobs!
Larger red/blue blobs will destroy smaller red/blue blobs.
Eating a green blob will duplicate the eater, with size deviation - evolution :)
You must balance eating and attacking (to cull your smaller blobs), encouraging evolution of larger red blobs.
The game ends when you lose too many blobs or destroy a significant portion of blue blobs.

Sorry to those of you without the hardware to run this. I built the game around my interest in GL shaders. The game itself runs almost entirely on the GPU and can happily handle blobs on the order of one million.

== Controls ==
Left drag to move red blobs. You "draw" force.
Scroll to zoom (not entirely necessary).
Right drag to pan.

== Tech Details ==
Each level is randomized at launch with perlin noise. I compute a signed distance field for collision detection with the level. Blobs move with a fragment shader, writing to a double buffered a floating point texture. Interaction is achieved by additively drawing density, velocity etc on to a texture which other blobs can read (These can be viewed by pressing tilde "~"). I count the number of remaining blobs similarly to mipmapping before reading a very small texture back to the CPU. The blobs are rendered by raycasting a density texture, similarly to parallax mapping, applying transmittance and environment mapping.

Downloads and Links




midgard says ...
Aug 27, 2012 @ 2:53am

Doesn't working, there is a bug when you start the game (at least in chrome).

csanyk says ...
Aug 27, 2012 @ 2:57am

I also get an error when the game starts in Chrome. Couldn't play it.

chorinator says ...
Aug 27, 2012 @ 2:58am

Could't play. The game does nothing

sclark39 says ...
Aug 27, 2012 @ 3:05am

Couldn't play :(
Error when it first starts, and then clouds.

Geti says ...
Aug 27, 2012 @ 3:07am

Couldn't create GL context, must have too shitty a GPU. would've been nice to make a lofi version with simpler/no shaders for us hardware-poor folk ;)

screenshot looks A+ though.

davidwparker says ...
Aug 27, 2012 @ 3:22am

Couldn't play.

OSX 10.6.8: Chrome Version 21.0.1180.82: "Could not create GL context."

DavidErosa says ...
Aug 27, 2012 @ 3:23am

OSX with Chrome Versión 21.0.1180.82. Intel HD3000 just in case :)

"GL Error 1286: <unknown> after draw <no stack>"

pknowles says ...
Aug 27, 2012 @ 3:29am

Apologies for the bugs. I plan on fixing/completing this during the week. There's some pretty weird WebGL quirks such as not being able to read a non-power of 2 floating point texture from a shader. It also seems if a shader has too many ops, it simply doesn't run without giving any error indication.

Oreganik says ...
Aug 27, 2012 @ 3:32am

Couldn't run in Firefox or Chrome, sorry.

mdkess says ...
Aug 27, 2012 @ 4:03am

On Chrome, on Ubuntu 12.04, the game just shows the black and white screen - no colored blobs as your screenshot suggests. I didn't leave a rating, but let me know if I can help you patch this.

Aug 27, 2012 @ 4:04am

Same thing, it said something about a stack issue... :(

robcozzens says ...
Aug 27, 2012 @ 5:09am

In Safari it couldn't create the GL context or something.

Sergey Mohov says ...
Aug 28, 2012 @ 5:19pm

Yeah, can't play it =\

DevoreUK says ...
Aug 28, 2012 @ 9:45pm

Wouldn't work for me. Chrome, "GL Error 1286: <unknown> after draw <no stack>"

lurkingshadow says ...
Aug 29, 2012 @ 4:11am

same as everyone else.

TobiasNL says ...
Aug 29, 2012 @ 11:55am

Nope, doesn't work here as well. Bummer!

Benjamin says ...
Aug 29, 2012 @ 12:04pm

I can't play either :-/

ggiraldez says ...
Aug 30, 2012 @ 6:01pm

The game starts, but I can barely play. Depending on the starting configuration, blue reproduces too fast and eats all the food, or kills me in less than 1 second. Also, even if there's food and some of my blobs around, when blue reaches a certain level the game tells me I've lost. Alert popup for that is very annoying too btw. Anyway, the concept is interesting, but in its current state is no fun at all.

pknowles says ...
Aug 30, 2012 @ 6:42pm

Thanks for the feedback :) I've only just updated it. I'll keep tweaking.

lesterpig says ...
Aug 31, 2012 @ 1:51pm

Work with me ! A very nice game, but really hard ;)

echa says ...
Aug 31, 2012 @ 3:32pm

Very intresting artstyle!

SteelRaven7 says ...
Sep 1, 2012 @ 6:53am

Really cool artstyle, but it felt like every single game was decided by if you could reach the green goo without dying first.

MurrayL says ...
Sep 1, 2012 @ 10:46pm

It reminded me a great deal of the game 'liquidwar', which is no bad thing.

Sep 13, 2012 @ 6:43pm

Great stuff -- love the look and feel. Could do with some audio to compliment it.

Sep 17, 2012 @ 1:31pm

I like the graphics, in particular the levels -- are they procedural? The gameplay could do with some tweaking; if you can reach the green it's straightforward, and otherwise you die quickly, and the blue "AI" doesn't seem to do very much. The concept is great though, and it would work really well on a touch screen too.

I would really like to know more about how you did all this. Maybe you'd like to write a blog post?

pknowles says ...
Sep 18, 2012 @ 7:40am

Yes, I'm contemplating doing an android version, but it uses floating point textures for the particle system which makes porting it really ugly. I've only done a few tests so far.

I haven't got round to implementing AI yet. At the moment blue movement is purely random, but the data for pathfinding and unit density is available.

The first thing I want to fix is the blob interactions (so the evolution part of the game actually works). I really want min/max blending for this but like so many GL features it's missing in WebGL.

I'll definitely continue to work on the game. I'll put a link on the same page with some more in-depth tech details when I get time.

Thanks all for the feedback :)

You must sign in to comment.

[cache: storing page]