AnOpenSauceDev / FastRandom

An optimized rewrite of Minecraft's RNG system, for Fabric!
Apache License 2.0
48 stars 3 forks source link

Suggestions #45

Closed davidromrell closed 6 months ago

davidromrell commented 6 months ago

Does an issue already cover this?

Issue description.

  1. less heavy of a mod
  2. instead of improving on fast placement can you make the random code itself faster and/or make your current solution more robust?
  3. Could be "average Minecraft" though it seems this mod has a minor issue similar to what is trying to be solved by the mod "dynamic FPS".
Steveplays28 commented 6 months ago

This mod is not heavy at all. It contains 1 mixin and a custom implementation of Minecraft's Random class, using RandomGenerator (see RandomGeneratorRandom). This new implementation of random number generation is a lot faster than what's used in vanilla (legacy java.util.Random). With the new fixes in place, Faster Random should be 1:1 with vanilla in terms of random number generation, except for a bug fix. Might be wise to include a toggle for that in the future. I'm not sure what Dynamic FPS does, haven't looked into it.

davidromrell commented 6 months ago

I want to use this mod and noisium! Right now it barely fits my specifications, and I may end up switching to other mods instead.

Steveplays28 commented 6 months ago

Faster Random is compatible with Noisium

AnOpenSauceDev commented 6 months ago

Also, Dynamic FPS does not do anything similar to Faster Random in the slightest. Dynamic FPS slows down your game so Minecraft doesn't eat up more resources when idle. Faster Random optimizes the RNG system.

SoBeeIt commented 2 months ago

Can you optimize worldgen_region_random calls?

AnOpenSauceDev commented 2 months ago

I could, but I don't want to screw up worldgen too much, or create so many new generators that the improvement is negligible. What I could do is have a version of Faster Random that completely breaks parity, and uses random in a way that yields much more performance.