carrier + shield

A place to post suggestions for new features, new bugs, and comments about the existing code.
Post Reply
madpeople
Posts: 4787
Joined: Tue Dec 16, 2003 8:00 am
Location: England

Post by madpeople »

if a carrier launches with its shield up, people can dock at it, until the shield regens (e.g. after being un-mounted and re-mounted, and i assume after it has been damaged too).

at which point people trying to dock will bounce off the oval shield surrounding the ship, when previously they could fly through it.

perhaps the game only tries to calculate collisions with a shield after it has been damaged to reduce computations?

i think there should be a core flag to dictate which behaviour to use:
allow ships to dock with shields up (allow friendlies through shields) / require shields to be down for friendlies to dock (doesn't allow friendlies through shields)

to allow core devs to choose on a ship by ship basis
madpeople wrote:QUOTE (madpeople @ Apr 20 2008, 11:27 PM) yes, you are right... but you are also wrong.

i just tested this offline.

i launched a carrier with shields mounted.

i could dock an int in it,
i could dock a (shielded) scout in it.

easy, no problems, the carriers CVH box matched it's model very closley.

i un-mounted the carriers shield.

i could dock at it still

i re-mounted the shield

i docked at the carrier again, but this time i heard a bang of a collision just before i docked, when i was nowhere near it's model, when i came out the other side i was now above the carrier, not where you usually exit from.

i tried to dock again, this time i bounced off a invisible oval shield (the carreir's shield!) a few times, but i managed to dock (probably lick perhaps that i managed to hit the door before it realised i had crashed into the shield / where it was a bit closer to the edge of the shield?
i was then un-able to dock again after that.

i didn't test launching a carrier, not un-mounting the shields, flying through an aleph or ripping, then trying to dock at it.

but it appears, if you un-mount your shields, don't re-mount them.

i also don't know what happens if you don't un-mount them but they take damage and then regenerate.

but it appears if you un-mount them then mount them, then you crash into the shield and docking becomes nearly impossible.

i don't know if it was the re-mounting, or the fact the shield was regenerating / had regenerated that did it, that would need further testing by having an enemy damage the carriers shield, then someone trying to dock at it. but someone else can test that.

this could be considered a bug.
i quite like thetactical decision of lower shields to allow people to dock aspect.
perhaps needs a core flag to dictate whether things can dock with shields up or not.

anyway, if people ask you to lower your shields because they can't dock, then you should lower them.

p.s. does the size of the shield oval relate to it's strength (shield oval is bigger when full, and shrinks as it takes damage / grows as it regens?) i seem to remember thinking it was.
it could explain why i could dock just after mounting it, but then had more trouble the longer it was left.
Paradigm2 wrote:QUOTE (Paradigm2 @ Apr 21 2008, 02:19 AM) MadP, in the game people had no trouble docking at my carrier until after a shield Regen, as you predicted.

They ceased to have trouble right after i unmounted the shield.
p.s. am i right in thinking the shield oval's size is proportional to shield strength? (does it shrink into the ship as it takes damage, and expands as it regens?)
Weylin
Posts: 669
Joined: Fri Mar 17, 2006 8:00 am

Post by Weylin »

So the shield collision area doesnt initiate on launch...

Interesting...



Whole problem with unmounting a shield is how vulnerable it leaves the ship, and the time required to have it recharge.
Tkela
Posts: 50
Joined: Thu Feb 05, 2004 8:00 am

Post by Tkela »

Weylin wrote:QUOTE (Weylin @ Apr 22 2008, 05:20 PM) So the shield collision area doesnt initiate on launch...

Interesting...
Whole problem with unmounting a shield is how vulnerable it leaves the ship, and the time required to have it recharge.
There may be a bug in the code for when ships are launched. Theoretically, the shield will set the shape of a ship to ellipse/its convex hull when the shield crosses a certain threshold but I don't know whether a ship launched with 100% shields will have its shape (correctly) set to ellipse or not. See the m_ship->GetHitTest()->SetShape(c_htsEllipse); call in shieldIGC.h.

As far as carriers go, they were never intended to have shields so I could problems (dependin carrier shape & landing bay geometry) with ships bouncing off the sshields. There are extensions in place in the collision detection code to allow a ship to ignore the shields of another ship (see they way ships & stations set their TrueShapeSelf/TrueShapeOther). This is effectively a no-op at the moment since stations always their convex hulls but it could be extended to carriers. You will need to modify utility/hittest.cpp here:

Code: Select all

        HitTestShape    htsA = phtHullA->m_shape;
        HitTestShape    htsB = ((phtHullB->m_pvUseTrueShapeSelf == NULL) ||
                                (phtHullB->m_pvUseTrueShapeSelf != phtHullA->m_pvUseTrueShapeOther)) ? phtHullB->m_shape : phtHullB->m_shapeTrue;
so that htsA uses logic similar to htsB to decide what shape to use.

Note also that you might run into problems with a ship hanging around inside a carrier's shield and shooting (or trying to shoot: I've forgotten how the collision code will handle that situation), which might be a little annoying.
juckto
Posts: 2332
Joined: Sat Jul 30, 2005 7:00 am
Location: NZ

Post by juckto »

huh. I always thought this bug was a myth created by people who suck at docking.
Image
Usually though, "skill" is used to covertly mean "match the game exactly to my level of competence." Anyone who is at all worse than me should fail utterly (and humorously!) and anyone better is clearly too caught up in the game and their opinions shouldn't count.
spliffyhat
Posts: 1432
Joined: Wed Oct 19, 2005 7:00 am
Location: Pandora
Contact:

Post by spliffyhat »

Tkela Nice Avatar /wub.gif" style="vertical-align:middle" emoid=":iluv:" border="0" alt="wub.gif" />


Last edited by spliffyhat on Sun Jul 13, 2008 10:36 am, edited 1 time in total.
ImageImageZgArt
BSBLSMSAGWYOOTUIARTS...................................Official Finger Exerciser®...........................Official Zone Game Artist®
Post Reply