Close combat units

Close combat units

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
hangyaoy
Posts: 4
Joined: 27 Jul 2016, 11:33

Close combat units

Post by hangyaoy » 18 Oct 2019, 23:57

Sorry for trivial question.

Can I create close combat units in spring engine?
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10239
Joined: 24 Jan 2006, 21:12

Re: Close combat units

Post by PicassoCT » 19 Oct 2019, 05:00

Yes, but animations are difficult

To elaborate more in depth. Spring provides no adhoc physical simulation for "real" close combat, cause nobody can do that reliable.

Most rtses use instant hits.
Animations are either broad (huge swing, generic hit animation), allowing for units to be still free moving. Or coupled animations, where one unit basically transports the other during engsgements(Finnish moves in dawn of war).

A third option in theory was to have kinemTiks for the units run on a gpu and have real ragdoll physix per unit.

Did not see that anywhere yet.

Close Combat has priority for me though. All the visually appealing combat in cinema is either close combat or close ups ob Ranged Combat. We didn't venture into the savannah for artillery duels.
0 x

User avatar
ThinkSome
Posts: 292
Joined: 14 Jun 2015, 13:36

Re: Close combat units

Post by ThinkSome » 24 Oct 2019, 20:15

The Cursed has them.
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10239
Joined: 24 Jan 2006, 21:12

Re: Close combat units

Post by PicassoCT » 24 Oct 2019, 22:12

Cursed them for their sudden but inevitable betrial
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14606
Joined: 17 Nov 2005, 02:43

Re: Close combat units

Post by Forboding Angel » 25 Oct 2019, 02:07

Invisible lasers work well for this.
0 x

User avatar
azaremoth
Cursed Developer
Posts: 538
Joined: 17 Feb 2005, 22:05

Re: Close combat units

Post by azaremoth » 25 Oct 2019, 08:35

I did use invisible Cannon type weapons in the Cursed. That also works nicely.
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10239
Joined: 24 Jan 2006, 21:12

Re: Close combat units

Post by PicassoCT » 25 Oct 2019, 09:09

If you want to get drastic, both types should work.

Spring.GetUnitLastAttackedPiece

Should give you the last attacked piece, and if you follow the piecemap down recursively allow you to sever arms, heads and legs. Plausible animation afterwards might be difficult.

Ps, you can e en drop limbs to the floor. Just reverse all unit rotations from root up to the limb and then treat it like aphysim
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14606
Joined: 17 Nov 2005, 02:43

Re: Close combat units

Post by Forboding Angel » 27 Oct 2019, 11:08

Honestly not really needed. You can use hitbyprojectile or whatever it's called and have sparks, blood, oil, etc fly when the unit is hit.

I would say invisible lasers is better because no possible drop and they don't suddenly just not hit if you give them insane velocity (like cannons).

Technically we have a hitscan weapontype, but it's garbage.
0 x

hangyaoy
Posts: 4
Joined: 27 Jul 2016, 11:33

Re: Close combat units

Post by hangyaoy » 11 Dec 2019, 20:37

Thank you for the answers.

I don't want physical simulation. I'm perfectly happy with an RPG like instant hit. Random damege between min and max SP or missing, based on attack / defence.

But if I understand good. There is no close combat unit implemented.
I can create a very short range invisible cannon or laser, and I have constant dps. (local weaponDefs=...) Wich isn't realy bad, this would do for now.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14606
Joined: 17 Nov 2005, 02:43

Re: Close combat units

Post by Forboding Angel » 12 Dec 2019, 00:36

Technically the only difference between spring and any other engine is that we don't really have a hitscan weapon that is worth a crap, but an invisible laser or cannon projectile that is super close range with say 10k velocity is effectively hitscan. As a result, there never has been much of a push for hitscan weapons.

That said, personally I can think of a bunch of scenarios where my life would have been easier with a hitscan weapontype.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14606
Joined: 17 Nov 2005, 02:43

Re: Close combat units

Post by Forboding Angel » 12 Dec 2019, 00:44

I mantised a feature request for it:
https://springrts.com/mantis/view.php?id=6354

I wouldn't necessarily hold my breath for it to happen, but I can think of multiple situations to where I would find it useful.
1 x

Google_Frog
Moderator
Posts: 2442
Joined: 12 Oct 2007, 09:24

Re: Close combat units

Post by Google_Frog » 13 Dec 2019, 01:28

Technically the only difference between spring and any other engine is that we don't really have a hitscan weapon that is worth a crap, but an invisible laser or cannon projectile that is super close range with say 10k velocity is effectively hitscan. As a result, there never has been much of a push for hitscan weapons.
I disagree, based on my understanding of the definition of hitscan. An invisible laser with a properly set up LUS and appropriate parameters is exactly an instant raytrace damage type, ie a hitscan. You have control over what it hits with tags like collideEnemy.

I think you're requesting a weapon that instantly damages a target in range regardless of raytracing checks. This could be useful, since changing the range of BeamLaser to non-spherical is tricky. That said, I have messed around with making agile melee units with BeamLaser, and have never had problems.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14606
Joined: 17 Nov 2005, 02:43

Re: Close combat units

Post by Forboding Angel » 13 Dec 2019, 03:25

Well, as I said earlier and in my request, lasers also will sometimes not impact the target, even if it is inside their range. The faster the laser, the more erratic the behavior you end up with. Even with the tag enabled that does the extra checking. With a stupid fast laser, it's somewhat unreliable, therefore a hitscan weapon is desirable. Additionally, it's useful for things where you want instant effects, like spellcasters as an example.

I requested the ability to have it hit, ignoring terrain, which would especially be useful for spellcaster units so that the spell can be cast wherever you like and you don't have to worry about whether you have LOS on the target area.

In my request I requested that it be possible to define a hitceg like we have for other weapons. Firing animations are all triggered in the script anyway so those aren't a concern.
I think you're requesting a weapon that instantly damages a target in range regardless of raytracing checks.
This is the definition of a hitscan weapon, yes.



There more serious thought I put into a hitscan weapon, the more I see it's usefulness and utilitarian purposes.
0 x

Google_Frog
Moderator
Posts: 2442
Joined: 12 Oct 2007, 09:24

Re: Close combat units

Post by Google_Frog » 14 Dec 2019, 00:50

I think you're requesting a weapon that instantly damages a target in range regardless of raytracing checks.
https://en.wikipedia.org/wiki/Hitscan
A hitscan in computer games, most commonly in first person shooters, is where the programming system determines where the gun/ object is pointing, casts out a ray in that direction when shot, for a certain range programmed into the system, and see if that ray comes in contact with any object in the line of fire. Hit scan is a term that could also be classified as “hit instantly” because it instantly hits the target when shot.
I don't disagree that what you are describing sounds like a useful feature, I just think it is important to get the name right when requesting the addition of a named entity to the engine. Every definition of hitscan I have found refers to raytraces, which makes BeamLaser a suitable replacement. If a new game or engine dev sees a weapon type named HitScan, then I would expect them to think it involves raytracing. I'd call what you are requesting something like NoTest or InstantHit.

It also sounds like you have been trying to implement instant weapons with a LaserCannon. Of course, LaserCannon will miss since it has speed, for now you should use BeamLaser instead. I do not know of a relatively lua-free ways to make a spellcaster that instantly casts a spell at a point. You can make a BeamLaser aim through and ignore terrain, allies, and enemies, but then the projectile would not explode.
0 x

Post Reply

Return to “Game Development”

cron