Unvanquished / gameplay

Issue tracker for Unvanquished gameplay related feedback, ideas and suggestions
0 stars 1 forks source link

Use varying stepsizes for classes #21

Open ghost opened 2 years ago

ghost commented 2 years ago

Currently, the game #define STEPSIZE 16 and this value is used for all classes, whatever the size.

I think it would be nice to be able to modify this value on a per-class basis.

For example, tyrants have a height of 92, dretches of 30 (talking about the BBoxes here). This means that a tyrant can't move it's legs upper than half a dretch. Considering the fact classes have both a mins and maxs parameter, that I understand as representing the "belt level", I would make STEPSIZE depend on the mins level, say, 50% (seems ok for human, maybe even too much, look at your leg... and it is currently at 66%).

Considering various armors (classes, actually) could have different flexibility, if would still be good to allow to specify it differently, otherwise tyrants would have only 11 (which is worst than current 16).

This would, though, have a direct impact on navmesh generation.

necessarily-equal commented 2 years ago

On principle, why not, but I don't think this brings much benefit. Implementing this, however would need quite some work and we would need to redo many maps and loose backward compat, unless we have stepsize = max(16, {calculation you suggested}).

ghost commented 2 years ago

you mean, stepsize = min( 16, foo );, so that 16 would still be the minimum and maps not broken. Maybe other calculation would be used, though, since indeed, changing stepsize will break AI if it's reduced (but only AI as humans are able to understand they need to jump).

In any case, the calculation was just an example (bad one?). The feature in itself seems interesting, and it would lead to less navigation problems for the bigger aliens (as I said, dretches are 30 units high. Look at tyrant's animation, and tell me they, of course, have a stepsize of 16...).

necessarily-equal commented 2 years ago

I think I mean max(16, foo). A tyrant with a higher stepsize sounds more useful indeed.

ghost commented 2 years ago

max( 16, foo ) means that 16 would be the maximum stepsize, which is the current value, and which feels pretty ridiculous for big aliens. Still using tyrant as example, it's 92U big, stepsize is roughly 17%. If it was 1.8m big (average human size, to give an idea), it would mean it's unable to climb above 31cm.

Plus, to have stepsizes under 16U will break old map layouts, unlike having bigger ones.

necessarily-equal commented 2 years ago

I still think it's max:

$ python3 -c "print(max(16, 25))"
25
ghost commented 2 years ago

oops, my bad :D

Viech commented 2 years ago

That's a classic! You want to set a minimum value, so you use max. :smiley: