News:

SMF - Just Installed!

PBAoE vs 360º Cone

Started by Redlynne, Oct 30, 2024, 05:01 PM

Previous topic - Next topic

Redlynne

This is largely a rhetorical question, but hopefully it will get some mental wheels turning for development staff.



What is the difference between a PBAoE and a 360º Cone?



A PBAoE is a Target AoE which has a Range of zero and a Radius of {insert value here}.
A Cone is a modified Target AoE, but one where the "range" is the Radius. The angle of the cone is hard coded into the database and cannot be modified.



One really big (huge, actually) distinction between PBAoEs and Cones (any arc size) is that Cones can have their range/radius modified by Range enhancement slotting ... while PBAoEs gain zero benefit from Range enhancement.

So in theory ... a "360º Cone" would effectively function exactly the same as a PBAoE "out of the box" (before slotting any enhancements) ... but a 360º Cone could slot Range enhancements to increase its RADIUS of effect, while the PBAoE could not, since the radius of a PBAoE is FIXED and does not modify with enhancement (unlike Cones).



I can think of a few PBAoE powers that would be drastically improved if they were converted from being PBAoE powers (that take PBAoE Damage Sets) into instead being 360º Cones, which if slotted for Range enhancement would increase their PBAoE Radius (because the power is an "omni-directional cone" rather than being a true PBAoE).

Which then begs the question, from a developer standpoint, is there an upper limit on the arc of Cones?
If 360º for a "Cone" is not an option, would 355º be possible (close enough as to make almost no difference in actual gameplay)?


Verbogeny is one of many pleasurettes afforded a creatific thinkerizer.

Joshex

#1
Well, I don't know City of heroes' cone system, so someone may have a brighter answer, but I do know general game design cones;

To accomplish a Cone in game development, you literally make a 3D End-Capped Cone mesh object and use it's polyheader shape as either a sensor (to detect enemies touching it(or inside it, which is why an end-cap is used), OR you set it up as a ghost actor with some property that enemies check for; and have enemies running their own hitrolls and appling damage to themselves based on the power cast and it's values.

so now you're talking Geometry to define the arc/angle of the cone. normally in a game changes to this are done by a simple scaling operation. but a cone fired forwards is essentially a rounded 3D triangle from a top view, no matter how you scale it it's still a triangle, if you scale it negative on the local forwards axis it wont have any forward geometry, it will just be a cone that fires backwards. if you scale it perpendicular to the forwards axis, it will become a wider cone, however there'd be at least a 45 degree gap to the sides of the cone but if you tried to bring the end cap of that cone closer to the player (by scaling on the local forwards axis) to get rid of that 45 degree gap or lessen it, then you're subtracting from forwards range,  and if you scale it to 0 on the local forwards axis, then a cone becomes a 2D circle (or halo) it has no forwards nor backwards geometry, just geometry to the sides and top and bottom.

Now some cones in game may fire from just behind the player to catch some enemies standing next to them in the cone collision bounds, providing a bit more safety for ranged users. (if it fired from their hand then enemies not in front of their hand would never be effected)

But if you want a scalable AoE, you'd plop in an 8 ring 8 segment UV sphere set to ghost, as the cone object centered on the player, then you can scale the sphere rather than a cone, anything that goes into the interior of the sphere (or touches it) will be detected by the sphere as colliding with it.

even in CoH not all AoE have the same size, Electrical_Melee.Thunder_Strike has a much smaller sphere than Electrical_Melee.Lightning_Rod.

Also if you want to save polygons and dont care about it being a true sphere, you can just use an endcapped cylinder top to bottom on the global up and down axis at a scale of the desired AoE. but because this game has fliers that's not suggested; as the 3D corner hypotenuse( center of cylinder to edge of endcap) would be much longer than the AoE radius. then you'd get complaints "that AoE only has a range of 16!, but I'm at 20 up in the air at 45 degrees from it and it's hitting me!"

However some AoE are best done as cylinders; Water_Control.Geyser_Burst and Electrical_Melee.Lightning_Rod in example.

Not all AoE are 3D, some AoE Fields are flat circles on the ground. you literally have to step on them not fly over them to be effected.
Ye cannie be dividin by zero! However, ye can be dividing 0.0 by a non-zero! that'd be a float.
always Decimal(str(your float)) before you int( your float).