Revisit 2

Web log of development issues.

Revisit 2

Postby adamsderk » Tue May 26, 2009 5:15 pm

Greetings,

Today it is terrain and buildings.

My test terrain is the mountain type. I chose this because everything else is less than it. The game engine uses a noise function (3d fractal) with input parameters to change its output. The main ones are the random number seed and the frequency. The seed is what makes one terrain arranged differently form the next. The frequency determines how close the high and low points are together. For example, a frequency of 1 gives one high and one low point over the entire area. A frequency of 2 gives two of each (in a 2 by 2 grid). I use all the way up to 64 for lots of little variations. You might notice that all of the numbers are squares of 2; this is to keep the edges lining up with the opposite edge to make a seamless tile.

Before, I tried to stack the frequencies to get mountainous terrain. The problem was that it provided great variation over the whole terrain, making lots of slopes and making travel difficult. I thought back to the original games (especially MW1) and remembered that most of the terrain was completely flat with some steep high slopes for mountains to provide cover and visual interest. That got me thinking about how I could recreate that. So, I use the low frequency fractal with a cutoff to define mountain regions and set that aside. Then I use a higher frequency fractal to define the "rough" areas or smaller elevation changes. I put the two together with the "mountains" coloring over the "rough" and leave the rest of the area flat.

So, the current challenge is to make a river that wanders through the terrain. After searching around, it turns out that it is made using path-finding. Yep, the same technology that allows AI units to move around, makes rivers (and hopefully roads). But I'm stuck here figuring out the code.

So, while I let that percolate, my mind wanders to buildings. With large expanses of flat terrain, I can scatter buildings around with only minimal concern as to how well they will land. So, I get some buildings in the game (just place holders) and I'm walking around and jumping on top of them. And I realize that my problem with buildings is the interactions. Of course, looking at videos of mods using other game engines just makes the issue worse. Check out about 1:00 into http://www.youtube.com/watch?v=oczYWHCiw6g. Notice how the building allows the unit to move into it and slowly destroy it. That is what I want from buildings. Now the excellent localized damage display is impressive, but I could live without it. I want a unit to be able to enter a building. If it is infantry, they should be protected by the building and not damage it when they enter. A vehicle or Mech should be slowed considerably and do damage to the building. Munitions should damage and eventually destroy a building. I don't want a collision box, I want a, I want a... a physical zone. Yea, that is it, why didn't I think of that before.

In Torque, they have "zones" that you can place in the game. They could be triggers, like the start/finish line of a car game, or they can be a barrier, like the mission defined area that acts like a force-field and pushes you back in. But what really got me was the environmental change implementation. In Tribes you could enter a "speed" zone that would double your speed, or a "jump" zone that would launch you into the sky. That is what I want, not a collision, but an interaction. Can I do it? I don't know, but this is the kind of improvement I want to do with each aspect of the game. Pretty comes later, realistic behavior is now.

Thanks.
Image
adamsderk
Site Admin
 
Posts: 1404
Joined: Tue Apr 19, 2005 11:52 pm
Location: Western Washington

Postby SandMan » Wed May 27, 2009 12:23 am

Excellent!
For Davion!
ImageImage
SandMan
 
Posts: 172
Joined: Mon Jan 07, 2008 4:48 pm


Return to Development Blog

Who is online

Users browsing this forum: No registered users and 1 guest

cron