Jump to content

  • Log In with Google      Sign In   
  • Create Account


3D RPG Engine Question...


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
12 replies to this topic

#1 Anachronism   Members   -  Reputation: 120

Like
Likes
Like

Posted 02 October 2001 - 08:34 AM

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...

Sponsor:

#2 Ronin_54   Members   -  Reputation: 122

Like
Likes
Like

Posted 02 October 2001 - 08:44 AM

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

#3 Wavinator   Moderators   -  Reputation: 1707

Like
Likes
Like

Posted 02 October 2001 - 09:05 AM

Looks like you might want the OpenGL forum instead of Game Design.

--------------------
Just waiting for the mothership...

#4 Anachronism   Members   -  Reputation: 120

Like
Likes
Like

Posted 02 October 2001 - 09:11 AM

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

#5 Drizzt DoUrden   Members   -  Reputation: 100

Like
Likes
Like

Posted 02 October 2001 - 09:25 AM

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

#6 Anachronism   Members   -  Reputation: 120

Like
Likes
Like

Posted 02 October 2001 - 10:27 AM

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...

#7 Malloc   Members   -  Reputation: 122

Like
Likes
Like

Posted 02 October 2001 - 06:25 PM

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



#8 MButchers   Members   -  Reputation: 123

Like
Likes
Like

Posted 02 October 2001 - 11:31 PM

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

#9 joke_dst   Members   -  Reputation: 122

Like
Likes
Like

Posted 05 October 2001 - 12:05 AM

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...

#10 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 05 October 2001 - 02:13 AM

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...



#11 Ronin_54   Members   -  Reputation: 122

Like
Likes
Like

Posted 05 October 2001 - 09:24 AM

Well, I''d still advice the heightmap in your situation... Calculating the vertex height and the lowest vertex of the character sounds... well... over complicated to me.

Off course, it''s the best use when you''ve got overhangs and such, but wouldn''t a heightmap work a million times faster? (does require more memory though... hmmm...)

#12 naos   Members   -  Reputation: 122

Like
Likes
Like

Posted 07 October 2001 - 06:21 AM

Just an idea...

couldnt you associate a value to say your characters feet and calculate if their on a pixel every time you move?

If their are pixels under the characters feet he stays on top of the ground... if their isnt then he falls until he encounters pixels, or the character dies...

-Ian

#13 Ronin_54   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 October 2001 - 10:40 PM

That might work for 2d... But with a 3d-engine, you can''t simply check the pixels, ''cause you also got depth...




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS