Skip to content

Ecce Signum

Immanentize the Empathy

  • Home
  • About Me
  • Published Works and Literary Matters
  • Indexes
  • Laboratory
  • Notebooks
  • RSS Feed

Month: October 2008

Perlin Ants In Color

2008-10-30 John Winkelman

Perlin ants in color

Click here to launch the ants.

Click the left button to reset the terrain which the ants follow.
Click the right button to show and hide the terrain.

1800 ants in a full-color version of yesterday’s experiment. Instead of looking for dark/light pixels, the ants look at the different color channels of the pixel they land on – red, green and blue. Then the ants follow the same pattern as yesterday – dark pixels turn left, light pixels turn right – based on the intensity of the target color.

Yup. I like how this one turned out, too.

Posted in ProgrammingTagged cellular automata, Flash comment on Perlin Ants In Color

Perlin Ants

2008-10-28 John Winkelman

Perlin Ants with visible terrain

Click here to launch the ants.

Click the left square to generate a new terrain map.
Click the right square to show and hide the terrain map.

This is kind of a mash-up between bits and pieces of some previous experiments – the terrain from the tile-based game, and the ants from the Langton’s Ants experiments.

Basically, what is happening here is this: A thousand “ants” are created and placed in random locations on the screen, facing in random directions. Each turn, each ant moves forward one pixel. If the color of the new pixel is lighter than the previous pixel, it turns a bit widdershins. If the new pixel is darker, it turns a bit clockwise.

The ants end up tracing something like contour lines, and seem to be “attracted” to sections where the color of the terrain varies significantly over a small area.

I threw in a bit of a blur to make things more interesting visually.

Enjoy!

Posted in ProgrammingTagged cellular automata, Flash comment on Perlin Ants

Tile Game With Location Detection

2008-10-27 John Winkelman

2008.10.27 region screenshot

Click here to launch the game.

Click anywhere in the prototype to bring it into focus, then use the arrow keys to move. For a detailed explanation of what is going on, read my GameDev.net blog post.

Posted in ProgrammingTagged Flash, game development comment on Tile Game With Location Detection

The Lost Lake Trail

2008-10-22 John Winkelman

Along the Lost Lake Trail

Pictures from an afternoon out by the lake at Muskegon State Park. Click the photo to see the rest of the set.

Posted in Photography comment on The Lost Lake Trail

Tile-based Game Engine update

2008-10-20 John Winkelman

Tile-based game engine screenshot

Click here to launch the experiment

.

This is a small update to an experiment I have been working on, off and on, over the past several months. Click on the Flash movie to bring it into focus, then use the cursor keys to move around.

Posted in ProgrammingTagged Flash, game development comment on Tile-based Game Engine update

Gyruss Play-ability Update

2008-10-15 John Winkelman

Click the movie to bring the game into focus; LEFT and RIGHT keys to move, SPACE to fire.

Click here to play.

Posted in ProgrammingTagged Flash, game development comment on Gyruss Play-ability Update

Langton’s Ant 3D, Version 2

2008-10-03 John Winkelman

Langton's Ant in 3D

Another Langton’s Ant 3D experiment. Click here to run the experiment.

I finally got the ruleset sorted out, and now I have a simple 3d version of Langton’s Ant up and running. This is how it works:

Remember the behavior of Langton’s Ant:
1. If the ant is on an empty cell, color it in and move according to the next rule in the set.
2. If the ant is on a filled cell, empty the cell and move according to the previous rule in the set.
3. Do not talk about fight club.

The space in which the Ant is moving is a 50x50x50 (125,000) grid of cells.

There are eight rules which the ant follows, which – if none of the cells are colored in yet – the ant will follow in sequence:

1. Z–
2. X++
3. Y++
4. X–
5. Z++
6. X++
7. Y–
8. X–

In non-computerese, when the applet first runs, the ant will travel in, right, down, left, out, right, up, left, and in doing so fill in eight cells which make up a 2x2x2 cube.

2-3
5-4

1-8
6-7

With the next step the ant begins to encounter filled cells, which mean it takes a step back in the ruleset, and perhaps another, and eventually start to travel to new cells.

It is important, in order for the ant to make the desired patterns, that the sequence of movements in the ruleset visit each cell in a cube of cells exactly once, with the next iteration through the ruleset returning the ant to the original cell. Also, no diagonal movement; only cell face to cell face. I am not sure if this can be accomplished with more than a 2x2x2 cube.

In this demo the cells are colored in according to the “depth”, or the Z value of the cell-s position. Cells farther in the “back” are blue, and cells closer to the “front” are red. All layers (Z) are faded back except for the layer in which the Ant is currently moving. This is why there appears to be a “screen” of cells which moves back and forth and changes colors constantly.

Also in this demo, the pattern created appears to trend to the lower right corner of the screen because each of the layers, back to front, has been offset one cell to the right and one cell down, to provide a sort of isometric view of the pattern.

More experiments along these lines to come, after my brain cools down a bit.

Posted in ProgrammingTagged cellular automata, Flash comment on Langton’s Ant 3D, Version 2

Langton’s Ant 3D, Version 1

2008-10-02 John Winkelman

Langton's Ant in 3D space

Click here to see the ant in new amazing 3D action.

My first attempt at moving Langton’s Ant into a 3D grid. The 3D part was easy – just add some Z movement to the existing X and Y pattern.

This is what you are looking at: there are 100 cells in the X (left and right) and Y (up and down) plane, and 25 in the Z (toward and away from the viewer) plane. There is one bitmap for each Z level, making for 25 stacked bitmaps. The bitmap in which the ant is currently moving is set at 100% opacity, with the surrounding bitmaps becoming increasingly opaque until they are almost transparent. When the experiment seems to flicker, it is because the ant is rapidly switching between Z levels. Those long horizontal “roads” the ant makes are probably more like tubes when viewed in 3D space.

Making the ant move in an interesting pattern is a little more difficult. In 2D (X,Y) space, from each point the ant can either turn left or right, and move forward one space, depending on the state of the cell to which the ant moves. That means, using initial conditions, the ant will move in a perfect square: up 1, left 1, down 1, right 1, and end up back at the original square. In order for me to make that work in 3D space, the ant must visit each of eight cells, forming a cube, and return to the original cell without doubling back on itself. The current experiment does not do that, thus the long horizontal runs.

Right now there are 18 rules for the ant’s movements. Each of these rules is iterated through, based on the color of the cell on which the ant lands. Landing on an “off” cell causes the ant to move according to the next rule. Landing on an “on” cell causes the ant to move according to the previous rule. If I implement multiple “on” colors, then I can cut the movement rules down to 6, but I will need to have each rule account for the color of the cell in which the ant currently resides.

Look for more iterations on this problem in days to come.

Posted in ProgrammingTagged cellular automata, Flash comment on Langton’s Ant 3D, Version 1

Personal website of
John Winkelman

John Winkelman in closeup

Archives

Categories

Posts By Month

October 2008
S M T W T F S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Sep   Nov »

Links of Note

Reading, Writing
Tor.com
Locus Online
The Believer
File 770
IWSG

Watching, Listening
Writing Excuses Podcast
Our Opinions Are Correct
The Naropa Poetics Audio Archive

News, Politics, Economics
Naked Capitalism
Crooked Timber

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

© 2025 Ecce Signum

Proudly powered by WordPress | Theme: x-blog by wpthemespace.com