#What RNG algorithm does GameMaker use?
1 messages · Page 1 of 1 (latest)
okay, it looks like it's also mentioned in the GameMaker-HTML5 repo
i tried to copy the algorithm from there but it gives a different result
i guess i did something wrong
either way, thanks
okay it's actually kinda hard to figure out
There are existing custom prngs, one that was made 1:1 with Gamemakers own
Oh wait outside of GameMaker
Yeah it’s just WELL512
Sure but what is the state initialised to?
And how does for example the irandom_range function work
You're asking about specifics which you would not really get told of, outside of what the HTML5 repo offers
irandom and irandom_range are both in the html5 repo you linked
so is the rng seed, with randomize()
is it the same though?
Since it’s the HTML5 target, probably not
yeah so it's kinda useless
i also tested the JS code directly
and it gives a different result
Honestly, what is the reason for wanting to recreate 1:1 GameMakers RNG system elsewhere? Why isn’t just going by WELL512 good enough?
it would allow me to predict random events in gamemaker games
I mean, GameMaker could work without having to recreate entire mechanisms. 🤔
No?
Like, you already have an entire engine that works perfectly for all other existing games. There is virtually no good reason to reinvent the wheel just to "predict random events".
I don't see any reason why, GameMaker isn't that big
And once you make an executable, it's not so bad either
well okay that is probably a dewcent way of doing things
but it's not like doing this at all is very much needed
and i think recreating the RNG in C or some other sane language is more fun
Look, outside of telling you the algorithm and pointing at the HTML5 repo for at least some structure
There isn't really much else you're going to get
The exact specifics of how the code or implementation is done in the C++ side of things, isn't going to happen
No one here is going to be able to explain that
i mean
there could be an option to pay in order to get the source code
or something like that
there are many options
either way it's probably really hard to reverse engineer the rng
FOSS isn't the same as source available, and you're not only tied to NDAs, but also can't legally redistribute the code... You can look at it and work with it.
But I cannot really speak much more on the legality on that
But as I've said, that is an option
i know, making the source code available at all is great tho
If you can spare $75 USD/month
That's what i'm telling you mate
I've said it twice
It is source available, already
Per month
For $75 USD
It's under GameMaker Enterprise
that's great

I do also want to say, even if this was somehow an issue, you can get a very barebones GameMaker version, that just contains the compilation tools.
Which the only thing you'd have to deal with is downloading the runtime you care about, and then build a barebones project. (Even I could just whip up a barebones project).
Or there is an existing GML interpreter + CLI program that exists out there, made in GameMaker.
Either way, the path of least pain, is just using GameMaker. It does not hurt, and it's fast enough to build a lot of things with. Including to make predictions on random events.
yeah okay
there is also the option of decompiling gamemaker
i guess
but it's not something i am good at
i did manage to recreate RNG of another game
made in Unity
I still don't think there is a huge need to recreate it for the purpose you intend, over just using GameMaker
Unless there's another reason you're hiding
Actually i think i found relevent functions using ghidra