Author Topic: GW: Bloddy Camp  (Read 2153 times)

Offline Gatobot14

  • int
  • **
  • Posts: 64
    • View Profile
GW: Bloddy Camp
« on: August 26, 2015, 12:41:07 am »
Another game for the ludum dare 33 i made it under 3 days
if you want to play it go here http://gamejolt.com/games/gw-bloddy-camp/88550

Everything goes well with jpct but doing collision(Ellipsoid collision) really make things a bit slower
so i have to remove a few of them, it also didnt resolve well when the player an another entity
end up in the same place(weird things happend) .

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: GW: Bloddy Camp
« Reply #1 on: August 26, 2015, 01:08:12 pm »
Ellipsoid collision detection can't resolve existing collisions. It can only prevent them from happening in the first place. Existing collisions should be handled different (either with spherical collision detection as an additional step or with some simple distance check or whatever).
About your performance issues...how many checks did you do per frame and at which number of iterations?

Offline Gatobot14

  • int
  • **
  • Posts: 64
    • View Profile
Re: GW: Bloddy Camp
« Reply #2 on: August 26, 2015, 06:11:35 pm »
well for the ellipsoid collision i have 5 monsters, all of them moving with a collision depth of 2,
ok i undesrtand that ellipsoid  can't resolve existing collisions and is the only way ive been using
but could you explain more on this:
Quote
Existing collisions should be handled different (either with spherical collision detection as an additional step or with some simple distance check or whatever).

i would like to know because if the player gets in the same place of a monster they both collision and start to floating  ;D
for now i only move the monster if they are close to the player and everything works smooth

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: GW: Bloddy Camp
« Reply #3 on: August 26, 2015, 09:46:12 pm »
What you mean by "floating" in this case? Do they move up?

Offline Gatobot14

  • int
  • **
  • Posts: 64
    • View Profile
Re: GW: Bloddy Camp
« Reply #4 on: August 27, 2015, 12:25:10 am »
yes they go up to the sky

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: GW: Bloddy Camp
« Reply #5 on: September 06, 2015, 02:52:20 pm »
Sorry, I forgot about this question...it happens most likel, because your ellipsoid climbs up the polygon mesh of the collision target. You can try to work against it by setting the y-coordinate of the corrected translation to 0. But that usually leads to entities moving into each other. A better solution is to use a collision mesh like a cylinder instead of the actual polygon mesh. To do this, at such a collision mesh as a child to the actual mesh but make it in visible expect during the collision detection phase.

Offline Gatobot14

  • int
  • **
  • Posts: 64
    • View Profile
Re: GW: Bloddy Camp
« Reply #6 on: September 07, 2015, 11:27:26 pm »
instead of polygon mesh i already attached a ellipsoid from primitives class made of 16 polygons, the collision happens between the player ellipsoid and the enemy ellipsoid, also the ellipsoid its use for the collision avoidance.
I understand you that player can climb the enemy beacuse of the shape of the ellipsoid and the enemy ellipsoid its a bit smaller,
so using a cillinder will resolve most of the issue player vs enemy, and using a ellipsoid for collision avoidance,
could these be good??

im using a ellipsoid primitive because i think i will be good using with "checkCollisionEllipsoid"

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: GW: Bloddy Camp
« Reply #7 on: September 08, 2015, 08:17:16 am »
Yes, using a cyclinder instead sounds like a good idea. Either that or a box. It depends on the actual shape for your collision targets.

Offline Gatobot14

  • int
  • **
  • Posts: 64
    • View Profile
Re: GW: Bloddy Camp
« Reply #8 on: September 09, 2015, 08:11:13 pm »
ok just one last question(for educational purpose):  the shape used for collision does not have to match the methods in the api??
for example: you suggest using a cillinder, there should be a checkCollisionCillinder????
just wondering  ::)

i will try to fix my collision according to your advice
many thanks

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: GW: Bloddy Camp
« Reply #9 on: September 09, 2015, 08:45:04 pm »
ok just one last question(for educational purpose):  the shape used for collision does not have to match the methods in the api??
for example: you suggest using a cillinder, there should be a checkCollisionCillinder????
just wondering  ::)
No. The name of the method refers to the primitive used to approximate the collision source. The collision always happens primitive (like ray, sphere, ellipsoid) against mesh, which can be anything.