New Terrain!

Published August 02, 2006
Advertisement
Hey everyone!

So today Mark decided that the current terrain in A22 is boring and too 'perfect', so, after much discussion, he finally convinced me to try a technique he thought up to make the terrain more.... rough.

Terrain Surface Decals
As you may already know, the terrain in Angels 22 is a 2D heightmap, which generally means that the terrain is very sharp, as it is comprised of a bunch of 4 vertex boxes stuck together. I was convinced that the terrain was fine how it was, and that no one would care if it was so sharply defined. Well, I tonight I coded up Mark's technique (which will be described below), and I must say, I was wrong, the new terrain looks much better than the old stuff, and actually solves a lot of my problems, such as how to make good roads.

The Technique
Because the actual 2D distance between two heightpoints isn't standard, you can't simply slap a sprite in between two points becuase it will either be too little, or too small, resulting in gaps. Mark's idea was to use a relatively long texture, and only use the length of the texture that we actually needed. I guess it's not that novel of a concept, but it never really occurred to me. Anyways, in order to render the overlay, a quad is drawn, and rotated so that it completely covers the distance between two adjacent height points. Then, it is texture mapped using texture coordinates modified using the distance between the two points. The result is a nice texture line that can be stretched, without distorting the texture, which is what allows us to now do stuff like roads, grass, etc. Anyways, you can see the new terrain with a grass overlay over it in the screeny below:



The type of terrain covering can also be changed on a per segment basis, so the whole level doesn't have to be covered in grass, and some parts can have other covers, like roads, or rocks. Also, I implemented a random feature, so that once Mark puts together some more grass textures, the game will randomly pick the ones to be displayed, giving the levels a lot more visual diversity.

Well, that's all for now, and thanks for all the positive comments, they really boost my morale, and keep me coding. Peace Out!
Previous Entry Update!!
Next Entry Howdy!
0 likes 2 comments

Comments

Gaheris
Wow, I hadn't expected that the terrain could have been updated to look this great. Definitely a great idea of Mark, the grass covered terrain is awesome.
August 02, 2006 02:56 AM
Manaxter
Looks good, can't wait for the demo!
August 02, 2006 04:30 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

!

1181 views

'Roids

1495 views

Post Dva

1277 views

Untitled

1113 views

I'm a sad panda...

2123 views

Untitled

1016 views

Progress

1060 views

Angels 2X!!!!!

1482 views

T3H Progress!

1306 views

ZOMG!!!!

1186 views
Advertisement