Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Bug Small shield radius  (Read 3402 times)

dmaiski

  • Captain
  • ****
  • Posts: 422
  • resistance is futile
    • View Profile
Bug Small shield radius
« on: November 21, 2013, 05:22:24 PM »

when:
shield radius<colision radius
colision radius=shield radius
so the ship becomes a non coliding ghost
fix it!!!
Logged
BISO
(WIP) lots of shiny new weapons ( :-[ i have more weapons then sprites :-[ )

i got a cat pad
its like a mouse pad but better!

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24112
    • View Profile
Re: Bug Small shield radius
« Reply #1 on: November 21, 2013, 05:47:04 PM »

Could you explain what you mean? The two things you've said appear contradictory.
Logged

dmaiski

  • Captain
  • ****
  • Posts: 422
  • resistance is futile
    • View Profile
Re: Bug Small shield radius
« Reply #2 on: November 21, 2013, 05:54:00 PM »

when you set shield radius to X and turn on the shield
the ships colision radius is also switched to X and the ship becomes non-coliding and buggy

ie.  
when shield is on
colision radius=shield radius

this cuases problems when
shield radius<colision radius

and by problems i mean major bugs... the whole platheora of bugs that you get with colision radii that are smalled then ship sprite
« Last Edit: November 21, 2013, 05:56:12 PM by dmaiski »
Logged
BISO
(WIP) lots of shiny new weapons ( :-[ i have more weapons then sprites :-[ )

i got a cat pad
its like a mouse pad but better!

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7209
  • Harpoon Affectionado
    • View Profile
Re: Bug Small shield radius
« Reply #3 on: November 21, 2013, 06:46:27 PM »

I don't think this is possible - not only that, but why would you want it to happen? Shields on the inside of the hull?

The collision radius is used as a first order fast (circles have very fast collision testing) test. If this comes out positive then the other collision checks are done. The whole point of a collision radius is for it to be bigger than then things it encloses.

Also... its a little rude to point out something without explaining and yell fix it  :-\
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24112
    • View Profile
Re: Bug Small shield radius
« Reply #4 on: November 21, 2013, 07:02:26 PM »

Ah, I see - right, this isn't a bug. The collision radius is supposed to enclose both the ship bounds and the area its shield covers. That's pretty much the point of having a collision radius in the first place.
Logged

dmaiski

  • Captain
  • ****
  • Posts: 422
  • resistance is futile
    • View Profile
Re: Bug Small shield radius
« Reply #5 on: November 21, 2013, 11:25:06 PM »

but the colision radius in this case is not enclosing the ship bounds at all... ill make picture in sec


a ship with a small shield radius, shiled is on, bulets and missiles do not hit the ships hull
when shield is off colision behaviour normal
(127 colision radius, 27 shield radius)

bug... go try it yourself works on any ship
« Last Edit: November 21, 2013, 11:59:20 PM by dmaiski »
Logged
BISO
(WIP) lots of shiny new weapons ( :-[ i have more weapons then sprites :-[ )

i got a cat pad
its like a mouse pad but better!

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24112
    • View Profile
Re: Bug Small shield radius
« Reply #6 on: November 22, 2013, 07:47:03 AM »

Aha, I finally see exactly what you mean; misinterpreted it a bit, my bad. Still not a bug, though - rather, just how the engine works. The shield needs to enclose the full collision bounds of the ship in order for things to work properly.
Logged

Obscure

  • Ensign
  • *
  • Posts: 40
    • View Profile
Re: Bug Small shield radius
« Reply #7 on: November 22, 2013, 10:05:06 AM »

What Alex is trying to say is that the game is not going to keep track of a shield collision radius, a ship collision radius, and a hull collision shape all at the same time. this is a lot of collision checks to handle, and will slow down the system to a crawl.

changing this would require reworking the collision system.
Logged

dmaiski

  • Captain
  • ****
  • Posts: 422
  • resistance is futile
    • View Profile
Re: Bug Small shield radius
« Reply #8 on: November 22, 2013, 10:32:17 AM »

What Alex is trying to say is that the game is not going to keep track of a shield collision radius, a ship collision radius, and a hull collision shape all at the same time. this is a lot of collision checks to handle, and will slow down the system to a crawl.

changing this would require reworking the collision system.
Spoiler
you do know that all you need to do to keep track of solision checks for shield and colision radius is:

ProLoc=Object.getLocation
ShipLoc=ship.getLocation
if (getDistance(ShipLoc,ProLoc)<colisionrad) {do x...}
if (getDistance(ShipLoc,ProLoc)<shieldrad) {do y...}
also it is ALWAYS doing hull collision checks when shield is larger then ship hull
simply put the shield/colision radii checks have no significant cost in terms of operations that have to be done

so i must ask what drugs you are on...
[close]
shameless noob bash


@Alex
could you still fix it for next version
plz plz plz plz!!!! i have things that need this to work in neato ways(mostly involves systems that are slaved to shield status/behaviour for their AI)
« Last Edit: November 22, 2013, 10:44:43 AM by dmaiski »
Logged
BISO
(WIP) lots of shiny new weapons ( :-[ i have more weapons then sprites :-[ )

i got a cat pad
its like a mouse pad but better!

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24112
    • View Profile
Re: Bug Small shield radius
« Reply #9 on: November 22, 2013, 11:30:23 AM »

That's... extremely rude. Please try to be more civil; consider this a warning.

There's nothing to "fix"; it's working the way it's supposed to work. Shields that have a radius that doesn't include the entirety of the ship are not supported by the engine.
Logged