Giter Club home page Giter Club logo

Comments (6)

davebaol avatar davebaol commented on May 21, 2024

Well, there's nothing stopping you from setting the MathUtils.random's seed.
You can even replace the Random instance since the static field random of MathUtils is not final.

from gdx-ai.

ASneakyFox avatar ASneakyFox commented on May 21, 2024

The problem with doing that to MathUtils is that many things use MathUtils.random in libgdx all over the place. It would mess up the games underlying model because some particle effect or something is in the game.

from gdx-ai.

davebaol avatar davebaol commented on May 21, 2024

This should not happen unless you use the Random instance from multiple threads.

from gdx-ai.

ASneakyFox avatar ASneakyFox commented on May 21, 2024

No this can happen easily and all the time.

For instance, if I have the game running with a specific seed and see how it runs, then I decide it would look cool if the main character has a particle trail when he moves. Now this new visual effect will change the outcome of all the AI because its using the same random number generator.

Anything at all you change in the game of its view/rendering would possibly be changing the game's model.

from gdx-ai.

davebaol avatar davebaol commented on May 21, 2024

Oh now I see what you mean.
But I think that even a dedicated random generator instance would not let you accurately reproduce game sequences since FPS is not deterministic. Actually, you use the random generator more frequently when FPS is high and less when is low.

from gdx-ai.

ASneakyFox avatar ASneakyFox commented on May 21, 2024

ah because it uses random inside of update calls. I guess I wasn't thinking it all the way through. I guess this was a pointless suggestion then. It would be cool if it were possible though.

from gdx-ai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.