Jump to content
  • Advertisement
Sign in to follow this  

Making interiors (walk maps, bounding boxes?)

This topic is 4825 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi forum, I'm a newbie game maker and I was wondering how interiors are made. I thought there were several ways to go about this. The interiors I'm talking about are more than 1 storey buildings. 1) Walk maps with multiple layers a. Depending on what floor a player is in, the player will load a different walk map. b. The problem here is that it doesn't solve players "jumping out" windows, because a walk map is 2d top view. 2) A building made of bounding boxes a. This will be more processor intensive, but at least we're able to solve players jumping on things (like a table, or a through a window) b. The problem here is that we don't know to how to create these bounding boxes. This is where my major question comes in: is there a way to create them bounding boxes in a 3d program (where the building will be rendered?) This is where I got the idea: In Macromedia Flash, when you create a button, you draw the "up", "down", "over" and "hit" states. Up is when the mouse is not over the Hit. Down is when the user has clicked and keeps the mouse down on the Hit. Over is when the cursor is over the Hit. The "hit" then is the area that defines what is "hittable". I can draw a 5"x5" square but make the Hit area a 1"x1" star. I wanted to apply this to making buildings. I wanted to model a building with tables, shelves and all, and then manually create these bounding boxes, as a different file or different object that is loaded into the game to mimmick the "unhittable" areas. However, (I'm using Ogre) Ogre doesn't recognize 1 object with details bounding "box" - it'll get the extremity of the object and see it as a box (literally) itself. If I'm making theoritical sense, good, but if possible at all I understand that this can be processor intensive. How is this solved then in games? How would Splinter Cell for example make the player HAVE to crawl to go through a small hole in the wall? Does that mean that the whole level is made of bounding boxes? Thanks,

Share this post


Link to post
Share on other sites
Advertisement
Hi Marius,

You must be the admin from Zalsoft :) Thanks for replying. However, I did not see anything about walkmaps (and using several levels of them) in your program, but I will download the free version and see how it goes. It seems your program does so much more than just making different levels of walk maps, so it'll take some time to get used to it.

My major concern with walk maps is a player would need to be using several walk maps at a time (if possible at all). Let's say if a person is 6 feet tall, and the ceiling has beams that go to about 5 feet low. That means in some areas of the room, the person will have to duck but can still walk on the floor. This shows me that the player will have to be using different walk maps at a single time - one where is feet are, others throughout his body, one finally near the head, and the top of the head - and does Getic support that?

By your reply I gather that you change the walk map at certain points, entry or exit points, in the game. That I understand, but if it's one walk map at any time, it still doesn't solve the problem of a person not being able to walk through the window, but having to jump and crouch to go through the window.

Thanks,

Share this post


Link to post
Share on other sites
To make things clearer...

For example, how would Counter Strike determine whether you go under a bridge or on top of it? I know how to use height maps - that's simple enough with rolling hills because basically you can just put collision boxes in the trees, but when it comes to more-than-1-storey buildings I can't be following the height map nor the walk map of the land. I'll want to be able to jump on tables, go to the second floor, crouch under a chandelier but still be able to walk through (but if I stand tall I won't budge), or jump on a ledge and then jump off.

How do you guys do this?

Thanks,

Share this post


Link to post
Share on other sites
I don't know if this question is hard to answer or so easy that no one bothers.. Hehehe.. Anyone? :)

Share this post


Link to post
Share on other sites
Counter-Strike and Quake derived games use BSP for collision detection. Quake style BSP is nice because it gives you a well defined inside and outside of the world, and you can do ray-BSP checks very quickly. Quake 3 style collision detection.

However, the trend today is to just do checks against polygon soup (a bunch of "random" triangles.) LSS (line swept sphere) vs. triangle checks are pretty popular for this. There is source code for this around... Some on Flipcode, for example.

Of course, there are physics engines (ODE, Tokamak, Novodex)and collision engines (Opcode) that will do all of this for you, so you may want to check those out.

The 3D Math for game programmer's book, and Realtime collision detection, cover these things very comprehensively. Also, check out the Math and physics section, there is a lot of very good stuff on collision detection there. Just googling "collision detection" or "game collision detection" will give you tons of places to start with.

Important things to know if you're building your own collision system are spatial partitioning structures (BSP, quadtree, octree, kd-tree, etc.), intersection tests and methods (ray tracing, minkowski difference, SAT), and a little (or a lot of) physics for collision response.

Share this post


Link to post
Share on other sites
Impossible, thanks. The answer I was looking for: straight to the point. I will certainly do a lot of reading. Thanks again!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!