Page MenuHomeWildfire Games

Change clearance of large land units from 4 to 3, large ships from 12 to 10
ClosedPublic

Authored by wraitii on Mar 23 2017, 5:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 14, 7:34 PM
Unknown Object (File)
Sun, Sep 1, 4:54 PM
Unknown Object (File)
May 4 2017, 3:00 PM
Unknown Object (File)
Apr 30 2017, 7:02 AM
Unknown Object (File)
Apr 27 2017, 3:53 PM
Unknown Object (File)
Apr 19 2017, 7:34 PM
Unknown Object (File)
Apr 12 2017, 9:48 AM
Unknown Object (File)
Apr 9 2017, 9:33 PM
Subscribers
Restricted Owners Package

Details

Summary

This is a change I've done in my unit motion rewrite branch to improve the fluidity of large unit movements. It changes the clearance of large land units (elephants, siege mostly) from 4 to 3 (regular units are 1).

This makes them considerably easier to use imo.
Some comparison screenshots: as you can see, it fits the elephants much better. On most siege, it fits their width, not their length. This is imo a good change because they can now pass through areas where it looks like they should pass, since they should in theory be able to pass through any hole wide than their width, not their length. However, for the helepolis, this will lead to clipping.
We could in principle add a new passability class for the very-large-units, but I don't think it's worth the perf hit tbh.

Before:

siege_1_4.png (486×1 px, 111 KB)

After:
siege_1_3.png (734×2 px, 155 KB)

Comparison from the front: it fits the width, not the length.
siege_bonus_3.png (1×1 px, 99 KB)

Before:

siege_2_4.png (522×1 px, 62 KB)

After:
siege_2_3.png (344×968 px, 42 KB)

before:

ele_2_4.png (658×1 px, 93 KB)

after:
ele_2_3.png (324×1 px, 56 KB)

Test Plan

Check out the screenshots, check out the in-game behaviour, report.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a subscriber: Restricted Owners Package.Mar 23 2017, 5:56 PM
wraitii edited the summary of this revision. (Show Details)

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (305 tests).................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (305 tests).................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/580/ for more details.

For most siege engines the change seems fine, some notable exceptions:

  • elephants, that seems pretty meh

ele.jpg (1×1 px, 872 KB)

ele-10.jpg (1×1 px, 969 KB)

ele-9.jpg (1×1 px, 953 KB)

  • macedonian siege ram is very wide, more than most other rams. ugly but remotely acceptable. notice that the average case is the worst case, since one often has multiple of them selected and moves them to some target, so they end up all in one place overlapping:

ele-8.jpg (1×1 px, 625 KB)

ele-7.jpg (1×1 px, 933 KB)

ele-5.jpg (1×1 px, 986 KB)

roman rams don't seem relevantly worse

ele-3.jpg (1×1 px, 976 KB)

ele-2.jpg (1×1 px, 959 KB)

The rear end of catapults had been out of bounds before as well, so not a regression:

ele-4.jpg (1×1 px, 876 KB)

ele-1.jpg (1×1 px, 884 KB)

siege towers were bad, now worse. they are not that often trained in comparison to rams

ele-6.jpg (1×1 px, 1010 KB)

Reducing the size of models could be done, but that would further reduce the epicness of siege engines who were historically much bigger than portrayed in our game.

How big is the memory impact actually when adding another class? Should consider 1500 units on a normal sized mainland map with many buildings and then print the size of the affected grids.

Re elephants: notice that the butt is fully inside the square. If we moved the elephant back a bit, the clipping would be less obvious in front.
Anyhow, imo this type of clipping is a game feature, and unless you want to go and implement complete collision detections for all models I don't see an easy fix :P. Furthermore, units should be able to pass where it looks like they should be able to pass, and in that respect (particularly for Elephant) this fits much better.

Agreed that siege towers are the biggest issue here.

Re costs. I could be wrong here but I don't believe there is actually a memory cost since we'd still be under 16 bits (one per passability class). However any new passability class means that when we need to rasterise something, we have to do it once more. All passability maps are also over-rasterised up by "max clearance" to ensure no problems, but this won't come into play here since ships have a class with clearance 12.
Overall, it wouldn't be a huge perf hit to add a new class for very-large units, but it would be slower. Since imo only siege towers need it I'm not entirely sure it's worth it - but we can give it a shot.

fatherbushido added a subscriber: fatherbushido.

The best way to know if that is acceptable is imo to hardly test that in games.
My opinion is not really valuable for the graphical side though.

This revision is now accepted and ready to land.Mar 27 2017, 2:24 PM

As mentioned by fatherbushido, that issue wouldn't be a surprise to players. We should aim for fixing those as far as possible though:

chariots.jpg (1×1 px, 942 KB)

We should find an actual estimation on how much performance loss adding a new class would have sometime. Maybe not now. Convinced it will be a measurable performance impact and we definitely don't have a use for adding further bottlenecks to the current state of laggiess.

The siege tower issue is the worst case of this patch and is beyond acceptable but tolerable to me.

While at it, we should also consider ships as fatherbushido mentioned in IRC.
In about every naval skirmish, people rage about ships being stupid, not abiding orders. It's exactly the same issue as with land units clearance.
After some testing, it would be great to equally reduce the clearance of big ships by 25%, i.e. from 12 to 8, or even only to 10.

For the trireme it is quite obvious:
Before:

ship-1.jpg (1×1 px, 614 KB)

ship-2.jpg (1×1 px, 619 KB)

After:
ship-3.jpg (1×1 px, 589 KB)

For the medium war ship, we already have observable collisions that would become worse. So perhaps 10 is better from a visual pov. If we can tolerate the siege tower, maybe we can tolerate 8 here too, not sure:
Before:

ship-5.jpg (1×1 px, 502 KB)

ship-0.jpg (1×1 px, 433 KB)

After:
ship-4.jpg (1×1 px, 480 KB)

The small-ship class with 5 shouldn't be reduced probably:

ship-6.jpg (1×1 px, 456 KB)

elexis requested changes to this revision.Mar 31 2017, 6:08 AM

10 for ships is the truth (TM):

10.jpg (1×1 px, 366 KB)

I'm actually more worried about the balancing impact if we were to make it 8.
Especially notice that the nr of ships per area increases by the square of the changed clearance, not proportional.
Also looks like we implemented half of the ship ramming feature :D
pathfinder.xml in the _test.sim mod looks like it doesn't need an update.

This revision now requires changes to proceed.Mar 31 2017, 6:08 AM
wraitii edited edge metadata.
wraitii retitled this revision from Change clearance of large land units from 4 to 3 to Change clearance of large land units from 4 to 3, large ships from 12 to 10.

Updated, RC.

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (305 tests).................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (305 tests).................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/661/ for more details.

Thanks. Will playtest soon :-)

This revision is now accepted and ready to land.Mar 31 2017, 4:43 PM
This revision was automatically updated to reflect the committed changes.