3D RPG Engine Question...

Started by
11 comments, last by Anachronism 22 years, 6 months ago
Hello, I started writing a game engine for a 3D RPG game, and have come across a couple of questions. MY 3D RPG will have a perspective similar to Brave Fencer Musashi for playstation, which is basically like a Zelda view, but 3D... (Not first person). I have designed the logic behind most of the game engine and how it will work, but I have run into one problem. And that is this... I want the character to be able to walk on multiple levels.. So along with width and depth while running around, there will be height. So you can run up some stairs, jump off a small cliff and fall until you hit the ground, things like that. The question is, what is the fastest way to determine if my character is standing on solid ground? (I''m doing this in OpenGL by the way)... The only method I was able to think of, was to search every single vertex and polygon on the screen, and find the polygon thats lines would enclose the player. Then I would test to see if that was directly below him, if not he would fall until it was directly below him. In that paticular case it would mean he stepped off a ledge, and there were no polygons that''s coordinates wrapped around the player, that was directly beneath him, so he would fall until he hit one. This method seems though like it would slow everything down quite a bit. Using this method, every time you moved the player just a little, it would do math on every vertex, on every polygon on the screen to find one under him to know if he was on ground, or in the air. Before I spend weeks implimenting this method only to find out it''s horribly slow, I would like to know if any of you have any better and quicker ideas, as I''m sure you do. I would appreciate any of your ideas. Thanks... Dennis...
Advertisement
Well, when you don''t use overhangs, you can pre-render a heightmap to be loaded with your level, and find the height of the current x, y location on it
Looks like you might want the OpenGL forum instead of Game Design.

--------------------
Just waiting for the mothership...
--------------------Just waiting for the mothership...
This isn't an OpenGL specific question, in fact it has nothing to do with Open GL... It's about game design. By asking the question to a wider audience I will have more people who are able to help... That's why I didn't originally post this in OpenGl... But thanks for your concern.

Dennis...

Edited by - anachronism on October 2, 2001 4:18:20 PM
Your question has to do with programming.. therefore, it goes in Game Programming or OpenGL.

I wish I had some advice but I really don''t.

"He who fights with monsters should look to it that he himself does not become a monster... when you gaze long into the abyss, the abyss also gazes into you..."~Friedrich Nietzsche
------------------------------Put THAT in your smoke and pipe it
Ronin_54 I appreciate your replay I see no reason why that wouldn''t work for my situation. I can''t believe how badly I was overcomplicating what I wanted to do... I''ll start implimenting that! Thanks.... I still welcome any suggestions anyone else might have...

Dennis...
Collision Detection? there is a lot of tutorials about that here, also you can do some simple things like:

Search for the Lower Vertex of your character (usually on the foot, this should be done at loading time) and store the Pointer, Index or whatever, and in the game whatch for collision between that vertex and the terrrain Vertexes, that should make faster your algorithm.

Solutions are always so easy that we don''t see them pass.
W-Buffer

quote:Original post by Malloc
Collision Detection? there is a lot of tutorials about that here, also you can do some simple things like:

Search for the Lower Vertex of your character (usually on the foot, this should be done at loading time) and store the Pointer, Index or whatever, and in the game whatch for collision between that vertex and the terrrain Vertexes, that should make faster your algorithm.

Solutions are always so easy that we don''t see them pass.
W-Buffer




Why would you search for the lowest vertex at loading
time , shouldnt this be done on every update of the
character (unless of coarse your characters dont
walk or run but shuffle instead!, and what if they go
arse over tit? they would fall throuch the solid floor).

If your using skeletal animation this could be done
by

Find lowest bone node
Find the lowest vertex associated with that bone node.

Hope it helps

Mark
Or you could use the Zelda-approach. The world is really flat but looks like it has height, and at all points where you wants someone to be able to fall down, you make a "jump", so that is the character walks there it will jump over the part wich looks like a wall, making it looking like he jumped "down"

Maybe not possible if you have an otherwise 3d world though...
Joke/dST
quote:Original post by joke_dst
Or you could use the Zelda-approach. The world is really flat but looks like it has height, and at all points where you wants someone to be able to fall down, you make a "jump", so that is the character walks there it will jump over the part wich looks like a wall, making it looking like he jumped "down"

Maybe not possible if you have an otherwise 3d world though...


Thanks for the reply. I need actual 3D for this project, because most of the puzzles in the game will be solved by rotating the camera around to see hidden objects and such. Thanks for the reply though...

Dennis...

This topic is closed to new replies.

Advertisement