10 days ago

Ok...this is getting out of hand.


THE IRANDOM FUNCTION IS SUPPOSED TO CHOOSE A RANDOM NUMBER. I HAVE TWO VERSIONS OF THE FUNCTION WHICH BOTH STATE THAT THE INSTANCE "oRocks" CAN BE PLACED IN ANYPLACE WITHIN THE GAME'S BOUNDARIES, ITS HEIGHT AND WIDTH (1366 x 768) but every single time i start the game, the supposed "random rock placement" happens and it goes in the same places. This has happened for years to me and I want to know if anyone else has problems with the irandom function or just has gamemaker-caused problems anyways (not the code you wrote's fault).
Since there is a 1366 x 768 resolution (or 16:9) that means that there are 1049088 possible positions for the rock instances.

Calculator Result

1366 x 768 =

1049088

And moreover, since there is 9 different rock sprites, there is only a 1/9441792 that the irandom function makes them move in those positions, with those sprites. Here are the probabilities after different trials:

one trial: meh (could happen)

two trials: 1 in 9441792

three trials: 1 in 8.9147436e+13

and so forth

i don't know why this is happening.



0 comments

Loading...

Next up

The game's scenery is generated as it goes now, and I just made a desert biome!

COME ON GUYS LETS GOOOOO! UNITED AIRLINES FINALLY GOT A MCDONALDS AND AN AIRPORT THERE! WE CAN RIDE THE ENDER DRAGON!!!

New biome unlocked!

Started work on the Forest of Undying Souls today! (This is the second chapter in my game)

Started the tank mini-project 20 minutes ago!

Will add shells and everything else later.

Game title screen!

I have no idea what is wrong with this. As you can see, the rock scenery (which you saw in my last post) is supposed to be random, and it isn't.

Which one should I choose? (I'm gonna be one for the month) FRODO OR GANDALF

This has got to be one of the most nostalgic games I have ever played. It was the first single-player I ever beat and I watched the game's development from start to finish.

https://youtube.com/clip/UgkxWPKacvb1s2kLsGJXkpJed1HzxfIT39QC?si…

SO GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOD

Taiga biome!