Hello Guest

Terrain 'destruction'

  • 4 Replies
  • 8349 Views
*

Offline Rene

  • **
  • 78
Terrain 'destruction'
« on: November 07, 2009, 15:07:48 »
Hi all,

I just made some progress with my engine allowing it to destroy (well, actually distort) terrain in real-time. It still needs some more optimization and freedom in the code where you define the distortion, but the basics already work. Here is a link to a video showing the effect. If anyone's interested, I can share the code with you.

http://www.xyzw.nl/DynamicTerrain.wmv
When I am king, they shall not have bread and shelter only, but also teachings out of books, for a full belly is little worth where the mind is starved - Mark Twain

Re: Terrain 'destruction'
« Reply #1 on: November 07, 2009, 15:34:49 »
Looks good. How do you intend to deal with path planing in such a environment? What about the terrain becoming impassable.
If you want a plot read a book and leave Hollywood out of it.

*

Offline Rene

  • **
  • 78
Re: Terrain 'destruction'
« Reply #2 on: November 07, 2009, 15:43:00 »
It's pretty easy to calculate the terrain normal on a cell. So every time the terrain is altered, a 'slope map' would be updated containing the slope of the terrain at each cell.

When a path is calculated, the unit can only use the cells with slopes lower or equal to what the unit can handle.

Or at least, that's what I'm planning ATM
When I am king, they shall not have bread and shelter only, but also teachings out of books, for a full belly is little worth where the mind is starved - Mark Twain

Re: Terrain 'destruction'
« Reply #3 on: November 07, 2009, 15:59:46 »
Thus the question about impassible terrain. All i need to do to defend my base (for an RTS) is bomb the crap out of the access areas or all around. Gives turtles a pretty strong hand. Otherwise there is the issue of mission can't be completed cus you can't get to your goal. I realize that "encompassing" terrain due to bombs etc is part of real battles but is it fun?

I was going to have deformable terrain in my game. But the pre-calculation i used for path planing and other AI pre-calculation data about the terrain was going to make it very difficult. So i dropped it.
If you want a plot read a book and leave Hollywood out of it.

*

Offline Rene

  • **
  • 78
Re: Terrain 'destruction'
« Reply #4 on: November 07, 2009, 16:12:41 »
The destruction isn't something I just wanted to add to the game, but it would really be one of the game play features.

A part of the level bombed to crap so it's impassable can be bombed by some kind of 'averaging-bomb', averaging the terrain height to some degree so it becomes passable again.
When I am king, they shall not have bread and shelter only, but also teachings out of books, for a full belly is little worth where the mind is starved - Mark Twain