• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

random

  1. P

    Asset - Demo Infinite Random Generation Engine

    Hey guys! This is a bit of a promo for an asset i'm very excited to announce. I've been working very hard over the last few weeks to bring you guys a simple random generation engine! Features: Random Chunk Generation Engine Beautiful Particle System Reusable Scripts and Examples Full Physics...
  2. V

    GameMaker When game restarts, my procedurally generated level (based on a consistent seed number) generates di

    First post here since the good ol' days of GMC. It's good to be back, and my my, has GM come along way! :) I have set my seed for the main level of my game to be a constant number, in the hopes that this level will generate exactly the same every time. However this isn't the case. I've read...
  3. F

    Randomizing Spawn throughout the game [SOLVED]

    Hello! For my game I'd like to spawn cars in randomized places (either a or b), randomized gaps between the spawns and then also randomized speed (altough I havent written the code for that yet) However, I encountered the issue that it is random at the start of the game but then it continues to...
  4. P

    GameMaker Random color + with +/- chances

    Good morning guys! I'm trying to do a little game based on colors. What i have right now is an object that will choose the color you will play with. every turn you will deploy this color inside the field and then another color will be choosen. what i want to do : I want the code that choose...
  5. V

    GML Visual Spawning Enemies at random locations outside room

    Hey guys, so I am using Create Instance to create an Enemy Instance. I've set the X to be chosen between the X co-ordinate of 8 different instances of a spawner object. I've done the same for Y. Now the problem is, enemy instances are sometimes created inside the room since it chooses X and Y...
  6. J

    GML Confusing variables, I need help!

    I made a game where you can click on a pack, and you will recieve a card. When you click on this card, the variable changes and in the next room, I want to display this card again, but it keeps on giving me the wrong sprite. I think it is because my variables are not saved correctly. When...
  7. B

    GameMaker Spawn enemies at random intervals

    Hello, Is there a way to spawn enemy ships at random intervals, and as the game progresses there will spawn more and more at a faster rate and the game gets harder as you play? Thank you.
  8. M

    GameMaker weird random (solved)

    Hi, I've created a random object generator that works weird. I have 3 objects, and i want to create 25 instances, each one can be a representant of objectA, or objectB, or objectC. My generator is running only when game starts. It générâtes a random sequence of A, B and C, like A A A B A C C B...
  9. N

    GameMaker [Help] Using room in another room

    Hi, I'm making a rogue like based around a maze generation, I'm generating a maze in a grid using a recursive backtracker algorithm. My plan is to then "transform" the grid cell into pre-created room inside a bigger room (if that make sense). So here's my question, how can I use pre-generated...
  10. G

    GameMaker Is random random?

    Hello! Right now, I am working on a little "Whack-a-Mole" style game and I use the random(value) function to make the Moles appear, well, randomly. for example... [step event] ... if(status==0) { ... //some code if(floor(random(300))==100)//something random status=1...
  11. H

    GUI sprite appears at a random spot when I enter the room

    Hello! I have encountered a strange issue where one of the GUI HUD elements is drawn both where it's supposed to, in the corner of the screen, but also in the middle of the room at approximately 4 times it's original size. At first I thought this was texture swapping occurring but increasing the...
  12. B

    GameMaker Saving and Loading A Seed

    Hey All, I am trying to implement an autosave feature in my game so if the player gets interrupted by a phone call they can pick up where they left off. The issue is it's a rogue-like dungeon crawler much like binding of isaac. When you enter a new room you have a random chance of getting...
  13. A

    Random Moving Objects

    Hello, I am making an Asteroid-like game and I am a begginer.I now have a spaceship that follows your cursor and moves and it even has a little flame animation,but I have trouble with the "asteroids".I made the object with the sprite,but how can I make it so it moves randomly on the room and...
  14. Just a game programmer

    GML How do yow set it so that the enemy only spawns outside the view.

    My game has a fairly small room. I have the enemies spawn on a random position, but they sometimes spawn right in front of the player. How can I make it so that they only spawn outside the view? Thank you!
  15. S

    GameMaker random numbers using ds_list_shuffle()

    I'm want to receive a value between 1 and 6 but if I've already received the value, i'll get a different value. I want to do this by adding the numbers in a ds_list and then using ds_list_shuffle() to switch up the numbers. Then i can just use the first numbers in the ds_list which will be...
  16. S

    GameMaker Randomizing But With Rules

    I have tiles in the game that i want to place 1 by 1 up to 10 tiles. Right now I'm using the code below: ds_tiles = ds_grid_create(1, 10); //Tiles enum tiles { none = 0, ocean = 1, lake = 2, fire = 3, volcano = 4...
  17. M

    Randomized things always randomized the same way when testing?

    So basically, i have codes like random() and choose() in use on many parts of my project. For example, in a room, i want the music to be random upon room start, so i use audio_play_sound(choose(music1,music2,music3),0,0) you get the idea. However, no matter how many times i test the game it...
  18. I

    Legacy GM [SOLVED] Random enemy movement in turn-based game

    Hey guys, so I have a state machine of sorts. When the player character moves from one 48 pixel cell to another, global var EnemyTurn turns from 0 to 1 and makes the enemy randomly move a cell with this script: ob_enemy.dirr = choose(0, 48, -48) ob_enemy.dirr2 = choose(0, 48, -48) with...
  19. K

    Random spawned coin won't stop spawning in the wall

    Hi Y'all! Having an issue getting my random spawning coin to stay away from the walls when it spawns. The below code is supposed to spawn ten coins only if they are not near anything. Would appreciate any help you can give. Thanks is advance! randomize(); {repeat (10) { var ranx =...
  20. D

    A button to reroll stats

    Howdy, so i already have the button created, it's just the getting it to work thats the kicker. so I have a set of stats that are randomly generated, but i want the player to be able to reroll the stats if they are not happy with them. I figure i have use the repeat function or some variant...
Top