Previous Blog Next Blog
Prev/Next Blog
by date

More T2D Terrain Stuff

More T2D Terrain Stuff
Name:Drew Hitchcock 
Date Posted:Jan 25, 2006
Rating:3.0 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Drew Hitchcock

Blog post
I haven't been able to spend as much time with my random map generation stuff as I would like, but the progress I have made is fairly visible, so I figured I'd post some screenshots. Everyone likes screenshots.

In my last plan I showed the quick proof-of-concept that I threw together to test out my idea. In the first iteration, the terrain textures were blended together in software to make a single texture for the map, which was then slapped onto a quad and rendered. Obviously, this approach would use a lot of texture memory if I wanted to make a very large map that had a lot of detail.

In the latest version, the textures are blended in hardware according to an alpha map. The alpha map is still occupies some texture memory, but much less due to the fact that it's only an 8 bits per pixel image. The dimensions of the alpha map are also much smaller than the map itself, due to the fact that it only contains blending information so it doesn't suffer in quality as much when it's enlarged.

You'll also notice that the terrain textures are now tiled, and have smooth transitions between them.



I'm going to expose some of the generation parameters to script tonight, and do some cleanup of the C++. After that I'm going to put it aside for a while and start working on actual gameplay. If there's one thing I've learned from all of my past projects, it's not to get caught up in one detail too long. An unpolished game is more entertaining than a polished 2d map renderer.

Edit: Closer picture to show detail

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 ResourceSubmit your own resources!

Anders Linder-Noren   (Jan 25, 2006 at 06:45 GMT)
Looks really nice!

Tom Bentz   (Jan 25, 2006 at 07:50 GMT)
that looks pretty cool

fireVein   (Jan 25, 2006 at 09:52 GMT)
Much better improvements, looks awsome!

-Jase

Jesse Hall   (Jan 25, 2006 at 13:32 GMT)
very cool :)

Alexander "taualex" Gaevoy   (Jan 25, 2006 at 17:17 GMT)
Awsome! How big will be the terrain in tile count (width & height) ?

Drew Hitchcock   (Jan 25, 2006 at 17:53 GMT)
Thanks everyone!

@Alexander

It's actually a custom class called t2dTerrain, which started its life as a t2dStaticSprite. It has no real connection to the tilemap code, so the answer is "0x0 tiles." The terrain above with 2 terrain textures uses 4 256x256 textures in total (2 RGB textures, 2 randomly generated alpha textures). Each RGB texture is repeated 10x10 times over the expanse of the map, while each alpha map is just stretched over the whole thing. (The rendering code is actually extremely simple) I think it holds up pretty well under high magnification though.

I'm thinking about using tilemaps for object placement, however. This tilemap would just be laid over the top of the terrain, and would use some simple criteria to determine whether a tile is solid ground or not. In that case I'm thinking of dividing it into 32 tiles each direction. (The game design this is going toward is very boardgame-like).

Here's a shot of some experimenting with this idea (64x64 tiles). Beige tiles are solid ground.


You must be a member and be logged in to either append comments or rate this resource.