Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groundwar very slow on normal speed #1163

Open
akarnokd opened this issue Aug 24, 2024 · 11 comments
Open

Groundwar very slow on normal speed #1163

akarnokd opened this issue Aug 24, 2024 · 11 comments

Comments

@akarnokd
Copy link
Owner

When playing on speed 1x, the ground war movements are very sluggish. Only on speed 2x feels somewhat natural.

Did the movement speeds of things change sometime?

https://www.youtube.com/watch?v=rKEyeZZU8Y4

/cc @hemoridos

@G-T-T-G
Copy link

G-T-T-G commented Aug 24, 2024

Ötlet:
A beállítások közé fel lehetne vinni egy ugyanolyan csúszkát, mint a Fő Játékmenet esetén az időgyorsítás léptéke.
(Nem tudom az időzítéseket, így elég bugyután fogom megfogalmazni. Bocs.)

Földi harc sebessége:
Lassú (ez a mostani beállítások),
Normál (itt a második nyíl sebessége az első nyíl sebessége)
Gyors (itt a harmadik nyíl sebessége az első nyíl sebessége)
Nagyon Gyors (itt a Normál sebesség második nyíl sebessége az első nyíl sebessége)
Extrém (itt vagy az eddigi tendenciával folytatva, vagy valami elvetemült... )

PL:
Lassú: 0 - 1 - 2 - 3
Normál: 0 - 2 - 3 -4
Gyors: 0 - 3 - 4 - 5
Nagyon Gyors: 0 - 4 - 5 - 6
Extrém: 0 - 5 - 6 - 7

PL2:
Lassú: 0 - 15mp - 30mp - 45mp
Normál: 0 - 30mp - 45mp - 60mp
Gyors: 0 - 45mp - 60mp - 75mp
Nagyon Gyors: 0 - 45mp - 75mp - 90mp
Extrém: 0 - 75mp - 90mp - 105mp

Követem.

@hemoridos
Copy link
Contributor

There were some change I believe in the movement interpolation PR, I'll dig it up once i get home.

The timer used for test battles started with a hotkey on the colony screen was running all the time.

This "rogue" timer was also running in paralel with the main timer for actual ground battles as well, this resulted in the periods between ticks being inconsistent, making postion interpolation impossible/choppy. And also the game slightly faster.
Ie.: 25 ms rogue ticks paralel with 33ms main ticks on 2x setting
(I cant remember the exact numbers)

When I noticed this I made sure the test battle timer only runs when there is no active groundwar battle ongoing.

At the time I assumed this was the intended behaviour for the speeds.
1x slowed 2x normalish 4x fast.

@hemoridos
Copy link
Contributor

#1103 is where it was changed.

@hemoridos
Copy link
Contributor

I checked it, and on my end it does seems a bit faster that what can be seen in the video.

@akarnokd
Copy link
Owner Author

akarnokd commented Aug 25, 2024

Thanks.

Okay, let's shift speeds up one notch. Maybe upping the speeds by 50% in the battle.xml may be enough, plus the hard-coded rocket speed bump?

