• Welcome to the Fable Community Forum!

    We're a group of fans who are passionate about the Fable series and video gaming.

    Register Log in

History Simulator *WIP Prototype*

Keshire

Modder
Joined
Mar 9, 2007
Messages
271
Reaction score
113
Points
115
A while back I got into a conversation on what I was currently working on.
http://fablehero.com/threads/fable-rebalance-discussion.32145/#post-520128

Part of it was the fact that I lost of bunch of code I was using for map generation. I've started rewriting it and felt like showing where I was at.
http://tinyurl.com/q5s6ub8
This redirects to my google drive unity web app.

Just press space to gen a new map. Beware it could crash your browser if it hits a bad random seed. But I think I got most of those bugs eliminated. :D

This is based on the notes and code in this article:
http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/

There's a lot going on under the hood here, and I'll be ironing out the bugs for quite some time. I haven't been able to hook in any of my existing sim code yet.
 

Keshire

Modder
Joined
Mar 9, 2007
Messages
271
Reaction score
113
Points
115
Fixed some rendering, fixed the bad seed. It can still hang if I try and push more than 5K points though. It gets stuck on the algo that tries to find all points in a triangle. I use that for filling in the color since this is drawn straight onto a texture in the engine.

I also fixed a typo where moisture was being distributed by elevation. That was a my bad. Caused biomes to sit on specific elevation lines, and all mountains were snow capped. :D

pKWL7UF.png


I switched from Perlin to Radial islands until I find a better perlin implementation than what Unity offers.

Here's a 2048 map using 12k points. The above was 600x600 at 1K.

N2yR8rC.png
 
Last edited:

Keshire

Modder
Joined
Mar 9, 2007
Messages
271
Reaction score
113
Points
115
Same seed. Got noisy edges implemented. Kinda. I'm getting a lot of crashes because putting noise on the edges turns a lot of the polygons from convex to concave and the coloring function can't handle it very well. I'm also seeing more noise along the corners than along the middle of the edges. Which I don't think is right.

4096 texture size, and 16K sites. Took about 5 seconds to fully render. And that's pretty much just the functions needed to set the colors to texture.

There's also so many points and so zoomed out that the lighting being applied isn't as noticeable. So that mountain in the middle loses a lot of focus. But it's interesting because that dark splotch is the scorched biome. It generally means it's volcanic. :)

The green that shows up in the lakes are swamp/marsh. I had a seed that made most of the lowlands all swamp on one side of the continent, and desert on the other.

psuuO1H.png


The rendering isn't totally important. I'm just trying to make sure I have all the data setup the way I want. Afterwards I'll be abstracting it down so it looks like a hand drawn map.

I found a really good example of what I'm trying to do:
http://lotrproject.com/map/

This website basically maps and tracks everything that went on in the books and marks it on the LOTR map. I'm trying to procedurally generate all that information, plus some. And give people the option to change it as the world moves.
 
Last edited:

Keshire

Modder
Joined
Mar 9, 2007
Messages
271
Reaction score
113
Points
115
I've done a bit of work on this. Blogwise it's spread all over the place. Some here, some on facebook, reddit, the unity forums etc etc. I should really dedicate a place. :D

I've caught up and surpassed where I was at before I lost it all to a drive failure a while back. I'm also storing it on dropbox to avoid future problems.

JIjGJ0M.png

http://forum.unity3d.com/threads/a-world-sim-wip.254863/
 
Last edited:
Top