Godot stores all of it’s .tscn files .tres files and basically all of the files that are edited through game dev in plain text. That is text that can be edited. Excluding asset creation and exporting the game, do you think that it’s possible for anybody, with enough experience to actually create a game only editing things like scenes, nodes, and scripts through some sort of text editor, namely Windows Notepad?
I know that it’s most likely theoretically possible but I mean from a human standpoint, do you think that any human being knows enough about Godot’s files to actually be able to create a game only using notepad to edit game files? Do you think anybody has tried it?
It is possible, and for the reasons you describe; but I don’t think anyone has or would do this as there aren’t any particularly interesting side effects. You would still have to open the editor (at least the cli) to import and then export a game pck file, and the end result is a game just as if you used the editor. If you need to you can (and maybe should) learn the text file format by opening your own project files and checking out the cfg-like format. Making a game with only the text files, and with a particularly bad editor, will not reveal any new information. Like if you made a game in assembly that would reveal a plethora of information obscured by not only game engines, but frameworks and compilers too; your game may come out worse off but could have very unique features, like fitting and running in the MBR boot sector of a hard drive.
Good thing I’m also curious to learn assembly!
Not disagreeing but how would you come up with these (and similar id’s generated by the engine)?
script = ExtResource("1_cpu2y")
Would you not need to decipher the underlying engine file management editor code and reproduce that in some way?
I personally do a fair amount of coding in Kate (effectively notepad) because I’m not really a big fan of the gdscript text editor.
It’s possible, but I wouldn’t say the entire game could be done that way.
yes …

Those are just unique ids, you can write anything you want as long as it doesn’t overlap. They are unique to the file, near the top you likely see a [ext_resource type="Script" path="res://myscript.gd" id="1_cpu2y"]. So long as this id and that ExtResource id match it will work, the editor just produces semi-random ones to avoid overlapping.
This sounds like a “fun” challenge ![]()
![]()
Are they really just randomly generated? I sort of assumed they were hashes from perhaps date and time to ensure uniqueness. I suppose a clash is quite unlikely.
(Actually I just calculated it to be about 1 in a massive order of magnitude ~10^20, hash not needed.)
me editing my files to change all my uids to stupid words
When generated they are prefixed with the order loaded 1_abcde, 2_abcde etc, so they never will clash and that’s really all they needed to do.
Thinking more on it I believe the extra random chars helps with merge conflicts, if two people add a new resource to the scene and merge their changes they would have the same ordered number, but the extra hash ensures uniqueness i.e. person A merges 3_abcde and person B merges 3_edcba without fail, if it was only the starting 3_ then a conflict would appear.
And looks like the resource saver will repeatedly generate new uids if they do collide.
String attempt;
while (true) {
attempt = E.value + Resource::generate_scene_unique_id();
if (!cached_ids_found.has(attempt)) {
break;
}
}
And generate_scene_unique_id is seeded with a crazy date time hash, but the actual generation is random after that seed.
String Resource::generate_scene_unique_id() {
// Generate a unique enough hash, but still user-readable.
// If it's not unique it does not matter because the saver will try again.
if (unique_id_gen.get_seed() == 0) {
OS::DateTime dt = OS::get_singleton()->get_datetime();
uint32_t hash = hash_murmur3_one_32(OS::get_singleton()->get_ticks_usec());
hash = hash_murmur3_one_32(dt.year, hash);
hash = hash_murmur3_one_32(dt.month, hash);
hash = hash_murmur3_one_32(dt.day, hash);
hash = hash_murmur3_one_32(dt.hour, hash);
hash = hash_murmur3_one_32(dt.minute, hash);
hash = hash_murmur3_one_32(dt.second, hash);
hash = hash_murmur3_one_32(Math::rand(), hash);
unique_id_gen.seed(hash);
}
// continues to generate 5 random characters....
Ironically in testing this I found a would-be collision as #_5l4qv, maybe Godot’s random is not random enough!
[ext_resource type="Script" uid="uid://b86oa85jfgyok" path="res://Mech/base_player.gd" id="1_5l4qv"]
[ext_resource type="Texture2D" uid="uid://d2ervdwhevg7y" path="res://Assets/dot_crosshair.tres" id="2_5l4qv"]
It’d certainly be possible to make the entire game that way. Although a better strategy than manually typing a lot of tres stuff would be to create everything at startup via scripting.
I know godot devs know far more than me, but that line fills me with horror!
And of course they looped to avoid clashes, they do know their stuff. If it had been me I would have just used the randomly generated thing and crossed my fingers! Such an amateur!
while true:
if condition:
break;
IIRC this is the recommended method to replicate a do-while or do-until loop in GDScript.
I went looking to verify this but I can’t seem to find it written anywhere now although I found it recommended for Python here
.