by date
Random Terrain in T2D
Random Terrain in T2D
| Name: | Drew Hitchcock | |
|---|---|---|
| Date Posted: | Jan 19, 2006 | |
| Rating: | Not Rated | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Drew Hitchcock |
Blog post
It's been a very long time since I've posted a plan or in the forums. I honestly haven't done much worth talking about during most of that time, but recently I've been getting back into the whole game development thing, so I figured I'd post a plan. I think I'm going to try to start posting plans more regularly, you guys have been pretty encouraging in the past, and I'm hoping a little blog post now and then will help keep me motivated, and will help me keep track of my progress.
Anyway, enough blathering. I've been throwing around an idea for a strategy game using T2D, and I was experimenting with some different ways to handle the map rendering. Tilemaps are the obvious solution, but I've found that it's difficult to make nice-looking, arbitrarily-shaped terrains with rectangular tiles without expanding the amount of tiles that my (nonexistant) artist needs to make by a rediculous amount. To complicate things, I want to be able to randomly generate maps on the fly.
The main problem that I ran into was that my random terrain generator would generate tile groupings that would require some pretty insane transitions in order to look right. It worked fine with ugly, blocky maps, but as soon as I tried to smooth out the edges with some transition tiles, I realized how complicated the problem was.
So I decided to switch to a more interesting approach, abandoning my script-only solution for some C++.
A quick proof of concept:

Basically, I'm using libnoise to generate a random square of coherent noise, and blending three textures together according to the output. It looks really grainy right now, and it's not configurable at all from script, but I'm definitely encouraged that I could get this result so easily.
So far I'm really pleased with T2D. It seems to be able to do a lot from the script side, and it also seems to be very easy to modify the C++ source.
Anyway, enough blathering. I've been throwing around an idea for a strategy game using T2D, and I was experimenting with some different ways to handle the map rendering. Tilemaps are the obvious solution, but I've found that it's difficult to make nice-looking, arbitrarily-shaped terrains with rectangular tiles without expanding the amount of tiles that my (nonexistant) artist needs to make by a rediculous amount. To complicate things, I want to be able to randomly generate maps on the fly.
The main problem that I ran into was that my random terrain generator would generate tile groupings that would require some pretty insane transitions in order to look right. It worked fine with ugly, blocky maps, but as soon as I tried to smooth out the edges with some transition tiles, I realized how complicated the problem was.
So I decided to switch to a more interesting approach, abandoning my script-only solution for some C++.
A quick proof of concept:

Basically, I'm using libnoise to generate a random square of coherent noise, and blending three textures together according to the output. It looks really grainy right now, and it's not configurable at all from script, but I'm definitely encouraged that I could get this result so easily.
So far I'm really pleased with T2D. It seems to be able to do a lot from the script side, and it also seems to be very easy to modify the C++ source.
Recent Blog Posts
| List: | 11/22/06 - Turn-Based Strategy (again) 07/23/06 - A fairly uninteresting update 02/04/06 - Danger! Programmer Art! 01/25/06 - More T2D Terrain Stuff 01/19/06 - Random Terrain in T2D 02/19/05 - Plan for Drew Hitchcock 01/29/05 - Plan for Drew Hitchcock 11/15/04 - Plan for Drew Hitchcock |
|---|
Submit your own resources!| Stephen Zepp (Jan 19, 2006 at 16:27 GMT) |
For reference, Tom Bampton also played around with this idea for a while...you may want to take a look at some of his recent blogs and see if anything rings a bell.
| Melv May (Jan 19, 2006 at 18:52 GMT) |
Good job matey jim lad, arrrgh. Did I mention I like pirate games?
- Melv.
Edited on Jan 19, 2006 18:53 GMT
| Jason Swearingen (Jan 19, 2006 at 20:42 GMT) |
| Drew Hitchcock (Jan 20, 2006 at 03:10 GMT) |
@Stephen
I remember seeing Tom's plan a while ago. I'll have to read through them all again.
@Jason
That's a really good idea. One of the big drawbacks of my system is that it's more wasteful with texture memory than a tilemap. I'll definitely look into that.
@Melv
Arrrrr!
You must be a member and be logged in to either append comments or rate this resource.


Not Rated


