Custom Hitsphere Testing - Help Required

Custom Hitsphere Testing - Help Required

Classic game design, maintained to please you...

Moderator: Content Developer

Post Reply
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Custom Hitsphere Testing - Help Required

Post by TheFatController »

I'm looking to create a mutator with tighter hitspheres for all units to see how it plays and it's a fairly laborious process so I'm posting to see if:
a) anyone wants to help
b) anyone can think of a faster method to what i'm doing

Essentially the result will be that instead of having massive spheres units would have hitboxes proportional to their model, eg:
Image

My current process for this is:

1) Paste this code into the bottom of the units fbi file:

Code: Select all

  collisionVolumeOffsets=0.0 0.0 0.0;
  collisionVolumeScales=20.0 25.0 15.0;
  collisionVolumeType=box;
2) Tweak the sizes based on guesswork
3) Load spring, /cheat, /give unit
4) Hit Alt-B to see the hitbox
5) Note how much it needs adjusting and return to step 2 until the hitbox looks okay

So if anyone wants to help do a few units (I've already done t1 kbots) please post the unitdef names and the code for the hitbox here, otherwise as I said above if anyone can enlighten me as to a faster way of doing this i'd be grateful :)

Note: this is not a change going straight into BA so please keep rage to a minimum
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Custom Hitsphere Testing - Help Required

Post by REVENGE »

Sounds like a great idea, but do you want this done and handed back to you, or directly hosted and played as a mutator?
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Custom Hitsphere Testing - Help Required

Post by TheFatController »

REVENGE wrote:Sounds like a great idea, but do you want this done and handed back to you, or directly hosted and played as a mutator?
Well, the codes will be publicly available and free for anyone to use. I would be interested in releasing a mutator and will give this an officialish name and would hope people give it a go to see how it plays.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Custom Hitsphere Testing - Help Required

Post by hoijui »

side-note:
i do not know how much of an influence this would have in practice, but collision detection is cheapest with spheres. so maybe it would be good if you have a test game with lots of T1 units (the ones you already converted) shooting at each other, to see if there is a noticeable performance loss.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Custom Hitsphere Testing - Help Required

Post by Gota »

You can take many from XTA.
It has adjusted almost all the hit-boxes for all the units.
Not really sure though how heavy it is on the proc cause XTA usually has less units and it also uses tons and tons more particles so I was never sure Why the bigger games slowed down.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Custom Hitsphere Testing - Help Required

Post by Beherith »

Do Collisionvolumescales mean the length of the edges of the box?
Where does offset start? at 0,0,0?
if it starts at 0,0,0, why does a Y scale of 20 cause box to end at ground level?

Please elaborate on this so i can help you. (cause i already have 3do loading done)
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Custom Hitsphere Testing - Help Required

Post by TheFatController »

hoijui wrote:side-note:
i do not know how much of an influence this would have in practice, but collision detection is cheapest with spheres. so maybe it would be good if you have a test game with lots of T1 units (the ones you already converted) shooting at each other, to see if there is a noticeable performance loss.
That's interesting I knew there'd be a difference but had figured rectangles would also pretty cheap, is there any way of comparing the difference other than live testing like that?

BA Chicken defense chickens do use custom rectangle hitboxes and they seem to be okay lagwise.
User avatar
Hobo Joe
Posts: 1001
Joined: 02 Jan 2008, 21:55

Re: Custom Hitsphere Testing - Help Required

Post by Hobo Joe »

hoijui wrote:side-note:
i do not know how much of an influence this would have in practice, but collision detection is cheapest with spheres. so maybe it would be good if you have a test game with lots of T1 units (the ones you already converted) shooting at each other, to see if there is a noticeable performance loss.
How do they run faster? It seems to me that they would be more expensive simply due to more faces and thus more calculations(or so it would seem)
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: Custom Hitsphere Testing - Help Required

Post by thesleepless »

Hobo Joe wrote:How do they run faster? It seems to me that they would be more expensive simply due to more faces and thus more calculations(or so it would seem)
With a sphere you just have to calculate the distance from the origin.

With a box you need to test 6 planes.
User avatar
Hobo Joe
Posts: 1001
Joined: 02 Jan 2008, 21:55

Re: Custom Hitsphere Testing - Help Required

Post by Hobo Joe »

thesleepless wrote:
Hobo Joe wrote:How do they run faster? It seems to me that they would be more expensive simply due to more faces and thus more calculations(or so it would seem)
With a sphere you just have to calculate the distance from the origin.

With a box you need to test 6 planes.
That makes sense. I was thinking of it in terms of the way it shows up in debug mode, as polygons.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Custom Hitsphere Testing - Help Required

Post by TradeMark »

Great, ive wanted to change the HLT hitsphere into a cylinder for a long time. There is a cylinder hitbox, right?

What kind of list of possible hitboxes we have now? A list of most efficient to slowest would be great. Heres what i think: Sphere, Cylinder, Box.

Sphere should be used in most cases though, basically for ALL small units. and not for big units like krogs which are tall.

Cylinder would be great for most defense units like LLT, HLT etc.

Box only if you have wide but thin objects where sphere or cylindre would leave a lot of empty space. I dont think we need box hitbox in BA... maybe for labs only, aircraft plant, shipyard, etc.
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: Custom Hitsphere Testing - Help Required

Post by JohannesH »

Also if someone wants to rage about hitsphere changes affecting balance, rage at engine devs rather than this, they changed the way they are calculated for some reason - if you like the old hitspheres this is very probably an improvement to what the engine has in that regard.

Atm llts cant shoot over core solars for example, jeffy can come and hide behind a mex from llt much easier, probably easier to hit with dgun, stumpies cant shoot over each other like they used to, etc.

So unless someone can convince an engine dev to fix it back, imo this should be included to BA asap.
Post Reply

Return to “Balanced Annihilation”