<tech id="LightTank" normal="inventions/weapons/tanks/light_tank_matrix" alternative="inventions/weapons/tanks/alien_light_tank_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" fire="GROUND_FIRE_1" hp="180" damage="4" min-range="0" max-range="2.5" area="1" movement-speed="25" rotation-time="100" delay="500" type="TANK"/>
<tech id="MediumTank" normal="inventions/weapons/tanks/medium_tank_matrix" alternative="inventions/weapons/tanks/alien_medium_tank_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" fire="GROUND_FIRE_4" hp="240" damage="8" min-range="0" max-range="3.5" area="1" movement-speed="33" rotation-time="100" delay="800" type="TANK"/>
<tech id="HeavyTank" normal="inventions/weapons/tanks/heavy_tank_matrix" alternative="inventions/weapons/tanks/alien_heavy_tank_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" fire="GROUND_FIRE_2" hp="360" damage="8" min-range="0" max-range="4.5" area="1" movement-speed="41" rotation-time="100" delay="500" type="TANK"/>
<tech id="Behemoth" normal="inventions/weapons/tanks/behemoth_matrix" alternative="inventions/weapons/tanks/alien_behemoth_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" fire="GROUND_FIRE_6" hp="420" damage="10" min-range="0" max-range="5.5" area="1" movement-speed="50" rotation-time="100" delay="500" type="TANK"/>
<tech id="RadarCar" normal="inventions/weapons/vehicles/radar_car_matrix" alternative="inventions/weapons/vehicles/alien_radar_car_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" hp="70" damage="0" min-range="0" max-range="5.5" area="1" movement-speed="50" rotation-time="100" delay="500" type="RADAR"/>
<tech id="RocketLauncher1" normal="inventions/weapons/vehicles/rocket_launcher_1_matrix" alternative="inventions/weapons/vehicles/alien_rocket_launcher_1_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" fire="GROUND_FIRE_7" hp="180" damage="14" min-range="0" max-range="7.5" area="2" movement-speed="60" rotation-time="100" delay="2800" type="ROCKET_SLED"/>
<tech id="RocketLauncher2" normal="inventions/weapons/vehicles/rocket_launcher_2_matrix" alternative="inventions/weapons/vehicles/alien_rocket_launcher_2_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" fire="FIRE_ROCKET" hp="120" damage="16" min-range="0" max-range="8.5" area="3" movement-speed="50" rotation-time="100" delay="3200" type="ROCKET_SLED"/>
<tech id="DargslanSelfRepairTank" normal="inventions/weapons/vehicles/dargslan_self_repair_tank_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" fire="GROUND_FIRE_6" hp="420" damage="10" min-range="0" max-range="4.5" area="1" movement-speed="40" rotation-time="100" delay="500" type="SELF_REPAIR_TANK" repair-time="500"/>
<tech id="DribsParalizer" normal="inventions/weapons/vehicles/dribs_paralizer_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" hp="500" damage="8" min-range="0" max-range="3.5" area="1" movement-speed="50" rotation-time="100" delay="500" type="PARALIZER"/>
<tech id="EcalepRocketJammer" normal="inventions/weapons/vehicles/ecalep_rocket_jammer_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" hp="360" damage="3" min-range="0" max-range="5.5" area="1" movement-speed="50" rotation-time="100" delay="500" type="ROCKET_JAMMER"/>
<tech id="GarthogRadarJammer" normal="inventions/weapons/vehicles/garthog_radar_jammer_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" hp="180" damage="5" min-range="0" max-range="5.5" area="1" movement-speed="50" rotation-time="100" delay="500" type="RADAR_JAMMER"/>
<tech id="MorgathKamikazeTank" normal="inventions/weapons/vehicles/morgath_kamikaze_tank_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" fire="GROUND_FIRE_6" hp="270" damage="8" min-range="0" max-range="1.5" area="3" movement-speed="30" rotation-time="100" delay="500" type="KAMIKAZE"/>
<tech id="SullepArtillery" normal="inventions/weapons/vehicles/sullep_artillery_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" fire="GROUND_FIRE_3" hp="360" damage="45" min-range="0" max-range="8.5" area="1" movement-speed="40" rotation-time="100" delay="2500" type="ARTILLERY"/>
<tech id="YchomMineLayer" normal="inventions/weapons/vehicles/ychom_mine_layer_matrix" width="16" height="5" destroy="EXPLOSION_MEDIUM_2" hp="240" damage="100" min-range="0" max-range="5.5" area="4" movement-speed="75" rotation-time="100" delay="500" type="MINELAYER"/>

rocket.movementSpeed = 25; // FIXME rocket movement speed

@hemoridos
Copy link
Contributor

First I'd test some thing out with the timers on other machines/platforms, before editing raw stats.

@hemoridos
Copy link
Contributor

@akarnokd could you check if the BF value averages around 25ms in ground war?
Is this also happening in space wars?

@akarnokd
Copy link
Owner Author

Spacewar was okay. What's BF?

@akarnokd
Copy link
Owner Author

Okay, the original video was done on an i5 6640HQ with HD 530.

This video is recorded via i7 8700 and GTX 1060.

[email protected]_.21.0.4.2024-08-26.14-01-40.mp4

I suspect the forced 25ms refresh could be straining the laptop. I won't be able to test with the laptop until next Friday though.

@hemoridos
Copy link
Contributor

When you use ctrl+f to check the frame delays.
I believe it's the time between paint requests.

In the meantime I tried it on my work laptop with low power settings, and I got similar results as you. And I think it the problem is my attempt at smoothing the unit movements with constant fps.
The main issue is that having drawing requests at 25ms intervals (40fps) on the colony screen can be too much for slower CPUs.
I did notice this earlier while profiling and did play around with buffering the colony surface during ground battles that drastically reduced CPU usage, but figured at the time that I maybe over optimizing and stashed it away.

I would first try to create a proper PR from that commit before reverting the smoothing change if you are ok with that.
I can probably put something together this week.

@akarnokd
Copy link
Owner Author

I would first try to create a proper PR from that commit before reverting the smoothing change if you are ok with that.
I can probably put something together this week.

Okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants