Author Topic: Purpose of collision detection  (Read 6028 times)

Offline abhi13feb

  • byte
  • *
  • Posts: 37
    • View Profile
Purpose of collision detection
« on: April 24, 2008, 07:31:18 am »
Can someone please let me know in detail,what is the purpose of collision detection in JPCTDemo example

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Purpose of collision detection
« Reply #1 on: April 24, 2008, 07:53:02 am »
The purpose is not to run into the geometry. To be honest, i don't understand your question!?

Offline abhi13feb

  • byte
  • *
  • Posts: 37
    • View Profile
Re: Purpose of collision detection
« Reply #2 on: April 24, 2008, 12:01:40 pm »
My question is...why do we carryout collision detection in JPCTDemo example

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Purpose of collision detection
« Reply #3 on: April 24, 2008, 12:23:20 pm »
I'm sorry, but what kind of question is that? Why? To not walk through the walls or fall through the floor.  ???

Offline fireside

  • double
  • *****
  • Posts: 607
    • View Profile
Re: Purpose of collision detection
« Reply #4 on: April 24, 2008, 03:39:20 pm »
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.
« Last Edit: April 24, 2008, 03:53:03 pm by fireside »
click here->Fireside 7 Games<-

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Purpose of collision detection
« Reply #5 on: April 24, 2008, 04:02:34 pm »
Maybe he is asking about a detailed walthrough the collition detection code.
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Purpose of collision detection
« Reply #6 on: April 24, 2008, 05:59:41 pm »
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.

Offline fireside

  • double
  • *****
  • Posts: 607
    • View Profile
Re: Purpose of collision detection
« Reply #7 on: April 25, 2008, 01:44:31 am »
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.
« Last Edit: April 25, 2008, 01:50:53 am by fireside »
click here->Fireside 7 Games<-