Archive for the ‘World Generator’ Category.

Unnecessary fun stuff

I pondered a bit today about the way I want the possible game to handle the generated map. My current idea would be to have grid-based scrolling, so that you always see one frame, and the game ‘scrolls’ to a new area when you touch the borders. That way I can always load (and perhaps generate) new areas as required. However, there’s one problem: the maps are quite huge, and if I made every pixel represent an area (320×240), the game would get really big very fast. That wouldn’t be much of a problem otherwise, but I fear such huge worlds might get boring very fast – I think it might be better to go with smaller and tighter worlds, and have them to be full of stuff. Also, if every pixel was an area (or perhaps ‘room’ would be a better word), I probably should divide the world into regions, and the map would essentially consist of stuff in the current region. A region could be, say, 20×16 rooms in size. That’d make the map a bit easier to read.

Anyway, I quickly created some kinds of ‘visualizers’ just for fun, mainly inspired by the visualizers of Minecraft. They look quite horrible and are hard to read, so I guess I wont be using them anywhere.

Here’s my first test on displaying a region separately from the map. As you see, the height makes it really hard to read. I’m overall not sure how I should treat height, though – if the game is isometric/top-down, should the game just create walls to places where the height difference is high enough? Or should there be some elaborate path system that’d create meaningful areas and paths?

Here’s also the whole world visualized. It’s hard to read, but I think it has some kind of charm to it.

back to work

Started working on the world generator again. I recoded it from scratch, and currently it creates basic worlds in less than a second (compare to the older, which took over 15 seconds!) The screen size is a bit smaller, though, and there are no cities, roads or races yet, but I think I’ll be able to make this one much tighter than the earlier one. This time I think I have even a game idea to go with the generator! We’ll see.

Agersant at the TIGsource IRC channel suggested some changes to the colours, and they sure look a thousand times better! The map may be a bit hard to read, though- there are lots of shades of green!

Assigning regions gone wrong

That'd take quite a few tribes!

I’m attempting to assign the areas on the world map for different ‘tribes’ (currently identified just by ID). I guess the assigner shouldn’t be as sensitive… (Each coloured area is supposed to be a region).

EDIT: Ok, got it to work better (even though it may not look like that). Next I have to get some rules onto what races can appear and where. When I tried random assigning, about 60% of the world belonged to the undead!

Better now!

Working on cities

The name generator sucks. SUCKS.

Creating identifying stuff for the cities has proved to be harder than I thought; there a couple weird things here and there that affect annoyingly the results. Also the world generation seems to take about 14-16 seconds now, and that’s not good enough. I have to look into this code carefully…

…However, everything is going quite much fine with this project. After the cities are in place, I think I’ll start working on the races that inhabit the world. I wonder if I should use the stupid old fantasy clichés or create my own creatures?

More stuff!

Rainfall!

The deciduous forest is a bit hard to see in the first island, but it's there!

I’m having some real fun working on this! Now that i’ve added rainfall, the islands generation takes about 14 seconds, so I have to work on some performance next. After that, we’ll get cities with themes!

I seem to have a tendency to say ‘islands’ instead of ‘island’.

Roads gone… Right!

Hoo boy, doing this was fun. Next I shall delve deeper to the cities, and give them names and ‘types’!

Roads gone wrong

There's a nice highway in the middle. And counting this took a minute!

More world generation!

I added support for different temperatures, which are counted using another ‘heightmap’. It’ll need some serious tweaking, but I quite like the looks already!

A bit confusing!

A bit colder areas!

World generator

I’ve been goofing around with procedural generation. I thought it’d be cool to create a generator that’d generate a full world map, finished with biotopes, cities and roads/rivers. After banging my head a bit, I finally managed to make the heightmapping create at least somewhat interesting landscapes. Next I shall get to the different environments. These shall be decided by moisture and temperature, along with the height.

Behold, it's a heightmap!

Behold, it's a heightmap!

First attempt with ugly colours.

First attempt with ugly colours.

Getting there! I quite like those lagoon-like structures.

Getting there! I quite like those lagoon-like structures.

Looks a bit more natural, I guess.

Testing roads a bit. Works great!

This is a fun thing to play with!