Tag Archive for 'experiment'

Game tiles experiment

justGREAT! I start off designing some tiles just for practice and one day later I end up with a neat experiment :D

I was inspired by the graphics of Dofus Arena and decided to try and create some similar tiles… Spending half a day fooling around with Fireworks I ended up with this image:

game tiles

Another half a day later I turned the graphics into an animated terrain generator: http://www.powerupmedia.nl/#/exp080302

The terrain is generated according to three small bitmaps (see top left corner). The first one determines the type of the tile. The second one is like a bumpmap and determines the elevation of eacht tile. The third bitmap determines where objects (plants, rocks, gold, etc.) should be placed.
In the future I might create an editor which can write the bitmaps.

Once I designed more versions of each tile-type (4 or 5 different grass tiles for example) the generator will be able to pick a random version of that tile. This way repetition in the structure should be avoided (at the moment the tiles are just mirrored at random).

Game Physics here I come…

Just great! After years I finally found the book I was looking for all the time…

Game Physics – Engine Development

I’m not really a book person, but when I tried to create a physics engine a while back I ran into a couple of major problems which stopped me from going on with it. I tried it a couple of times ever since but I always found myself stuck on the same problems (complicated collision detection etc.). Back then I searched for decent books to help me but there wern’t any. Either they were way too easy (coming with all kinds of crappy solutions) or way too hard (most of them all about theoretical physics).

I ran into this book by accident as I was actually looking for an all picture book with cool and stylish web design (Web design index by content).

I haven’t read any of it yet, but looking at the pics inside it is exactly what I needed :D .
I tend to read it in my vacation so you might expect some nice experiments in the near future.

For those of you who are interested:

Game Physics – Engine Development by Ian Millington
isbn: 978-0-12-369471-3

Web design index by content
isbn: 90-5768-069-6 | http://webdesignindex.org

PS: I saw this Ian dude also has a book on AI which sounds interesting too, but that something for the future. (God, where am I gonna find the time…)

Simple terrain generator experiment

Just great how easy it is to make a simple terrain generator :D

This evening I started an experiment to try and create a terrain generator (like the one in my all-time favourite SimCity2000). So far I don’t really have use for it but it might come in handy in the future.

I managed to work out the basics in just 3 to 4 hours. Now I need to find a way to get smoother edges and get rid of all the really small islands. I recon that’s gonna take a bit more work.

 I used an enterFrame event to get the animated effect. Just to see what happens.

Check the first results here:
http://www.powerupmedia.nl/#/exp070702

PS: this is the first time I used actual flash components since I don’t have a slider or spinner ready in as3; boy do those things SUCK!!! :roll:

UPDATE (2007-07-09):
I managed to remove the majority of the small (one or two px) islands by tweaking the algorithm a little. The result is now a bit more realistic.

Also I increased the max world size to 960×960 (to illustrate: SimCity2000 has a mapsize of 128×128).

Finally I added the world wrap option (because it took me just 2 minutes to add :D ).

UPDATE (2008-03-09):
Here is a short explanation of how the code works:

The general trick is to place a first pixel somewhere on the map and than check each of its neighbours to see if they need to be filled with the same “terrain-type”. You can do this by checking a random value against a fixed limit value (in this case represented by the “spread”).
When a certain pixel on the map is filled you place it in an array so you can always check if a pixel is already occupied and you can also use it to check if the maximum number of a certain type is reached (in this case represented by the “pct”).
After this whole sequence you repeat the same process for the newly generated pixels (there is your recursion). If there are no more pixels left to check and the maximum is not reached yet, you just place a new pixel somewhere on the map and start again.

I hope this will help you along.

Flash experiments

justGREAT! I organized some of my flash experiments for you to play with…

ribbon #1 (2003?)
soap (2005)
particles #1 (2005)
particles #2 (2006)
particles #3 (2006)
mouse #1 (2006)

Let me know what you think of them…

I hope to convert some older experiments in to as3 in the near future. I’ll keep you posted!

Update (2007-12-05)
I moved my experiments to a new domain and I renamed them because their numbers became too overwhelming :P
You can find these and other experiments on http://labs.powerupmedia.nl