dangOreus

by Mylon

The flOre is lava. Dig yOre way out through this divOrese and dangOreus field! Will you Coke on the limited space and submit to the cOreruption Ore will you transfOrem it into an majestic Orechestra? Also known as "Dangerous" or "Danger Ores".

Scenarios
a month ago
0.15 - 2.0
10.3K
Environment Mining

g voronoi setting causes lag in new game

2 years ago

Mod time usage fluctuates continuously between 0.8 and 1.6 with voronoi setting. total time usage 17 - 18.5, which drops FPS to about 55 - 57; however, because the FPS is not stable, this causes constant jitter.

I've attached a screenshot of complete time usage so that you can determine if this is actually being caused by the mod or not.

https://i.imgur.com/8cp3I66.jpeg

2 years ago

Update : I'm testing each of the other generator settings to help eliminate possible causes.

random : 0.5 - 1.0
perlin : 0.7 - 1.3
pie : 0.5 - 1.0
spiral : 0.5 - 1.0

On every setting, FPS is about 56 - 58. Before today, I had never had any lag with this mod, and my FPS had never fallen below 60.

2 years ago
(updated 2 years ago)

I've also come across the same problem (FPS drops) and tracked it down to dangOreus as well (random generation)

(edited for clarity to avoid more unhelpful comments)

2 years ago

I've also come across the same problem and tracked it down to dangOreus (random generation)

Wow, you tracked it down to the mod I'm submitting a bug report for? Incredible.

1 year, 8 months ago

does Mylon even read the bug reports?

1 year, 8 months ago
(updated 1 year, 8 months ago)

As i wrote in reddit earlier:
I checked this a bit adding some live logging to control.lua. It runs on_chunk_generated every second, calling gOre() function. But further than that i don't know what it does or why it keeps being called.

So my guess is of course that gOre() makes a feedback loop with something it does with the terrain, causing an infinite loop of event updates.
That the on_chunk_generated runs seemingly at frequency of 1 second is likely because of some internal reason in game engine.

1 year, 8 months ago
(updated a month ago)

Sorry I've been busy with other projects.

This mod spawns 1024 entities with every chunk generated and does so via script. So yes, this does make the mod run very slow if the map is being generated, but that doesn't happen all of the time. Exploring, adding radars, and growing the pollution cloud can trigger chunk generation. But all of this should be transitory. The map only has to be generated once and the game tries to spread the load out over time.

Honestly the voronoi method was added by a contributor and I have no idea as to the efficiency of the method used. Clearly it's doing a lot of math and I am uncertain how to optimize it.

1 year, 8 months ago
(updated 1 year, 8 months ago)

There is a bug where it does happen all the time, after waiting for at least a minute in a new game and standing still. For a test, set game print a line when chunk is generated and it is doing it once a second.

(Default mod settings and no other mods enabled.)

1 year, 8 months ago

Sorry I've been busy with other projects.

This mod spawns 32 entities with every chunk generated and does so via script. So yes, this does make the mod run very slow if the map is being generated, but that doesn't happen all of the time. Exploring, adding radars, and growing the pollution cloud can trigger chunk generation. But all of this should be transitory. The map only has to be generated once and the game tries to spread the load out over time.

Honestly the voronoi method was added by a contributor and I have no idea as to the efficiency of the method used. Clearly it's doing a lot of math and I am uncertain how to optimize it.

The problem happens with every generation method. Time passed and amount of map revealed makes no difference.

1 year, 8 months ago

I will continue to bump this until the issue is fixed.

1 year, 8 months ago

I will continue to bump this until the issue is fixed.

Maybe you should offer to fix it yourself instead of being so rude?

1 year, 8 months ago

You might want to print the chunk coordinates that are being generated, maybe some pattern emerges.

1 year, 8 months ago

You might want to print the chunk coordinates that are being generated, maybe some pattern emerges.

How do I do that?

1 year, 8 months ago
(updated 1 year, 8 months ago)

Say in the control.lua where these are (line 108+):

local chunkx = event.area.left_top.x
local chunky = event.area.left_top.y
game.print("Chunk X: " .. chunkx .. ", Y: " .. chunky)

(Ofc don't leave debug info to release build :) )

1 year, 8 months ago

I'll investigate using a task spreader to spread the chunk generation out over multiple ticks.

8 months ago

Well? It's been a year, what did your investigation show?

New response