WTFeature: Capture Speed

WTFeature: Capture Speed

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

WTFeature: Capture Speed

Post by lurker »

Should this arbitrary math on capture speed be kept or purged?
captureProgressTemp = captureProgress + 1.0f / (150 + buildTime / captureSpeed * (health + maxHealth) / maxHealth*0.4f);
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: WTFeature: Capture Speed

Post by Pxtl »

O_o

That sure is a lot of random constants. I mean, I could see wanting to include (current-health/max-health) and the unit cost (build time???) in the formula, but that's just... wtf? Where the hell does that 150 come from?

Reformatting to sane:

captureProgress + 1 / [150 + 0.4 * (1 + health/max) / capturespeed]

whiskey tango foxtrot.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: WTFeature: Capture Speed

Post by Argh »

Should this arbitrary math on capture speed be kept or purged?
Purged!

Even though it will screw up P.U.R.E.'s gameplay until it's adjusted to take that into account. I doubt most other games will even notice if it changes. It should just be a straight trade between the capturespeed and maxhealth, always, imho.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: WTFeature: Capture Speed

Post by Pxtl »

I'm curious about what the intent of capture-time is? Should it be dependant on the current health? Personally, I'd think it would be cool if it were easier to capture damaged units, but that's just me.

Or will it be handled the same as other systems, where you must capture the full maximum health of the unit?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: WTFeature: Capture Speed

Post by Tobi »

Pxtl wrote:Reformatting to sane:

captureProgress + 1 / [150 + 0.4 * buildTime * (1 + health/max) / capturespeed]

whiskey tango foxtrot.
Fixed.
el_matarife
Posts: 933
Joined: 27 Feb 2006, 02:04

Re: WTFeature: Capture Speed

Post by el_matarife »

Make it accessible through Lua API or let the constants be set by the mod in some other way.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: WTFeature: Capture Speed

Post by zwzsg »

Keep but let it be configurable modwise by some FBI tag.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: WTFeature: Capture Speed

Post by lurker »

There's going to be a new lua callin in case any mod wants to implement inane behavior. I'd say no to configuration tags. It's either in or it's out, maybe with a tag to turn it on and off, but no more.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: WTFeature: Capture Speed

Post by Licho »

I already requested similar madness to be removed from feature reclaim.
Such random things with arbitrary constants should not be in generic engine imo.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: WTFeature: Capture Speed

Post by REVENGE »

el_matarife wrote:Make it accessible through Lua API or let the constants be set by the mod in some other way.
Technically you can already implement your own capture system via lua (ie my capture gun).

What I'd like to see is some option for including capture progress decay, although technically you could probably write a gadget to diy.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: WTFeature: Capture Speed

Post by lurker »

zwzsg, why do you want it kept?
Does anyone else want it kept?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: WTFeature: Capture Speed

Post by zwzsg »

Just because I'm concerned that it might break some unmaintened mod, somewhere, somehow, and no one would know nor care about it.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: WTFeature: Capture Speed

Post by imbaczek »

price of progress.

imho get rid of it, replace with something sane, add AllowCapture/Repair/Reclaim/ConstructionStep, deprecate AllowBuildStep.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: WTFeature: Capture Speed

Post by lurker »

Already have more calls there that mostly done, but why split up Build into two parts?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: WTFeature: Capture Speed

Post by imbaczek »

because when the other calls are in place, AllowBuildStep should either change it's semantics or be redundant (if it does what i think it does, ie. works both on build and repair.)
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: WTFeature: Capture Speed

Post by lurker »

It's only for build and unbuild (reclaim). There would be a new one for repair. Unless I'm missing an execution path, but then the 'part' var that says what fraction of the unit doesn't make sense.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: WTFeature: Capture Speed

Post by imbaczek »

ah yes, build and reclaim. those should be separated anyway imho.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: WTFeature: Capture Speed

Post by Pxtl »

zwzsg wrote:Just because I'm concerned that it might break some unmaintened mod, somewhere, somehow, and no one would know nor care about it.
As long as it's replaced with _some_ reasonably sane susbstitute, I'd say ditch it in favour of a more logical formula. I mean, there are lots of unmaintained mods, but I'm quite sure that none of them have extremely specific ideas about how long the capture process should take. In fact, the reverse case is more likely - that these forgotten mods have absurdly short or absurdly long capture times for a handful of units, with players totally unaware of this quirk.

Are there any mods other than CA that even make extensive use of the Capture command?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: WTFeature: Capture Speed

Post by zwzsg »

imbaczek wrote:price of progress
Progress somewhat involve the idea of getting better, no? Not just getting different, break everything around you, and introduce a dozen bugs for good measure. I mean, sometimes I feel Spring is devolving, not progressing.

But for the particular point of capture speed, I'm with Pxtl (minus the CA plug.)
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: WTFeature: Capture Speed

Post by Tobi »

The fact you are sometimes unable to see the progress does not mean it isn't there.
Post Reply

Return to “Engine”