Skip to content

u/noidexe

In this archive from Aug 2017 to Jul 2025

31
posts
193
comments
22
media
3.9k
score

In many cases it's simply "cargo-cult programming". Basically someone who actually understands what they're talking about makes a recommendation, that applies to a certain situation. After a while it becomes a sort of religious ritual where people do it because everyone before told them to do it because everyone before told them to do it, etc. without really understanding why.

I'm not sure how bad garbage collection is in Unity that people avoid instancing like the plague, but GDScript uses Automatic Reference Counting rather than Garbage Collection so instancing and destroying will not cause framerate hiccups in the same way.

If you get to the point where you are instancing and destroying a large amount of nodes per frame then switching to an object pool is a pretty easy refactor.

1 points

Security through obscurity means lack of knowledge of the security method is the only thing stopping you from accesing the data.

Here the obscurity part would be the attacker not knowing Godot Secure was used. Once they know that they can just google the repo and see how it works but that doesn't mean they can extract the assets. They claim that you still need to reverse engineneer every single build.

In any case, it'd be trivial to encrypt a game build so that only a specific user can decrypt it. The problem is when you want absolutely everyone to be able to play the game, and playing the game involves the user's system being able to access the original data, but at the same time you don't want the user to be able to access the data. There's no way to really solve that AFAIK.

2 points

Hmm then what about a tool/editor plugin for displaying the tscn file as editable xml?

Basically you get to see the tscn as xml and if you make changes the tscn gets modified and saved.

That way the storage format is still tscn which Godot can convert to binary on export, reference in exported properties and deserialize with better performance. It also lets a designer iterate directly on the design aspectes of the UI (eg: colors, styles, etc) without needing to wait for a programmer to implement every little change.

The tscn format is also git-friendlier than xml or json.

IMHO UI is visual stuff, it's a lot easier to iterate on it visually. You have the scene dock to see and change hierarchy in a much better and less error-prone way than copy pasting tags and you have the inspector to change property and see the final product update in real time. And you can have a non-programmer work on that while you solve unsolved programming problems, like the behavior of your app.

If you are still interested I think Godot 2 used xml before abandoning it. You can use that as a starting point.

1 points

I think the other post was about being able to display any webpage inside a Godot game.

If you want a declarative format that's Godot-specific then why not tscn?

  • No need to implement your own deserialization code in gdscript. You get built-in support that's always up-to-date for free
  • It's also human readable
  • Unlike XML it can be parsed on the fly since the parent child relationships are defined by property value and not by nesting
  • You don't have to design and maintain the schema
  • You can have your text format be the source of thruth while also being able to edit it visually inside Godot

Honestly I'd look at the common workflows in webdev and run the other way. It's the most enshittified part of the industry by far.

Try saving this as tscn and opening it in Godot

[gd_scene format=3]

[ext_resource type="Texture2D" path="res://icon.svg" id="1_icon"]

[node name="Node2D" type="Node2D"]

[node name="MySprite" type="Sprite2D" parent="."]
position = Vector2(100, 100)
texture = ExtResource("1_icon")

    [node name="SomeLabel" type="Label" parent="MySprite"]
    position = Vector2(0, -60)
    theme_override_font_sizes/font_size = 9
    text = "MySprite"
    horizontal_alignment = 1

        [node name="ChildOfLabel" type="ColorRect" parent="MySprite/SomeLabel"]
            position = Vector2(0, 170)
            size = Vector2i(100,20)
            color = Color(1.0,0.0,0.0,1.0)

Godot will automatically add the load steps and uids. Sure it's not the most convenient format to write but some VSCode macros are easier to write than a whole XML format

1 points

Thanks for the long clarification.

My confusion is when you claim "when you encrypt the files you are NOT redistributing it". At least from a technical standpoint the only case of not distributing the data would be the data not reaching the user. E.g. in a game streaming service you never get any compiled code, 3D meshes or raw audio files, just final renders and mixed audio.

When you say that sending encrypted files is not redistribution is this affimation based on legal experience? I am indeed not a lawyer so maybe there is a legal precedent.

1 points

Super late but I found this googling.

An example license from Humble Bundle here: [LINK]. The key word is "redistribute" -- when you encrypt the files you are NOT redistributing it, because the bad actor cannot simply "unzip" an archive and pull out the files; or simply open a folder and take the files.

This is not correct. If the files are part of the game, encrypted or not you are redistributing them, that's why the license says "other than as part of the relevant project".

