Purpose of collision detection

Started by abhi13feb, April 24, 2008, 07:31:18 AM

Previous topic - Next topic

abhi13feb

Can someone please let me know in detail,what is the purpose of collision detection in JPCTDemo example

EgonOlsen

The purpose is not to run into the geometry. To be honest, i don't understand your question!?

abhi13feb

My question is...why do we carryout collision detection in JPCTDemo example

EgonOlsen

I'm sorry, but what kind of question is that? Why? To not walk through the walls or fall through the floor.  ???

fireside

#4
Maybe he means why isn't it automatic so you don't have to code it in.  There are several reasons.  It's expensive in computer time so it's left to the author to decide how it's done.  Some things might not need it, etc.  Sometimes you don't want it, like a ghost floating through walls.  Sometimes you want special things to happen rather than just, don't go through it.  There are some engines that have automatic collision detection.  The Blender Game engine, does.  It takes some study, etc, but it's not too bad once you get used to it.  Also, it increases the size of the library if it's automatic.  When you are doing something like an applet, that you want to load fast, you want minimum code.  JPCT does a large amount of things for the tiny file size.
click here->Fireside 7 Games<-

Melssj5

Maybe he is asking about a detailed walthrough the collition detection code.
Nada por ahora

EgonOlsen

Automatic collision detection makes no sense unless you limit the engine to one particular type like an indoor engine similar to Quake or something. A general purpose engine can only offer methods to do it. It's impossible to fit all needs with an automated one. You don't even have to use the build in caps but use an external physics engine or your own stuff if you want.

fireside

#7
Yes, the Blender game engine has bullet physics built in, but I don't think something like that is a good idea for JPCT, either.  Physics is nice for golf simulations but can get in the way of some games that only need collision.  A lot of weird things are different with physics, like going up stairs and things.  It's simple without physics but can be complex with it, you also tend to go down the stairs too fast and things and it's hard to rig a camera to act like it does in an fps.  That's what I found anyway, and a lot of people on the Blender game site said the same thing.
click here->Fireside 7 Games<-