Archive for the ‘Processing’ tag
A dark Processing theme for 2.0, available for download on Github.
Random walk using part of the first chromosome of the human genome (top image is the first 10k data points, bottom is the first 20k).
- A = up, T = right, C = down, G = left
- Start in center
- If position walks offscreen, wrap around the other side
- Color is mapped from very light gray at the start to black at the end (layering the image to show time – looks surprisingly like marble)
Made as a possible level-generator.
Further experiment sending unrelated images to 123d Catch software – here 70 images were blended, put in a computer-rendered 3d living room, and uploaded. Created using Processing, bash scripting, and Rhino.
Following experiments creating other procedural game levels, the development has switched to caves. Some searching found the very interesting Procedural Content Development Wiki and a fantastic post by Noel Berry about creating procedural caves with waterfalls (above).
Above (and the other images below) are from a first set of tests generating caves using Processing. The forms are created using a random walk, which ensures that all parts of the cave are reachable by the player (drawn in orange). Once the main cave features are formed, Perlin noise is used to set various heights within the cave. The levels are wrapped (going over one edge jumps the player to the opposite side) so that the level doesn’t have smooth edges and, in come cases, can be traversed infinitely.
More algorithmic islands, created using random walks (similar to how the outer perimeter of the island is created) to create more realistic terrain patterns. Mountains are grown first, then forests and finally grassland, each of which encroaches on the previous terrain for more realistic clumps and chains.
Further algorithmic islands, with weighted random for different terrains (grass, forest, rock, mountain), automatic beach around the edge, and all mountains surrounded by rock – still-messy code here.
Algorithmically-generated “island” maps using a random walk around a square and changing parameters for beach depth; created for an upcoming smell-based adventure game.
A messy version of the code is here; click on image for full-resolution
Experiment for an upcoming projection: the Eame’s famous 1968/77 film “Powers of Ten” with each frame sorted by pixel color using a modified seam carving algorithm
The entire human chromosome #1, with A, C, T, and G color coded and rendered as individual pixels. Created with Processing using data via Project Gutenberg.