Commit Graph

12134 Commits

Author SHA1 Message Date
way-zer
116798e328 OC: fix slow of LCanvas 2024-09-23 22:38:36 +07:00
code-explorer786
a5de131711 Trapezoidal jumps
I haven't checked this yet, but it seems like it also reduces the
complexity (runtime) from ≈O(n^2) to ≈O(k^2 + n)
(n = number of jump curves)
(k = number of unique destinations)

The worst case, that is k = n, is still O(n^2) but generally it's much
more (scalably) performant.

Thanks Arkanic for suggesting this!
https://discord.com/channels/391020510269669376/663854113418641429/1256161815503704104

Co-authored-by: Arkanic <50847107+Arkanic@users.noreply.github.com>
2024-09-23 22:31:21 +07:00
Ilya246
c5b8133ff9 optimise jump colors and attempt to space them apart 2024-09-23 22:26:11 +07:00
code-explorer786
939f6939d0 Jump curve coloring
See #general-programming in the Mindustry Discord server:
https://discord.com/channels/391020510269669376/663854113418641429/1256146387834372106

Co-authored-by: Ilya246 <ilyukarno@gmail.com>
2024-09-23 22:26:06 +07:00
code-explorer786
89b67fc4b4 Transition jump heights
It looks good.
2024-09-23 22:26:03 +07:00
code-explorer786
282d21db05 Update jump heights only when necessary.
This method uses signaling (through a boolean) and I feel like it's
extremely hacky, but I tested this and it (kind of?) works.
Unfortunately I found this to potentially lag when resizing.

I am not sure if this is guaranteed to work (as in, produce correct
behaviour) or not, but to my understanding only LogicDialog uses LCanvas
(grep out "LCanvas\|canvas" and see) so it will most likely work?

I tested this and accidentally found an unrelated issue related to
LCanvas.maxJumpsDrawn, but I hope this will be fixed in the near future.
2024-09-23 21:04:45 +07:00
code-explorer786
26105a64f1 Use pools
It feels hacky, but it works regardless. The GC should be working as
hard as it was beforehand.
2024-09-23 21:04:42 +07:00
code-explorer786
b58a6bb8d6 wip: different heights for jump arrows
Note that this is very incomplete, for two different reasons:
- it's O(n^2) or potentially worse
- it makes the GC work hard (it invokes `new` in
  `LCanvas.DragLayout.layout()`)

For the second reason this does not clearly fit the criteria of
CONTRIBUTING.md, but I have yet to figure out ways to work around this
(or make the algorithm more efficient).
2024-09-23 21:01:54 +07:00
code-explorer786
b8c9a05963 LCanvas: jumps -> statements.jumps
Original canvas.jumps is now a reference to canvas.statements.jumps.
Please remove canvas.jumps in favour of canvas.statements.jumps in a
future release. Thanks!
2024-09-23 18:14:38 +07:00
Anuken
51b415731a Fixed units sometimes exploding when payload dropped 2024-09-22 08:58:09 -04:00
Anuken
830fcb6360 Fixed database opening when selecting commanded units 2024-09-21 09:00:24 -04:00
Anuken
f00b79906b Fixed database dialog fade 2024-09-20 14:09:39 -04:00
Anuken
0c540f9527 Minor fix 2024-09-20 14:04:55 -04:00
Anuken
65e7891991 Core database content icon click support 2024-09-20 14:04:08 -04:00
Anuken
4f93a5c332 Separator output display 2024-09-20 14:04:07 -04:00
Anuken
68dccab5ca Improved crash logs; source mod of crashes now included in report 2024-09-20 13:15:26 -04:00
Anuken
c36e638826 Polar aerodrome fixes / Objective timer multiplier for difficulty 2024-09-20 11:17:12 -04:00
Anuken
bd1f750673 Minor fixes / Desktop detach camera hotkey 2024-09-19 20:37:22 -04:00
Anuken
ab39291626 Pathfinder bugfixes 2024-09-18 19:22:51 -04:00
Anuken
e521a56712 Many bugfixes / Support for repairing derelict in selection 2024-09-18 16:27:54 -04:00
Anuken
63e246cc9d Headless crash fix 2024-09-18 09:02:05 -04:00
Anuken
a293cb4687 Fixed campaign rules in portrait mode 2024-09-18 07:05:34 -04:00
Anuken
5b9d3029a5 Loop unit transfer command 2024-09-17 18:03:31 -04:00
Anuken
b81553f490 Minor bugfixes / New easier difficulty mode 2024-09-17 14:29:24 -04:00
Anuken
cec743a841 Bulk tile update Call methods 2024-09-16 20:38:42 -04:00
Anuken
4e19a3c4d0 Atolls map fixes / Extraction outpost edits / Option to hide objectives 2024-09-16 16:05:03 -04:00
Anuken
8ede0fa6f4 Fixed shields not blocking blast compound explosions 2024-09-15 19:21:24 -04:00
Anuken
9911e602a0 Quads+Horizons damage shields / RTS AI toggle for Serpulo 2024-09-15 17:20:34 -04:00
Anuken
bc7c8ee508 Force projector 2x crash damage multiplier 2024-09-15 16:30:26 -04:00
Anuken
20a7f3f300 Atolls sector map submission / Windswept Islands rework submission 2024-09-15 12:24:52 -04:00
Anuken
f6ee9b7ffa Draw selected building for payload enter command 2024-09-15 11:51:39 -04:00
Anuken
aafdd35796 Polar Aerodrome sector submission / Shields absorb unit wrecks 2024-09-15 11:36:09 -04:00
Anuken
0889da2bc7 Minor arrival fixes for enter payload command 2024-09-14 21:34:27 -04:00
Anuken
56c9e96201 Fixed reconstructors not assigning default command 2024-09-14 14:44:13 -04:00
Anuken
f0027a3eff Minor AI fix 2024-09-14 09:43:30 -04:00
Anuken
a15a0d945f Difficulty & AI tweaks 2024-09-14 09:22:56 -04:00
Anuken
6b93873fce Difficulty scaling tweaks 2024-09-13 21:42:00 -04:00
Anuken
5ac7f204e3 Added extra retusa weapon 2024-09-13 19:45:09 -04:00
Anuken
3b287b1bbe Apply difficulty spawn multiplier to unit production 2024-09-13 19:11:19 -04:00
Anuken
0ffa6f1d00 Added random wave AI to custom rules dialog 2024-09-13 18:59:28 -04:00
Anuken
6e5561a36e Campaign rule for unpredictable wave AI 2024-09-13 18:50:46 -04:00
Anuken
6260e146c3 Experimental rule for randomized air unit targets 2024-09-13 18:26:00 -04:00
Anuken
d8eabece7c WIP campaign difficulty dialog 2024-09-13 17:58:11 -04:00
Anuken
375d0c76ea Extraction outpost remake submission, untested 2024-09-11 17:32:12 -04:00
Anuken
6b95a4b70e Fixed doors not updating pathfinder 2024-09-11 14:17:35 -04:00
Anuken
aca84bbeff WIP Infested Canyons map submission 2024-09-10 19:31:59 -04:00
Anuken
4fc48fabb5 Possible ShieldArcAbility tunneling fix 2024-09-10 13:16:34 -04:00
Anuken
e56fd3a0d7 Cleanup 2024-09-09 13:59:16 -04:00
Anuken
7784c8f35e Cleanup 2024-09-09 13:58:59 -04:00
Anuken
277e4fa553 Pannable wave graph 2024-09-09 13:13:09 -04:00