Procedural generation

Since procedural generation seems to be the new hip thing (ex. @GameGod’s Otherwordly) and the fact that we now have seedable RNGs (haha shameless self-promotion) I’ve decided to make a top-down procedural generator!

Input a seed, (the seed used in the preview above is 1234) and walk around! When you go past the screen you will enter a new “chunk.” You also can’t walk through stuff like trees and stumps, but you can walk behind and in front of it! (And since I suck at pixel art, all of the images came from the gallery!)

There are 3 biomes you can find in a chunk:

  • A plains (will have flowers, some trees)
  • A forest (will have lots of trees, mushrooms, and stumps)
  • A dark forest (same as a regular forest, but the greens are darker)

I have yet to see a dark forest. :thinking:

Please share a GIF of an interesting seed you found!

Known bugs:

  • Inputting the seed 0 will cause the game to hang.
  • Inputting really large numbers for seeds sometimes might be too big for the RNG. @richard do you know the biggest number possible I can use as a seed? (I’m guessing 65535)

It also works on my PyGamer! The seeds will also stay the same!

11 Likes

yep, the max is 0xFFFF (aka 65535) and the min is 1

1 Like

Cool, I live it! I have a challenge for you, but of course, you don’t have to do it. The challenge is -

Convert this into a survival game, where you can -

  • Chop wood, gather flowers, etc.
  • Craft tools and shelters
  • Fight monsters and gather animal meat
  • Others too, like maybe farm?

Again, you don’t have to if you don’t want to. It’s just an idea!

2 Likes

This is pretty cool! I have no idea how this might have been made, and I have seen the code.

1 Like

Ah ha found one!

You can also leave the seed input blank and it will use a random seed. Although there is no way currently to see what seed you are on…

I want to do this soon but the problem is about figuring a way to remember which sprites I’ve destroyed and in which chunks, etc. I’m probably gonna have to figure out some sort of ID system for the objects… (time to import Vivian’s favorite extension!)

2 Likes

Yes, I was thinking that too. Maybe you can store the location in sprite data? Is what I thought.

1 Like

You can now destroy stuff! Press A while touching something and a status bar will show how much “health” is left in the thing!

It will also keep a list of everything you destroyed, and when you leave and re-enter that chunk, it won’t be there anymore!

You can also press the menu key and show the seed and what chunk you are on.

2 Likes

Have an Idea on seed make a separate var named seed and make the rng var to the seed, and on menu pressed, open a command console, and then when you type in seed you will get a splash message with the current seed.

Fixed it!

1 Like

Could you make more biomes? Like deserts and oceans and Savannahs … Just make minecraft biomes since this is related to minecraft.

2 Likes

a dark biome can be found n 99999 just go left then up

1 Like

in other words go to -1 -1

1 Like

I really like this procedural generation and that you’re tracking which objects have been destroyed. I need to look closer at the code. Not sure why I can’t zoom in or out when I’m in show code. The game I’m working on has a static map but I do try to keep track of periodically spawned sprites and where they are. When I load a different map, I have to put them all in a list and destroy them but then respawn them where they were when I go back to the original map. Sometimes it’s a bit glitchy so I’ll have to see if what you’re doing is more reliable than mine. I also see a use for using this procedurally generated world for randomized side quests to keep the player from getting bored.

1 Like

Every sprite I make is procedural so it takes the “seed” (forgot the formula for the seed) of the chunk and then seeds the RNG with it. Then I check every sprites “ID” (forgot the formula for that too, it’s been too long) and if that ID is in the list of supposed to be destroyed things, then I destroy it.

Ah yes it doesn’t work, click edit code instead and use the zoom tools in the editor.

I know this topic is litteraly dead but is this a dark forest?


Seed: 21564360 (Seed: 21564, X: -3, Y: 6)

4 Likes

Yes, it is!

1 Like

Woah!

1 Like

is it possible to spawn in a dark forest and it looks like the garlands in Minecraft likes the same

1 Like

WOW @UnsignedArduino ! I made a game like this a while back using your seeded random extension without EVER seeing this topic! I eventually abandoned it, but before that I added 2 biomes and placeable/saveable blocks using arrays!

4 Likes

Dark Forest
I found a dark forest!

2 Likes