Adrian Herbez Rotating Header Image

Posts Tagged ‘procedural content’

Procedural Snakes

001This was a small, one-night project to explore the procedural creation of snakeskin-like patterns. The main trick is to use overlapping sine waves and a bit of noise to create mirrored, snakeskin patterns, which ended up being both straightforward to implement and fairly effective.

To see more examples, go here.

If you would like to play with the code yourself, it’s in github.

projects ,

Everything You’ve Ever Wanted

This was meant to be the start of a project by which a user could navigate an endless procession of products, with the individual products being pseudorandomly generated based on a seed tied to user position in the game world. I also had some ideas about making it more game-like, with a target item that the player would need to find.

I ended up with just a rough prototype, then I got distracted with other projects. The demo included generation of a shopping cart and shelves (through hand-coded vertices), and simple keyboard navigation. See below for a video of the demo.
\

projects , ,

PHPtree

tree image generated with PHP and the GD library

tree image generated with PHP and the GD library

This was an experiment in learning the GD graphics library offered by PHP. The script generates a simple, graphic tree via a simple L-system, implemented via recursion.

Go here to see it for yourself.

projects , ,

Street Grid Demo

I’ve made a small demo app to experiment with local methods to generate streets for the Infinicity project with interim results at left. The approach the program takes is based on:

  • a randomized number of nodes per edge
  • a randomized (though so far hard-wired at 2) number of internal nodes per grid unit
  • creating edges between the internal nodes
  • creating edges between each edge node and the closest internal node

In the real app, the randomization of the edge nodes (both in number and placement) will be based on a simple mathematical combination of the coordinates of the edge vertices, causing neighboring grid units to line up with each other without any direct connection. This is implemented, but disabled in the above app, in order to get a better feel for the variations produced by the process.

If you’d like to see the demo in action, you can download it here.

projects , ,

Infinicity: Buildings!

I’ve got buildings-aplenty, being rendered via a recursive algorithm. Other than that, there’s been progress made on the interface front. I’ve got it responding to a coin interface I built awhile ago (pictures to come soon), and I have the navigation being controlled via a gamepad. In it’s final form, navigation will be driven by stepping on a metal Dance-Dance Revolution pad. I just received the pad on Saturday, but need to modify the code a bit, as the pad registers as X/Y axises rather than button presses.

Uncategorized , , ,

Infinicity: First pass at coastline

I’ve started in on the creation of a coast for the infinite city, with the above results. The textures are just stand-ins, and will be improved. Also, the water doesn’t yet animate, and the coast could use some more variation than it presently has.

Nevertheless, it’s a start

Uncategorized , , ,

Infinite planks

planksSo I’ve been thinking that the next thing I want to add to the infinite city is a coastline, and that I want the coastline to have piers extending out into the ocean. While thinking about how best to approach that, I started thinking about generating an infinite variety of worn planks with which to construct the piers. I’ve coded up an algorithm that does just that, with results to the left. Haven’t had time to add texture support just yet, but the final version will also select from a few different textures based on random choice and the aspect ratio of the plank.

If you’d like to see for yourself, click here to download the demo app. The arrow keys will rotate around the plank, and F3 will cause it to alter itself. Note that there’s currently no bottom to the plank. I’m undecided as to whether or not to add one, as it adds polygons that aren’t likely to be seen, and a savings of 8 triangles per plank times lots of planks could end up being worthwhile.

projects , ,

More Suburban Goodness (download)

I’ve added a few things to the suburb demo:

  • Fixed the navigation
  • Added ambient and footstep sounds (though only one at a time so far)
  • Made it actually infinite- you’ll never run out of blocks no matter how far you walk
  • Changed textures from grass to dirt (prepping the area for the development to come)
  • Added an icon (I hate the default windows application icon)

If you’re interested, a zip file of the current incarnation can be downloaded here

projects , , ,