Hi!
Complex question, as there’s no right answer here. The right answer would be the one that suits your needs and skills, and depending on the kind of games and its mechanics, it may differ a lot.
How can I make “scriptable objects”?
In Godot, the equivalent of Unity’s ScriptableObjects (I believe that’s what you’re talking about) would be Resources. Here’s the link to the official documentation on how to create your own resources.
You could also store your game data into text files such as Json/XML/YAML files. Every way of storing data has its cons and pros, I’m not digging too deep into that as it’s not the main subject here, just know that those things exist (as in Unity, where ScriptableObjects are not the only way to go).
How can I get those as tiles or entities to place into a level?
Say you’re using Resources; that would mean that somewhere in your project, you have folders and files dedicated to the storage of all your level editor entities.
Knowing the folders paths, what you could do is loading all of the files dynamically on the level editor startup, so that when you create a new resource (tile, enemy, whatever), it’s automatically handled. It may sound like an expensive way of loading things, but for a level editor, I don’t think it matters that much to have some lag on start.
So for instance, if you have a folder res/level_editor/tiles
, containing tiles, you could in your script load all the files from that folder (I’ll let you explore how to do that), so you’ll have a list of tiles, that you can then send to some interface.
A basic idea would be to have a menu with a scroll container, in which you instantiate a line for every tile; that way, you’ll now be able to scroll through all the tiles, and when one is clicked/selected, it can be painted onto the level, etc. depending on what you need.
–
If you’re looking to work on a level editor because you have the time and want to learn how it’s done or you like the technical challenge, go on. However, if you’re in need of a classic roguelike editor to build an actual game, I’d suggest you have a look at existing editors, such as LDTK. I don’t know how this one would fit your needs, but it’s always a good idea to make further enquiries on existing tools.
Hope that helps a bit!