[GM] Infinite terrain generator

Hey everyone,

I need a little help from someone who is skilled in GML. Yea, I know, game maker blah blah… but I am no coder, so its easy for me to use. Anyways, I want to create small game that involves randomly generated terrain. I have code for it mostly done, thing is however, that its generating terrain sideways and not in direction down. And I need someone who would be able to fix this.

Thanks for your time,

Vus

If your talking about Game Maker then youtube this, there are videos on this.

There are, I actually made code with the help of one, but its sideways 😕 😄

Why sideways?  😄

It generates like 2d minecraft would. Left and right infinetly, but if you go down, it ends in one height

The first one is the exact one I followed, so I have that done, but none of these tells me how to make it generate infinetly way down 😕

There is no such thing as generating infinitely down, even in Minecraft. There are always limits.

yeah there are always limit.ifnite something like 99999999999999999999999999999999999999999999999999999999999999999999999999999999999 omg crap

There is no such thing as generating infinitely down, even in Minecraft. There are always limits.

Limit in current PC version is your PC specs. Code allows for infinite generation as long as your computer keeps up. I want to do this only in direction down and I don’t expect anyone to get so far that your computer can’t keep up anymore. Minecraft is limited in height 0 with bedrock, but I want exact opposite. Be finite in sides, but not in height.

I might have to work with this and make up a tutorial then. I’ll get back at you soon. No promises though, I’ve been using GM for 5+ years and advanced in GML.  :lol:

Good luck!

-Scott (Orb)

Thanks, I appreciate it 🙂

I found an obvious  problem, to be able to generate infinite terrain down, the room size would have to be infinite as well, question is how can you make the room size infinite?  😞 You could make it really long though but remember that the CPU has to load everything which is why there is a long pause before you start the game so that the game can generate terrain. There is code to generate only whats viewed at a time on the screen but this doesn’t solve for infinite terrain building. I’ll try to see what I can do.

-Scott (Orb)

I found an obvious  problem, to be able to generate infinite terrain down, the room size would have to be infinite as well, question is how can you make the room size infinite?  😞 You could make it really long though but remember that the CPU has to load everything which is why there is a long pause before you start the game so that the game can generate terrain. There is code to generate only whats viewed at a time on the screen but this doesn’t solve for infinite terrain building. I’ll try to see what I can do.

-Scott (Orb)

Not sure if it would work but here’s a thought, instead of having the room size infinite, just make it grow when the player moves close to the edge of the current room? (It’d be a nightmare to load once you have a massive room though, so maybe have it save and load as “chunks” like Minecraft or something similar.)

Not sure if it would work but here’s a thought, instead of having the room size infinite, just make it grow when the player moves close to the edge of the current room? (It’d be a nightmare to load once you have a massive room though, so maybe have it save and load as “chunks” like Minecraft or something similar.)

Yea exactly what I had in mind. Well, this game won’t have save and load feature because it would be useless for it, so that doesnt need to be solved. 🙂

So have a code that generates new areas as your character moves throughout a room. I think there are tutorials about this I’ll see if I can find some.

Log in to reply