If any asset license says you're legally reponsible for it being extracted from the game I'd recommend you buy something else

1 points

You should stick with Godot 4.4.x for now because 4.5 hasn't been released yet. Not even a release candidate or even a beta.

The whole point of dev builds is that you can test if your game breaks and you can open an issue explaining what happen. That way the maintainers can understand if your problem is a bug on their implementation, or if it's working as intended and it's a bug on your side, or if you are depending on some implementation quirk that no one considered important, and they can also evaluate if the feature breaks people's workflows or not and wether that should be addressed.

If it turns out the chunked physics are working as intended and that you'll be required to find a workaround then you can do it when 4.5 reaches stable

1 points

PhysicsDirectSpaceState3D.intersect_ray() should give you the face index of the collision point. You could have an array where the array indices correspond to face indices and the element to whatever you use to identify each tile (tile index, tile object reference, etc).

I'm not sure how fast intersect_ray() would be in that scenario but probably faster than any search function you implement in gdscript.

1 points

Highlights of this release: Download db now uses Github releases

Until now, GVM used downloads.tuxfamily.org as its mirror to fetch the list of remote versions as well as to download them. This had two issues: - tuxfamily offered no JSON endpoint so updating the download db meant fetching and parsing lots of HTML, which was slow and prone to errors - The downloads would be really slow from time to time and depending on your location

Other version managers used the Github releases in godotengine/godot, but those only included stable releases. Fortunately now we have the godot-builds repo listing all downloads in a machine readable format (godotengine/godot-website#608)

The only problem left was finding the time to implement it in GVM. Fortunately @jokoho48 stepped up and we can now enjoy faster updates and downloads.

To avoid listing downloads twice, when you upgrade to 1.15 the db will be rebuilt. After that it will be incremental updates only. Assign Godot version to a project using a drop-down menu

When adding a project folder to GVM you can now choose what version to use with it from a nice drop-down menu. The "load.." button will still let you choose any .exe manually. Thanks @NathanWarden What's Changed

Added a way to select installed versions more easily when adding new projects. by @NathanWarden in #32
Fetch Versions from Github by @jokoho48 in #35
Semantic ordering of "dev", "alpha", etc tags by me ( see #36 )

New Contributors

@NathanWarden made their first contribution in #32
@jokoho48 made their first contribution in #35
3 points

When C# support was added GDExtension was not even planned and you had to add a module and recompile the engine to make that sort of change. Since the integration was a lot of extra code and binary size, the devs started offering the "standard" and "mono" flavors as separate downloads.

There are plans to modernize the C# support so it uses GDExtension instead of the current custom glue. https://github.com/godotengine/godot-proposals/issues/7895

2 points

Yep. Godot C# also supports GD script and you can choose per script and they can even interact with each other through the scripting API.

You could have C# Gscript, C++, Rust, js, etc all in the same project if you wanted, besides how practical it would be.

You could also compile the engine without gdscript and even without the scene system (I'm pretty sure the latter is needed for editor builds though)

1 points

My advice would be: don't. I've played Eastward and Enter the Gungeon and if those are your references there's really nothing there that requires or is easier to do with a 3D renderer. Those games are made in Unity so it's not like 2D in 3D was a choice, there's no other way around it. I've seen 2 hour-long talks about how to do pixel perfect 2D in Unity which in Godot, or any 2D engine, would be at most clicking a couple checkboxes. I've also worked at a studio doing 2D in Unity and it was really painful, and it wasn't even pixelart.

  • In 3D you work in units rather that pixels, so need to define a pixel-per-unit ratio and adjust a lot more settings than just sampling method to get everything to look right
  • all your data structures have an extra z property that can cause trouble. If a character is made of several sprites and you use the z axis for sorting, it easy to get the parts interleaved when another character is very close to it. If you want to scale uniformly you can't just do scale *= some_float, it will affect the spacing of the parts in the z axis and you get sorting issues
  • there's nothing stopping you from using shaders on 2D, they work just fine. Most of what you can find in godotshaders.com aimed at 2D games uses canvas_item shaders which work with 2D nodes

I think 2D in 3D is much more useful for games like Octopath traveler where it's a 3D game with some degree of pixelart aesthetic but no need to be pixel perfect.

0 points

The node system makes you really productive but it has an overhead when it comes to spawning tens of thousands of similar objects. There are native plugins for bullet hell games. They will take care of the low level implantation of bullets while you call usually keep using nodes for the rest of the game.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

โ†orโ†’
Previous / next file
โ†‘orโ†“
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.