@MrMen I don’t want to make a limited amount of scenes to the player because if I do that I am going to limit the player to have 10 scenes as an example. If I am messing with procedural generation which means making a pseudo-random I need to let the people player have unlimited of these.
The best way to go about this in GDevelop is using external layouts.
You can design and store parts of your scene (rooms, corridors for example) in external layouts and load them randomly as you need them whenever you start the scene. So essentially you need only 1 scene and a bunch of external layouts.
Certain objects could also have multiple animations that you choose from which one to display if you want a barrel or crate for example to make it even more random.
But obviously you need to come up with a smart algorithm that generate a fun and playable scene from the external layouts.
If you want anything more serious than that, in my opinion it is waste of time to use GDevelop you only going to find your self trying to work around the limitations of the engine. You should use a framework instead since you be coding most of the things anyway, you also don’t really need a level editor as you want to generate it procedurally so then it is makes more sense in my opinion to code everything in a framework like Phaser, MonoGame, AppGameKit, SpriteKit, CerberusX, BlitzMax and similar…
@MrMen he idea is that I don’t want the scene to be regenerated with a certain seed every time. That would just take a very long time to load especially if there is more stuff that needs to be spawned.
And I want the player to have scenes like in terraria or Minecraft, so it is a world that you can load anytime the same generate once and have an infinite amount of worlds.
You don’t t have to code it to make it infinite. As I mentioned you need only 1 scene and you can store parts in external layouts that you can use to build a scene from each time you restart that 1 scene. So you get a different result each time you start the scene = you have infinite scene.
What I am recommending is not really procedural generation but this is what I recommend to do, to build the level from external layouts but if you really want to generate entire levels from scratch, piece by piece then in my opinion you should consider to use a framework.
@MrMen Yes that is exactly what I mean. I want to save the world so that the player can access same seed and everything would be the same as they left it the last time (if they build something it shouldn’t get “deleted”)
You can use storage events to save, take a look at the “level editor” example included with GDevelop.
So to stick to what I was recommending, you can generate the level from layouts and then save using storage events and then load next time or generate a new level…
@ddabrahim that is an awesome example but my problem with that is, that it is creating the objects when the scene loads which means if you have an entire world with like 2000 different blocks, it would take a very long time for them to firstly create the objects and then after that actually render.
Yes and this is exactly the point I am trying to make here. I don’t believe you can improve the loading time in GDevelop without getting deep down to the rendering engine and asset management. If you want to go crazy with procedural generation and looking for an optimal result you really need to go with a framework. For example, if you go and use a rendering lib like Pixi.js, you could possibly do what Minecraft for example, you can start rendering only what the player can actually see and load everything else in the background asynchronously while the player is playing the game, no need to wait for everything to be loaded but only that the player immediately need. Potentially you could even load assets in to a container and draw the container with a single draw call. You can not do things like this with GDevelop, it doesn’t give you this level of freedom. the best you can really do is layouts in my opinion.
I think because there is no real plan and roadmap behind GDevelop. Contributors usually just pick a random thing they find interesting and do it just for fun with no real plans and use cases in mind. Probably the dev contributed this extension did find a lib to generate noise values and thought it could be interesting to work with and to have it in GD and that’s it really. No further thought was put in to it maybe. But I could be wrong, wondering if there is any example demonstrate how and when this extension is meant to be used maybe?
The perin noise is awesome for camera shakes.
And you can use it to create small random generated levels.
For a turnbased rpg with small random generated battle maps (like 20×20 tiles) it works really well.
Generating entire world takes forever to load tho.
The API can be improve a bridge exist between the C++ core and the API.
I think because there is no real plan and roadmap behind GDevelop. Contributors usually just pick a random thing they find interesting and do it just for fun with no real plans and use cases in mind.
True, sadly, that’s why if you have a dev background it will be easier for your to use a lib like suggest @ddabrahim, and/or take a look on the GDevelop repository for get help and add extend the API.
Probably the dev contributed this extension did find a lib to generate noise values and thought it could be interesting to work with and to have it in GD and that’s it really.