O欧博gre Forums
文章正文
发布时间:2024-11-18 11:10
looks beautiful! very nice work!
Thank you!
question: did you use Ogre's terrains, or made a terrain map of your own? or did you modify ogre terrains? is it tile based?
I would like to learn more about your terrain system if you don't mind sharing.
I use my own code for the terrain, I'll try to cover how I do it, it is quite simple.
First I have the level in a 3D program. In there I create the terrain. In the forest level, it is the grass floor and the mountains on the side.
From that I divide them into smaller pieces which are hidden/shown in code based on some variables to gain better FPS (for example, distance from the camera, though this is not what I do). So no LOD whatsoever on these, that is not necessary in a top-down game.
Those smaller pieces are then created in bullet as physical objects, but the actual characters never collide against the bullet physics unless they are in ragdoll mode, as I do not want to rely on physics to have my character at the ground, as this in almost all games have proven to be bad since you at some point will "lag" through the terrain and die.
To position the character, the floor is also a navigation mesh (but not the mountains, of course), this is where the AI find their path on and where the player gets the safe Y position.
If you have more questions, ask away
EDIT: And no, it is not tiled based, the terrain can be an arbitrary 3D model.