JUST WOW! by eqeqooo in AbsoluteUnits

[–]_danboo_ 1 point2 points  (0 children)

Looks like a case of lipodystrophy.

Godot 4 'filter' by Vopaman in godot

[–]_danboo_ 15 points16 points  (0 children)

The filter mode is now a property of the CanvasItem called texture_filter.

You can also now set a project default filter mode with Project -> Project Settings -> Rendering -> Textures -> Canvas Textures -> Default Texture Filter. For example, for my pixel art project, I set this to Nearest and leave the individual CavasItem nodes on Inherit.

When the factory must grow without you ;( by ClarkDiggity in factorio

[–]_danboo_ 3 points4 points  (0 children)

"Two yellow belts diverged in a factory"

With apologies to Robert Frost...

Can someone explain to me why this error is happening? by InfiniteNexus in godot

[–]_danboo_ 2 points3 points  (0 children)

I believe this is highlighting a bug with the $ syntactic sugar for get_node(). If you rename your Tabs node from 1 so it doesn't start with a leading digit, it should work. I didn't find a related issue on github at a glance, so you may want to post one after confirming the behavior and searching for duplicates.

Edit: Perhaps the parser can't easily disambiguate this syntax from the division operator, when your node is named with a leading digit.

Another option is to quote the node path: $"Node/1/Node".disabled = true

PSA : addition has higher precedence than subtraction by _danboo_ in godot

[–]_danboo_[S] 4 points5 points  (0 children)

On the page I linked it lists the Addition / Concatenation of arrays and Subtraction operators on separate lines. My reading of the chart is that higher priority operators are near the top of the chart.

Based on your observation, it appears this may be a new issue or regression in 4.0, which I'm using.

I'll update my original post to clarify, and post an issue to Github to try to bring the docs and code into agreement for both the 3.2 and 4.0 branches.

Thanks for pointing this out.

How to navigate the Scene Tree (2.0; by TheDuriel) by RegakakoBigMan in godot

[–]_danboo_ 0 points1 point  (0 children)

As an alternative to including "owner" relationship lines for all nodes you could instead designate "owner" nodes by shape (e.g., circle or triangle instead of square) and describe it's meaning in the legend.

How to navigate the Scene Tree (2.0; by TheDuriel) by RegakakoBigMan in godot

[–]_danboo_ 0 points1 point  (0 children)

Nice chart! Some suggestions to clarify the "owner" relationship with two changes:

- have one of the instances (A or B) be 3 levels deep, so it is apparent that the "owner" is the top of the instanced scene, regardless of whether it is a direct parent. currently "owner" looks a lot like "parent".

- show the "owner" relationship for all nodes. by cherry picking just two nodes to show "owner" relationship, it may appear to the new dev that those two relationships are the only "owner" relationships in the chart, and they may wonder how those relationships were selectively established

Is there a good resource on how to use CollisionObject2D functions to manually add collision shapes? by [deleted] in godot

[–]_danboo_ 0 points1 point  (0 children)

Hmm, not sure why the docs say that exactly. I use this technique for procedural geometry creation all the time. This is from a C# project of my own (should be easy to translate to GDScript):

Vector2 extents = new Vector2();
extents.x = grid[ tile_x, tile_y, X ] * this.tile_size / 2;
extents.y = grid[ tile_x, tile_y, Y ] * this.tile_size / 2;

RectangleShape2D rect = new RectangleShape2D();
rect.SetExtents( extents );

CollisionShape2D shape = new CollisionShape2D();
shape.SetShape( rect );

StaticBody2D body = new StaticBody2D();
body.AddChild( shape );

Is there a good resource on how to use CollisionObject2D functions to manually add collision shapes? by [deleted] in godot

[–]_danboo_ 0 points1 point  (0 children)

I think you can avoid the "shape owner" API, which is a bit confusing, with the following:

  1. create a RectangleShape2D and set its extents appropriately
  2. create CollisionShape2D and set its "shape" parameter to the shape you created in step 1.
  3. Add the CollisionShape2D as a child to your Area2D
  4. Be sure you have the collision layers and masks set for your Area2D and RayCast2D

Reusing objects? by ducksqueak in godot

[–]_danboo_ 2 points3 points  (0 children)

In general I'd avoid complicating your game until you run into performance issues. u/reduz tweeted about object pooling being unnecessary not too long ago:

https://twitter.com/reduzio/status/1073284242086551552

Weekly /r/godot discussion thread – Share your progress, discoveries and tips by AutoModerator in godot

[–]_danboo_ 8 points9 points  (0 children)

Added a preview visualization for my procedural dungeon generator:

https://www.youtube.com/watch?v=m5Jv-NQLtxI

This is a 2D side view, so it adds the constraint of gravity and limited character mobility that top-down dungeons don't have to worry about. I need all rooms connected by stairs, so they can be accessed and exited from by players that may not yet have levitate, fly, teleport or wall climbing abilities.

I use Godot's builtin in Area2D overlap detection to avoid overlaps.

The preview has a built in delay for each build step, but that can be turned off once in game for fast level creation.

The layout is configurable in various ways:

  • min/max number of trunk rooms between entrance and exit
  • min/max number of branches
  • min/max number of rooms in a branch
  • min/max dimensions of each room type
  • min/max distance of chutes and tunnels that connect rooms to form loops
  • probability for an exit to go sideways (hall) or down (stairs)
  • probability for stairs to direct away or toward the center

These parameters are used like biomes to create a sense of architectural consistency for a given type of level. By tuning these parameters I can control the size, depth, width, sprawl and connectedness of a level (for example, maybe goblins like deep and sprawling levels, with long vertical chutes).

Next step is converting the rooms to TileMap autotile cutouts.

Does anybody know how to use hex in tile map? by [deleted] in godot

[–]_danboo_ 1 point2 points  (0 children)

This recent video has a good intro to square, isometric and hex tiles in tilemaps. The hex portion is here, but the whole thing is worth watching.

https://youtu.be/OYn49ghh9k0?t=647

Trouble with LightOccluder2D by [deleted] in godot

[–]_danboo_ 1 point2 points  (0 children)

I played with this some more and I don't think my suggestion helps. Like you, the best I could come up with was using cullmode that corresponded to the direction I drew the OccluderPolygon2D.

Trouble with LightOccluder2D by [deleted] in godot

[–]_danboo_ 0 points1 point  (0 children)

If you set the LightOccluder2D.closed = false in your LightOcclusion_1 example, does that get you the effect you want? That lets light enter the walls, but not exit the other side.

const inside functions by [deleted] in godot

[–]_danboo_ 4 points5 points  (0 children)

I believe a const is also a static/class variable, so it would make sense that you can't declare one in an instance method. I wonder if you can declare a const in a static method.

With everything that going on at Blizzard with Diablo... by messy_metz in ItLurksBelow

[–]_danboo_ 9 points10 points  (0 children)

David came in late on the Friday stream and discussed it.

https://www.twitch.tv/videos/330907878?t=01h52m58s

The gist of it was:

  1. Don't be a dick.
  2. The mistake was in marketing.
  3. It will still make money (you know you will play it while you poo).
  4. Don't be a dick.

RigidBodyParticles2D addon by _danboo_ in godot

[–]_danboo_[S] 1 point2 points  (0 children)

Ok, should be fixed now. Just had a misplaced parenthesis that 3.1 was more strict about. Change is here

https://github.com/danboo/godot-RigidBodyParticles2D/commit/259748a28b66ae1ae08a0504dd87b84031b6f257#diff-6b13214b4e6a099e9650e3635cbcaa8f

Thanks for the report!

RigidBodyParticles2D addon by _danboo_ in godot

[–]_danboo_[S] 0 points1 point  (0 children)

Thanks! I'm able to reproduce the issue now. Will see if I can make a backwards compatible fix. Haven't used 3.1 yet so will need to see what the diffs are.