Explorations into procedural village and landscape generation.
archive ∙ miscellany ∙ github ∙ flickr ∙ twitter
And so we head into the third dimension!
I’m currently collaborating with this awesome guy from America, Xiaohan. He did lots of work getting the basic 3D landscape set up, then I dove in and fixed up the visuals and colour scheme. Without him I would have spent months getting to this stage, so I’m really glad we’re working together.
I’ve done more work on the ground. It’s now a polygon that obscures some of the buildings so that they appear to be set into the ground.
The big box is the clipping area. It would normally be the same size as the screen but for testing I’ve made it smaller so that I can see how the ground points are added and removed as the landscape scrolls by. In the future the houses, bridges and ladders will also be removed once they leave the screen in order to take some load off the CPU.
Oh now that reminds me, did I mention these villages are scrolling?! I’ve been trying to record a video, but it makes the animation slow down to a crawl. I’ll have to figure that problem out soon.
Apologies for the lack of updates. Here’s an ugly work in progress screenshot to appease your curiosity.
It doesn’t seem like I’ve done loads in the past week and a half, and you’d be right. I’ve been a little distracted playing around with different programming languages. But do not fear, more updates will follow shortly as I get back to working on my village. But then again, that’s what most bloggers say before disappearing off the face of the earth. I’ll try not to let that happen. ;)
I now have ladders and bridges, and the houses are rectangular.
It took a while to get to this stage because I couldn’t get the graph library I was using, JGraphT, to accept different edge types, like bridges and ladders. I’ve now switched to JUNG, and my initial impressions are that it’ll be far better to work with in the long term. It took the better part of today to get my head around it, but I think it’s worth it.
I didn’t make anything really interesting to look at today, but here’s something I made a few weeks ago. I’m trying to make all my little tests modular, so that I can put it all together into one landscape later.
The grass isn’t close to finished — I’d love the blades to bend under gravity and rustle in the wind, but I’m leaving that till later as the physics makes my head spin.