Level Editor

Hey Guys,
I wonder how i could do a level editor for my jump n run game.
I would like to creat a scene were the user can place some tiles and place the spawn for player and enemies.
I don’t know how i should start or how i save the tiles or how i could do the spawn.
I know this is a big question and it’s hard to answer but i realy want to do that.
would be really happy if someone can help me.
Thanks for answers.

One of the example projects that comes with GDevelop is called Level editor, so that should be a good starting point.
In GDevelop if you click on the little triangle under “Open” then you can open the examples folder.

Thanks for the answer.
I cannot find these Examples. I use GDevelop 5. Maybe these templates are not in this version. I will download the older version and try it.

EDIT: I found a Template game named EUF. It has a editor to and can look how he did it, but didn’t found the Example you called.

Ok, I did the Editor.
I can place Blocks, remove them, toggle snap-to-gride on and off and much more.
But my big problem is how can I save and load the blocks. I know i am very annoying but I need to finish it.
Has anyone a Idee how i can do this?
I could not find the example in GDevelop with the Level Editor.
I would be very thankfull if anyone can send me this example.

The basic level editor is included with GD4. File->Open examples and find it in the examples folder.
It is also show you how to load and save the blocks you have created.

If you still can’t find it, maybe my example of save/load helps to get started:

If it doesn’t help, keep looking in the GD4 folder until you see a folder called “Examples” and inside that folder you need to find a project called “Basic level editor”

Thank you for trying to help me. The example gametemplates.itch.io/template-save-load gave me an Idee how i could do this but how can i manage the IDs? If i delete an block in the Editor, this System will no longer work worke. There must be a way to get the numbers of each object and there x and y coordinates. Can anyone just send me this example wich comes with GD4? I really cannot find it. Just downloaded it three times and installed it three times and nothing changed.If i click at open examples it just open me the folder from my current game.

EDIT: I just downloadet the no installer version and found the Example Folder! I wish I did this earlier… xD

Create the ID numbers dynamically when you save and check their existence of value in the entry when you load.

Write object.X() in “Object” + ToString(Variable(ID)) + “X”
ID = ID + 1

While “Object” + ToString(Variable(ID)) + “X” exists in file “save”
-read the value
-create object in position X using the value
ID = ID + 1

Obviously you need to go through all type of object for all kind of values you want to save. Replace “Object” with the actual name of the object so yo can find them all and save/load value for each type one after the other.
Save/Load grass tiles X,Y,Scale, Angle, Animation
Save/Load barrels X,Y,Scale,Angle, Animation
Save/Load enemies X,Y,Scale,Angle, Animation
Save/Load player X,Y,Scale,Angle, Animation
You need to go through everything you want to load and save, one by one.

If you don’t understand, please refer to the beginner tutorials.
Maybe I’ll update the example when I have time but it should help you if you know what you doing.
I also plan to make game templates including a level editor, but I can’t guarantee any timeline.

So you don’t know where GDevelop is installed on you computer and navigate there manually?
Oh well, have you tried to download only the zip file then?
github.com/4ian/GD/releases/dow … staller.7z

It is the windows version but the examples are the same. If you unpack it, you should find the EXAMPLES folder inside the GD folder and all the examples including the “Level editor” inside that folder.

Now, the only thing left to do is open the project files in GDevelop. I hope you can manage :confused:

You can put all your savable objects into a group “Savable” so you don’t have to do the machine work (repeat the same thing over and over again) :wink:

About the IDs, it doesn’t matter if you delete a block, but every block needs an unique ID, that’s all.

True, but you maybe don’t want to save the same values for all the objects. For example if the animation and scale does not change, it pointless to save it :unamused:

True, just quoting your example about saving the same data. But you could save the shared data in the main event (position, angle), and then add little exceptions for each special case (save animation for sprites, string for text objects, size if it’s different than default, etc).

Thanks four your help guys. I figured it out yesterday how i can do this. Really i could not find the Example folder in the installed Version, only in the ziped one. It doesn’t matter now. I have now the Examples folder, i figured it out how to make an Editor and my Game to 90% finished. Thanks for your help.