Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit/AppGameKit Studio Showcase / Undiscovered Worlds: a procedural terrain generation project

Author
Message
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 18th Feb 2019 20:19
Hi all,

I've been tinkering away on this project for about a year and a half and thought it time to show what I've got to the world. It's not a game, though it could form part of the engine of one one day, perhaps. It's a program that generates imaginary planets and lets you explore them (by "explore" I mean "look at maps of", before you get too excited). First it creates global maps, and then you can zoom in on areas of interest, where it will procedurally create additional detail as you go. There's only one level of zoom at the moment, but I hope to add more.

Some screen shots:













I'm putting this together in AppGameKit tier 1, which is really a terrible choice because it's very calculation-heavy. I'm learning C++ at the moment and hoping to convert it into tier 2 before too long.

If anyone's interested, I've started a blog about the project, where I explain how it all works, at least to the best of my understanding (I try to write well-commented and logical code, but still I can't make head or tail of half of it now).

It's clunky, slow, and appallingly bug-ridden, but it has reached the stage where I think it's making some nice maps that stimulate my imagination, at least. So I hope some people here find it of interest too. Once it's close to being fit to be actually used by other people I hope to be able to release the app itself.

(Credits: I've adapted three bits of code by other people: Markus's spline code, Phaelax's bline code, and OBese87 & Libervurto's circle code.)
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 19th Feb 2019 02:24
Wow this looks really great, the land forms and terrain features seem very natural.

Does it also produce a matching height map? And when do we get to play around with it?

Btw, Obese is Libervuto, he changed his name at one point. It's a shame he is no longer around, he did a lot of interesting procedural generation stuff
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 19th Feb 2019 12:25
Thanks! Yes, it's all done with height maps - have a look at the blog for the more detailed descriptions. I hope you'll be able to play with it before too long...

Thanks for the info about Obese, I didn't know that! It was a very handy little function anyway. I'm using it to widen rivers and also as part of my monsoon algorithm.
Undiscovered Worlds: a procedural landscape generator
Doveyy04
12
Years of Service
User Offline
Joined: 30th Apr 2012
Location:
Posted: 19th Feb 2019 21:04 Edited at: 19th Feb 2019 21:04
Looks really good, definitely interested to see how this come along. A game I’ve long been interested in seeing or wishing I could do myself is a type of Sim City game but say Sim Country where an area is randomly generated and you create a working earning country based on the area and it’s features.

So like say it’s a mountainous country then a skiing tourism maybe but not as much flat area to build cities.

Plenty of beach locations then holiday tourism etc, perhaps it has mild winters so a winter destination but downfall is that it has little rain so costs more to build water pumping stations etc.

Perhaps it has the longest river in the world so have that as a famous destination but rainfall is heavy so residents are harder to please.
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 20th Feb 2019 04:36
I've just finished going through the blog, and it's truly a fascinating read. some very clever techniques and the results look great.

The only thing that stood out to me as being a bit off was that the lakes all seemed to be positioned near the source of the rivers, while I'd expect to see a bit more variation towards the mid points as well.

Anyway, it really makes you want to load these as 3d environments and go exploring
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 20th Feb 2019 19:28 Edited at: 20th Feb 2019 19:29
Doveyy04 wrote: "Looks really good, definitely interested to see how this come along. A game I’ve long been interested in seeing or wishing I could do myself is a type of Sim City game but say Sim Country where an area is randomly generated and you create a working earning country based on the area and it’s features. "


Thanks! That sounds an interesting kind of game. It's not what I'm aiming to do but I do think strategy-type games might be interesting if they could be made to work on maps of this kind rather than the more usual tile-based maps, which I've never really found believable.

Ortu wrote: "I've just finished going through the blog, and it's truly a fascinating read. some very clever techniques and the results look great.

The only thing that stood out to me as being a bit off was that the lakes all seemed to be positioned near the source of the rivers, while I'd expect to see a bit more variation towards the mid points as well. "


Thanks for the feedback - I'm glad you've found it interesting. Lakes are the weakest element of the whole thing, to be honest. They are astonishingly difficult to get to look believable as they basically combine the problems of coastlines with the problems of rivers, plus some more of their own. I'm in the middle of rethinking how they're done. However, their positions are random, so they shouldn't be particularly clustered near river sources. The relief maps (i.e. the coloured ones) only show rivers when they're above a certain size, so it may look like the lakes are near the sources of rivers when in fact they're not. If you look at them on the river maps, which show flow of all sizes, it may be clearer:



Ortu wrote: "Anyway, it really makes you want to load these as 3d environments and go exploring "


Well, that's the plan! And when I get to that stage, choosing to do this in AppGameKit may finally start to make sense.
Undiscovered Worlds: a procedural landscape generator

Attachments

Login to view attachments
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 27th Feb 2019 06:10
Wow.....absolutely amazing, perfect for a Civ game. Great work.
xtremi
6
Years of Service
User Offline
Joined: 26th Aug 2018
Location:
Posted: 7th Mar 2019 07:49
Awesome work! Really interesting to read your blog!
I played a little with generating infinite 3D procedural terrain, but only with different noise functions. This is making me want to go back to that project
Kevin Cross
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 7th Mar 2019 10:01
Very impressive work!
OryUI - A WIP AGK2 UI Framework
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 7th Mar 2019 11:38
Thanks all!

Santman wrote: "Wow.....absolutely amazing, perfect for a Civ game. Great work."


That's not what I was planning on doing... but now I can't help thinking about how that might work with these terrains. I may have to think more about this.

BTW, given your location, you might like today's post, where I basically try to make Loch Ness.
Undiscovered Worlds: a procedural landscape generator
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 7th Mar 2019 13:45
I actually built an almost fully functional 2d Civ game, AI and everything, and moved over to the 3d world. I did some work converting it to 3d, got the basic map and controls done, but then went back to my world builder. If you ever want to collaborate, shout me.

Ah loch Ness........Scotland's famous puddle. Lol.
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 7th Mar 2019 15:58 Edited at: 7th Mar 2019 16:02
That's the thing, world building is more engrossing than making the actual game to play in the world! (or writing the story set in the world, or whatever...)

I do actually have some history of making Civ scenarios, so inevitably I'm tempted by that idea. But still, even then I liked the worlds more than the actual gameplay!

One thing I was thinking: I don't like the current vogue for 8-bit style retro graphics. But I did like, back in the day, graphical styles that were somewhat stylised and where landscapes were made up from pre-drawn elements. I always felt that those held so much possibility of huge worlds to explore, and even now they feel more magical to me than genuine 3D worlds that really can be explored in real-time. I'm thinking Lords of Midnight kind of thing. I wouldn't want to try to recreate that style but I'd like to have a go at developing something more contemporary along those lines. And the terrain engine I'm developing might be rather good for that. If I add one more level of zoom - a local level, say, where each cell is something like 100m across - I could generate explorable terrains; and then rather than simply set up yet another standard 3D world using them, I could find ways to depict them in a more stylised and perhaps static way. What actual game would result from that I don't know - although come to think of it, something like Lords of Midnight on random maps (and perhaps with procedurally generated characters) would be pretty cool...
Undiscovered Worlds: a procedural landscape generator
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 8th Mar 2019 11:33
I love Civ games, I've finished almost every one multiple times. Lately though they got a bit tired......they've fallen into that habit of just remaking the same game over and over with tweaks and better graphics. Though actually, even the better graphics part could be disputed. Lol.

I don't know lords of midnight, but I do look forward to seeing what you turn this into.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 12th Mar 2019 10:52
looks amazing Plotinus
fubar
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 17th Mar 2019 20:18
Thanks, I'm glad it's attracting interest.

The blog has more or less got up to date, so I've covered most of what I've implemented. Now I'm moving on to what I'm struggling with at the moment, which is mostly rivers and lakes...
Undiscovered Worlds: a procedural landscape generator
Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 19th Mar 2019 19:03
Really amazing work

I am happy to see a promising procedual map generator in AppGameKit T1

[/url]
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 25th May 2019 20:41
Just a quick update so you know things are still chugging away on this!

I've recently added more features such as salt lakes, salt flats, dunes, wetlands, and canyons, and done various bits of tidying to the code and the output. It's all detailed in the blog, linked to in the first post.

Some of the recent images:









Undiscovered Worlds: a procedural landscape generator
xtremi
6
Years of Service
User Offline
Joined: 26th Aug 2018
Location:
Posted: 27th May 2019 07:22
Beautiful! Are you still doing this in AGK1? Planning to go over to C++?
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 27th May 2019 08:28
Still AGK1 for now! I'm currently working on river deltas, but once that's done and a few other tweaks and additions are in, I'll be at the end of the first stage and able to think about exactly how I'm going to convert this.
Undiscovered Worlds: a procedural landscape generator
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 27th May 2019 20:29
Starflight remake anyone?
xtremi
6
Years of Service
User Offline
Joined: 26th Aug 2018
Location:
Posted: 29th May 2019 06:44
Plotinus, is the source code something you have publicly available, or planing on it?
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 30th May 2019 07:32
I'm not planning to, though I don't mind sharing snippets if people are interested in particular elements. I did post my diamond-square implementation a while ago.
Undiscovered Worlds: a procedural landscape generator
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 6th Jun 2019 20:30
Can't resist bumping to say that I'm particularly pleased with my latest addition to this - river deltas!



Undiscovered Worlds: a procedural landscape generator
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 6th Jun 2019 22:03
Awesome, looks great
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.

Login to post a reply

Server time is: 2024-11-23 08:15:39
Your offset time is: 2024-11-23 08:15:39