I have decided to make an adventure game engine, and I think that I have a good amount of it planned out at this point. My big problem, obviously enough, is how to represent the different scenes that the player travels through.
Basically, I'm going to separate the scene from the interactive objects. The scene is thus only a big mesh with all the non-interactive objects in it. I could just export this as a .mesh and .material, but the problem is that there is a fixed camera angle in an adventure game, and lining it up is crucial.
3dsmax coordinates and Ogre coordinates don't seem to line up, however, so unless there's a system to convert between them, I need to allow a game maker to quickly position the camera. I'm thinking that the only way to do this is by making an editor, correct?
Same goes for placing interactive objects, I assume.
All of that basically just leaves one question, and that's collision detection. I know Ogre is just a graphics library, so can anyone point me to a good way to do collisions in the game? I'm just going to have the scene .mesh and the interactive object .meshes, and I need a way to prevent my character from walking through them.
Thanks!
Making an adventure game engine
-
labigne
- Gnoblar
- Posts: 21
- Joined: Tue Nov 25, 2003 11:19 am
- Location: France Paris
Hi sirSolarius
I think yhe idea of an editor is a good idea. Especially now that Ogre have a very nice GUI system (CEGUI just rocks).
If you do an editor, then you can fixe you camera view, but you also can place waypoints and then build a graph you can use in an A-Star pathfinding. IMHO you don't really need collisions detection for an adventure game.
I hope this will help you a bit.
Best regards
I think yhe idea of an editor is a good idea. Especially now that Ogre have a very nice GUI system (CEGUI just rocks).
If you do an editor, then you can fixe you camera view, but you also can place waypoints and then build a graph you can use in an A-Star pathfinding. IMHO you don't really need collisions detection for an adventure game.
I hope this will help you a bit.
Best regards
Still not the best there is at what I'm doing !
- Kencho
- OGRE Retired Moderator

- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
Well, these are my ideas:
- About the scenario: I some time ago did an Ogre "importer" class for ASE files. So I could be able to construct the whole scene (meshes, lights, cameras...) and even additional info like shadow casting/receiving... So it would be a good idea if you take a look at that possibility instead of having to create a whole new editor. (BTW: ASE is an ASCII format that can be read easily with simple string functions)
- About the collision: The same as above, but parsin the material names. Define meshes, apply them "collision" materials, and then create invisible colliders instead of regular meshes. I remember ASE didn't include the user-defined parameters of MAX, but I think you could use dummies (which I think ASE supported) if you just want simple colliders instead of complex meshes...
Hope that helps
- About the scenario: I some time ago did an Ogre "importer" class for ASE files. So I could be able to construct the whole scene (meshes, lights, cameras...) and even additional info like shadow casting/receiving... So it would be a good idea if you take a look at that possibility instead of having to create a whole new editor. (BTW: ASE is an ASCII format that can be read easily with simple string functions)
- About the collision: The same as above, but parsin the material names. Define meshes, apply them "collision" materials, and then create invisible colliders instead of regular meshes. I remember ASE didn't include the user-defined parameters of MAX, but I think you could use dummies (which I think ASE supported) if you just want simple colliders instead of complex meshes...
Hope that helps
-
sirSolarius
- Kobold
- Posts: 36
- Joined: Fri May 27, 2005 11:34 pm
Hmm, but I'm thinking more Grim Fandango than Monkey Island, so a scene can be explored by a character and freely roamed.If you do an editor, then you can fixe you camera view, but you also can place waypoints and then build a graph you can use in an A-Star pathfinding. IMHO you don't really need collisions detection for an adventure game.
Another option is to put in colliders like Kencho suggested... the nice thing about that is that it gives the scene maker more flexibility about where a character can go. I like the idea of loading a map and defining a walkable area, for example, but how could I use Ogre to enforce these defined areas? For example, if I have a set of stairs and I want to make an invisible ramp on top of it for the character to walk up, how could I pull this off?
The other issue is characters walking through each other. I want to make sure that I avoid this, but I'm not exactly sure how to do it.
- Kencho
- OGRE Retired Moderator

- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
Use a physics (or at least a collision) engine. Collision objects are invisible, as they're only existent in a virtual, mathemathic world (no representation in the "real" world). Almost all of the games you see out there work that way
And the adventure genre is one of them
I'm currently working on a couple of projects (a survival horror adventure and a beat 'em up), and I've just started implementing the basic scenario parts in the framework (some purpose reorientation: At first was intended to be open source, but I've decided to use them as portfolio games). So I can share my thoughts and ideas if you need them or find them useful.
I'm currently working on a couple of projects (a survival horror adventure and a beat 'em up), and I've just started implementing the basic scenario parts in the framework (some purpose reorientation: At first was intended to be open source, but I've decided to use them as portfolio games). So I can share my thoughts and ideas if you need them or find them useful.
- sevensevens
- Gnoblar
- Posts: 21
- Joined: Sat May 07, 2005 4:41 am
For collision detection, take a look at AxisAlignedBoxSceneQuery, SphereSceneQuery, and RaySceneQuery. Especially if you don't want physics support. It returns a list of world fragments (static stuff) and moveables (non-static stuff). Is this a point-and-click adventure engine, or does it use the 3rd person action/adventure navigation style?
-
sirSolarius
- Kobold
- Posts: 36
- Joined: Fri May 27, 2005 11:34 pm
3rd person, so I can't predefine paths like in the Monkey Island series, for example. I'd rather not use a physics engine and have to mess with masses and stuff...sevensevens wrote:For collision detection, take a look at AxisAlignedBoxSceneQuery, SphereSceneQuery, and RaySceneQuery. Especially if you don't want physics support. It returns a list of world fragments (static stuff) and moveables (non-static stuff). Is this a point-and-click adventure engine, or does it use the 3rd person action/adventure navigation style?
So basically I want to define a region that is walkable, but I don't know how to make sure that my character only travels on this walkable path, nor do I know a good way to represent it, since it may differ from the geometry of the level...
- sevensevens
- Gnoblar
- Posts: 21
- Joined: Sat May 07, 2005 4:41 am
-
Action Farsi
- Gnoblar
- Posts: 9
- Joined: Thu Mar 31, 2005 7:51 am
- Contact:
Just an idea..
create e class Zone in wich you define a walkable area (maybe with an array of rettangular zones (4 points)). then you have just to check if your character (1 point + radius) is in it. Using circle, it is also very simple to check collision between 2 characters (just check if distance is lesser then radius1+radius2).
It is a very 2d approach.
create e class Zone in wich you define a walkable area (maybe with an array of rettangular zones (4 points)). then you have just to check if your character (1 point + radius) is in it. Using circle, it is also very simple to check collision between 2 characters (just check if distance is lesser then radius1+radius2).
It is a very 2d approach.
