tile-map-thing

It's not quite a game, and it's only sort of art, but it's kind of neat.

I created what could generously be called a map creation tool - working on a grid that resizes itself to your screen, the application will randomly generate a map out of three tiles - mountains (gray), grass (green), and water (blue). It will then do a second pass, at which point it will replace any mountains or water not immediately adjacent to any other tiles of the same kind with grass, cleaning up the look somewhat and making it look less scattershot.

It still looks pretty scattered, but it's cleaner than it would be otherwise. Some screens:



I weighted the selection in favor of grass because it looks better.
The tiles themselves are individual objects, which hold their color/x/y values within themselves, as well as draw functions.

Full code:
https://pastebin.com/YTtQAABX
https://pastebin.com/YBJYKiQS

Comments

Popular posts from this blog

veins - a weird visual toy

Stupid Triangle Thing

Squeezy Circle