This 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.
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.
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.
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.
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.
So 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.