I am planning on making a game with Godot somewhat similar to various Source Engine Titles.
I was wondering if there was a way to make maps exist externally, but can be "opened" from the Game.
How would I do this?
I am planning on making a game with Godot somewhat similar to various Source Engine Titles.
I was wondering if there was a way to make maps exist externally, but can be "opened" from the Game.
How would I do this?
I read the page. I'm not sure this is what I was referring to... How would I create this sort of "ecosystem" where Entire Maps consist of One File as One Map, and can be "imported" for later use without having to completely recompile the game. This is intended for people to make community maps and what-not.
Here https://matt-lucas.itch.io/level-buddy
It's not entirely in Godot but so do using Hammer for Source. Just replace Hammer with Blender.
Unfortunately, if you stick to open source tooling and Godot, it's going to be a bit poor. Blender was never intended for level design (and still is pretty bad at it, in my experience) and there is no generic open source level designer tool that I know of, outside of SabreCSG which is integrated into Unity. Godot also doesn't have any 3D editing facilities built-in right now.
The best way to go about this would be to have a 3D level editor built into Godot, but that's going to be a lot of work - SabreCSG, for instance, has about 25,000 lines of code at the time of writing. Distribution will remain an issue (packaging each map into a downloadable package) that will remain highly game-specific (as many games don't need that at all). Creating an high-quality, usable UI is also a big challenge here.
I implemented a level editor in one of my 2d games.
To accomplish this, I use 3 scripts. One handles all UI events from the editor, one exports the level (and does some other stuff) and the last one is able to load levels. To save levels and load levels, I use dictionaries.
The code is far from perfect, but I hope it helps you anyways: UI: https://github.com/cdqwertz/game/blob/master/scripts/level_editor.gd Level Editor: https://github.com/cdqwertz/game/blob/master/scripts/level_editor_level.gd Load Level: https://github.com/cdqwertz/game/blob/master/scripts/level_editor_play.gd
If all you need is to load custom maps, you can open them as scenes with a bunch of helpers (like spawn points, pick up points and stuff like that).
So your map would be a .scn file with a descriptor gdscript attached onto it.
@Calinou said: Unfortunately, if you stick to open source tooling and Godot, it's going to be a bit poor. Blender was never intended for level design (and still is pretty bad at it, in my experience) and there is no generic open source level designer tool that I know of, outside of SabreCSG which is integrated into Unity. Godot also doesn't have any 3D editing facilities built-in right now.
The best way to go about this would be to have a 3D level editor built into Godot, but that's going to be a lot of work - SabreCSG, for instance, has about 25,000 lines of code at the time of writing. Distribution will remain an issue (packaging each map into a downloadable package) that will remain highly game-specific (as many games don't need that at all). Creating an high-quality, usable UI is also a big challenge here.
what! Blender is amazing for level editing, it just has a steep learning curve...all types of snapping and array setups....what was the problem you had using it?
and in response to the firs post yes, you can dynamically load objects via script AFAIK, I was going through the docs trying to find some more info for you but fell short....all I found was this
var scene = load("res://myscene.scn") # will load when the script is instanced
var scene = preload("res://myscene.scn") # will load when parsing the script
docs.godotengine.org/en/stable/learning/step_by_step/scripting_continued.html#creating-nodes
@justinbarrett said: what! Blender is amazing for level editing, it just has a steep learning curve...all types of snapping and array setups....what was the problem you had using it?
It's terribly hard to have good, game-friendly topology in a tool like Blender when used for level design, and the viewport (the OpenGL renderer) leaves a lot to be desired (it'll be a pain to preview the level's lighting as it'll look in the final game, if it's even possible at all). I've also found the workslow to be quite slower than in dedicated tools (compared to TrenchBroom, for example).
If you look around, you'll see that no open source game really uses Blender for level design, except for SuperTuxKart, but their levels are wide, open areas with mostly terrain and a road, which is definitely not something you'd see in a FPS.
fair enough, I'm not sure what you mean by "game-friendly topology".... I also never do any fps stuff...and have never used the other software mentioned...but for me I find it to be an amazing tool...I mean I can texture, rig, animate, and do level design all at once...buuuuttt, I've begun to derail this thread so...sorry.
Sorry to revamp this thread, but I'd like to suggest Qodot and Trenchbroom, which has come up recently. Maybe this is nothing new by now, but just in case. I'm personally not too fond of the workflow (I find it confusing to set up, and perhaps overly complex), but it's a more than viable way. Perhaps the best one currently available.
I tried making my own generalized editor in godot in the last two years, where the goal would be a mix between Hammer and Unity's Pro Builder, but... I got completely stuck at the coding the 3D modeling part... that just pulled the floor from under my feet, really...
I wish there was such a generalized, engine agnostic 3D map editor.
@justinbarrett, I'd just like to add to what Calinou said: I've used Hammer for a few years, and I also played around in DarkRadiant (Dark Mod's editor), and the workflow in those is really the most adequate. You don't just set up the geometry of the map, you also place embellishments and 3D models, as well as triggers, logic, effects, sounds, lighting, AI scripting, paths and navigation,... you virtually make the entire game in one place, really.
But even just as far as geometry goes, in blender you get UV stretching if you reshape things, and you have to manually fix the UVs. This isn't good for level editing, and it doesn't happen in actual level editors. TextureBuddy (companion to the LevelBuddy blender addon, mentioned above), helps keeping the textures in world space and fixing the UVs for you, but other than that, Blender just isn't really good for a traditional kind of FPS level design. Problem is, Level/TextureBuddy are pretty much abandonware, and they still lack many needed improvements... I tried to poke at this too, but Blender's API is still very mysterious to me.
Old thread, but still very relevant. I am trying to figure this out too. I have a few game ideas I'm prototyping, one of them is an FPS similar to Half-Life in the level design.
I do think the dedicated level editor would be great, especially with the kind of stuff that Source 2 has, like cutting doors into a wall which is a pain in the butt in Blender and not dynamic. I'll have to look into the license, I guess using Hammer may be an option and writing (or finding) and importer for Godot.
The other way would be to make modular pieces of the level and snap them together like Lego blocks. I guess this is used in Unity and Unreal, and is still an option depending on the type of game. However, in my tests I found sometimes using a lot of blocks like this can cause issues with lighting and sometimes physics (at the boundaries of the block). Even in Unreal, you can see the seams between blocks where the lighting breaks. I don't think this is an easy problem to solve, but you can work around it okay.
And I haven't worked with Godot CSG features yet, maybe they are better than I expect but it didn't seem as robust as Hammer just from what I've seen. Not sure what the best answer is, but I would love to hear what people have been doing.
You can do doors in blender fairly easily...with just a boolean operation...for all intents and purposes, the same as csg...the underlying technology is quite different..the results are the same. I never used hammer..nor have I heard of it..this does not mean it's not a good robust software..I'm just un-aware of it.
from my understanding godot csg is quite good...and could be used in engine as well...so...maybe worth looking into.
in the end though, you are going to need to do your homework on all of these and figure out how to do what you are trying to do in one of them, or all of them, before you know what works best for you.
@woopdeedoo said: But even just as far as geometry goes, in blender you get UV stretching if you reshape things, and you have to manually fix the UVs. This isn't good for level editing, and it doesn't happen in actual level editors. TextureBuddy (companion to the LevelBuddy blender addon, mentioned above), helps keeping the textures in world space and fixing the UVs for you, but other than that, Blender just isn't really good for a traditional kind of FPS level design. Problem is, Level/TextureBuddy are pretty much abandonware, and they still lack many needed improvements... I tried to poke at this too, but Blender's API is still very mysterious to me.
I'm pretty sure godots csg meshes have this particular area covered.
@justinbarrett Yes. I understand how to use booleans in Blender. But it is not very flexible. If you want a variation on a room (maybe you want 2 doorways) or you are trying to build a similar room but not the same (maybe it is a little bigger, etc.) then you have to go into Blender and make another model. With level editors this becomes very easy and not a problem. I found this video to demonstrate what I mean. The dude has an annoying voice, but it shows what I'm saying.
How about modeling a door, importing it, parenting it under a csg cutter of appropriate size and you'll be able to instance the resulting scene as a child to your csg wall pieces?
@cybereality : That is a lot slower than in blender(not by a small margin)....but if you all are more comfortable with these methods..like I am in blender(thus the vast speed improvement)..then far be it from me to tell people what software to use. At this point though I am merely distracting from the conversation..so I will bow out gracefully(hopefully :) )
Looks like the official answer (if you want CSG level modeling) is to use TrenchBroom and Qodot,
The CSG nodes in Godot are mainly intended for prototyping. There is no built-in support for UV mapping or editing 3D polygons (though extruded 2D polygons can be used with the CSGPolygon node).
If you're looking for an easy to use level design tool for a project, you may want to use Qodot instead. It lets you design levels using TrenchBroom and import them in Godot.
@justinbarrett See these videos for some advancement Valve has been making with Quake-style level editors that are far quicker and easier to use than Blender. Though of course you could also model it all with Blender, the editor allows you to quickly prototype levels and iterate in a way that is cumbersome when you have to remodel work, especially in terms of texturing and UVs. Though most games today I think go with the modular approach, I still think the old style allowed for better level design. Valve used this technology on the recent Half Life Alyx game.
Or see here, the same idea in a Unity plug-in, it's called hotspot texturing.
Here is a Twitter thread with someone who loves level design.
https://twitter.com/joewintergreen/status/1262662025903128576
I wonder if Hammer could export to Godot? Technically I think it could be possible but maybe not the license.
Or if it would be better to add these features to TrenchBroom?