Fixes and features

Published March 29, 2012
Advertisement
The last few days I have been working on updating the navigation mesh tool in the editor. This will then be a matter of copy and paste to get into the game.

The reason for this is that I found some strange bugs in certain areas when doing path-finding. The found path would sometimes lead to x0, y0, z0 which isn't something I would ever want. I checked if there were any newer versions of recast & detour and surly there was. I went through the demo project source and didn't notice any real big changes to the navigation mesh building phase but I decided to implement the new version anyway... Maybe there were bigger changes "beneath the hood". When re-implementing the library I found that there was a variable named edge max error. I had overlooked this parameter setting in my own editor. It was just a hard-coded value in the source (a rather big and bad value at that). Now I've made a GUI element where I can adjust its value and after a few preliminary tests I haven't noticed any paths leading to wrong places. So I am hoping this have fixed my problems once and for all...

I have also made some graphical changes to the game. Water and vegetation looked stiff and unnatural without any animation. Animating trees and smaller vegetation can be quite a big undertaking. To circumvent the issue I have thought about moving the vertices of the vegetation but I hadn't gotten around to it yet. Now I had a few hours to spare so I thought I would try it out. I decided it would be sufficient to move the vertices of the treetops to begin with; the trunk (which is most often another object) could be still. Also it should only be needed to move the outer most vertices of the treetop. The reason for this is to simulate that the treetop is stiffer the closer it is to the trunk. To make things easy and get results more quickly I choose to implement this in the game itself, leaving out the editor (I might go back and incorporate this later).

I searched the resource name of the graphic. If the filename contained the word "plant" or "treetop" it would animate, simple as that. Then I just needed a random wind-seed-number and move it around using cos and sin. To my astonishment it looked quite good the first time around! :-) As a matter of fact it looked so good that I decided to go ahead and implement a similar routine to make the water go slightly up and down. This was a bit trickier as a water tile has to line-up with its neighbours. The illusion of a water surface disappears if there are gaps between each tile/wave. It's hard to describe in words how mush it does for the vividness of the scene; Here's a small video showing it in action.

[media]
[/media]

The animations are hard to see unless the 720p video is viewed. The water waves could still use some tweaking.

Thanks for reading!
Previous Entry Normals
Next Entry Video time!
5 likes 7 comments

Comments

NetGnome
Very slick O-San :)
March 29, 2012 06:53 PM
Programming020195BRook
Ooooh! :)
March 29, 2012 11:36 PM
Ashaman73
So beautiful... really good work :-)
March 30, 2012 05:23 AM
Programming020195BRook
I've been following O-san's level editor and work for awhile now, and I must say this is up to par with what professional studios do! You're doing a fantastic job!
March 30, 2012 06:18 AM
smo97
Very cool.
March 30, 2012 11:39 AM
swiftcoder
The effect looks absolutely beautiful on the trees/vegetation. I think it is not subtle enough on the water, though - maybe consider slowing down the animation a bit?
April 04, 2012 03:58 PM
O-san
Thanks everyone!

Black-Rock, you are too kind :-)

I agree, the water animation was a bit too violent. I have added the functionality to the editor so now it's possible to tweak it until satisfaction ;-) both the speed and the height of the waves.
April 04, 2012 07:24 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement