Post-7DRL Patch 6


Changes:

Change vfx of floor items to ASCII; &, *, ?

Added ability to scroll Organelle log

F1 to log controls

Primordeal soup now stop creating nuclei if the player is not upgrading them (cap 4 unupgraded)

Significantly improved performance; fun facts on this below.

Fixed a moderate/major source of lag that caused all humans to iterate over every single tile in the player mass, rather than limiting its search through the tiles near it. This was faster when the number of tiles in the player mass was under the number in their lines of sight, but is slower when the player mass is very large. This issue would be worse in GJ mode.

I don't have profiling tools or expertise to find other sources of lag, but this is another thing which seems like it might be a part of the journey towards making the meme difficulty game mode winnable.

I just booted up a game to test a turn, and I got 73ms, 56ms, etc., from the start of the player turn to the next player turn (no haste).

But I decided to go further. Thanks to GJ, I learned how to use visual studio profiling tools, and crunched the following stats:

At turn 800 of a standard 230 mass game, 5% of the CPU time of a turn using the gravity core is spent by enemies in the aforementioned fix.

At a string of turns after that (taking several turns in succession into account), I noticed another major performance bottleneck: The calculation of the player FOV for display. Spending a lot of time with the profile helped me realize that a gravity core move spent *83% of its time* working on FOV-related nonsense.

So I fixed that. Update player FOV is very rarely called now, instead of sloppily all the time.

The next biggest bottleneck is the pathfinding algorithm as it is used by enemy attacking units, but it's much less troublesome; the best way I can think of to optimize this is with some convoluted path caching, which I won't do unless I get more complaints.

In any case, the game seems to run much more quickly now; hopefully this makes longer games more bearable.

Files

AmoebaRL_linux_v4.0.0.zip 1 MB
Jul 27, 2021
AmoebaRL_win_v4.0.0.zip 1 MB
Jul 27, 2021

Get Amoeba Roguelike

Leave a comment

Log in with itch.io to leave a comment.