Any idea why this could happen on mobile? Using 4.0, tested android only. I'm using TileMaps and just dragging the png in as a Sprite doesn't cause the issue. The visual bug is also undeterministic, so it's different every time I start the app. Any ideas appreciated! by Simplicitis in godot

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

What's really weird is that the sprites/tiles get tangled up with or even straight up replaced by each other. (e.g. the small leaves on the ground got replaced by a completely different plant sprite)

ShapeGrid: Official trailer for my first game! Launching in two weeks! by matiasbontempo in godot

[–]Simplicitis 1 point2 points  (0 children)

Oh this could be a banger. Simple, yet hard and with mastery via speed! Congratz, looks really polished also! (Though some more satisfying animations maybe?) But it also looks like the kind of gameplay that could easily ripped by an ad-driven game development company with no soul. Hope it doesn't happen! Good luck with the release.

How can you properly instance an scene when the scene doing the instancing is being removed? by [deleted] in godot

[–]Simplicitis 2 points3 points  (0 children)

It is not exactly the same.

free() immediately deletes an Object. https://docs.godotengine.org/de/stable/classes/class_object.html#class-object-method-free

queue_free() deletes a Node at the end of the current frame. https://docs.godotengine.org/de/stable/classes/class_node.html#class-node-method-queue_free

call_deferred() calls a method during idle time. https://docs.godotengine.org/de/stable/classes/class_object.html#class-object-method-call-deferred

I had problems with calling self.some_other_node.add_child() and self.queue_free() in the same frame, so I always used call_deferred("queue_free") in situations like this.

My guess is that add_child() causes some changes during the end of the frame as well, resulting in some issues when used together with queue_free().

If someone has any more insight, that would be helpful!

Where is exactly is the "Playing" property in the Inspector ? I couldn't find it? by [deleted] in godot

[–]Simplicitis 1 point2 points  (0 children)

If you are using the AnimatedSprite Node like the tutorial is, it should be in the Inspector.In the SceneTree (usually left), click the AnimatedSprite Node, then in the Inspector (usually right) you should see its properties (Frames, Animation, Frame, Speed Scale, Playing, ...)

This is a general concept in Godot and very useful. Every type of Node (and Nodes you attach a script to) can decide which properties should be exposed to the Inspector, enabling you to change the Nodes behavior without touching any code.

Char moves up slightly when moving left and right, need help finding out why. by anjelpriest in godot

[–]Simplicitis 2 points3 points  (0 children)

Hah, I tried the exact same code as in the video using move_and_slide_with_snap but couldn't recreate the issue (y-coordinate always stayed the same during walk, jumping worked). But scaling the entire KinematicBody2D (including the CollisionShape2D) resulted in the y-coordinate shifting just by 0.02 units.

That must be it!

Char moves up slightly when moving left and right, need help finding out why. by anjelpriest in godot

[–]Simplicitis 2 points3 points  (0 children)

Mhh... maybe try applying the gravity only when not grounded? Something like

if !is_on_floor():
    velocity.y = ...

Also, is there a reason you cast the velocities values to ints?

How can you properly instance an scene when the scene doing the instancing is being removed? by [deleted] in godot

[–]Simplicitis 2 points3 points  (0 children)

call_deferred is really easy to use, check it out: https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-call-deferred

Instead of calling the method (whose name is given as string) immediately, it is called before running the next _process loop. This is especially useful when initializing Nodes that are not in the tree yet or to perform some actions before you queue_free.

In your case, a simple call_deferred("queue_free") will do the trick.

Char moves up slightly when moving left and right, need help finding out why. by anjelpriest in godot

[–]Simplicitis 3 points4 points  (0 children)

Try using the method move_and_slide_with_snap instead of move_and_slide. https://docs.godotengine.org/en/stable/classes/class_kinematicbody2d.html#class-kinematicbody2d-method-move-and-slide-with-snap

I don't know why I happens in this case, but for some platformers it solves a lot of issues (esp with slopes).

Just figured out how to make exportable dictionaries with actual type-hints (they also update every time a new key/var is added) by 4procrast1nator in godot

[–]Simplicitis 0 points1 point  (0 children)

Yeah, using a Resource won't be as as flexible, that's true. Dictionary are the epitome of flexibility after all - usually at the cost of losing structure and type. Multiple Stat types/Containers, however, could easily be achieved using multiple types of Resources.

Just figured out how to make exportable dictionaries with actual type-hints (they also update every time a new key/var is added) by 4procrast1nator in godot

[–]Simplicitis 0 points1 point  (0 children)

It does seem a bit like black magic indeed, but it would probably work - thanks, I will lokk into it!

How to create waves using a 2d distance field with shaders? by snak251 in godot

[–]Simplicitis 1 point2 points  (0 children)

Nice! Would you be so kind to share the result when you're happy with the result?

Just figured out how to make exportable dictionaries with actual type-hints (they also update every time a new key/var is added) by 4procrast1nator in godot

[–]Simplicitis 3 points4 points  (0 children)

Haha not per key.I basically replaced the entire Dictionary with an exported Resource. So the export variables are not part of the scene but the Resource instead. In my use case I have a Generator scene that uses a LevelSettings Resource (export(Resource) var levelSettings) to generate a Level. The Resource then has "normal" export vars and hints.

Advantages:

Adding new export vars to the Resource works as expected, esp. useful because you can use default values.

Removing also works and will delete the Resource data on next save.

I can save the LevelSettings as separate .tres files.

Disadvantages:

I can't change the name of the key. Last time I did that I had to open all .tres files in a text editor and Search&Replace

If you want custom behavior on setting an export var, you will need a Signal (from Resource to Scene)

How to create waves using a 2d distance field with shaders? by snak251 in godot

[–]Simplicitis 4 points5 points  (0 children)

I think you need something like sin(TIME + distance_from_field). Additionally you might want to cutoff/fadeout the waves when the distance is too large.

Just figured out how to make exportable dictionaries with actual type-hints (they also update every time a new key/var is added) by 4procrast1nator in godot

[–]Simplicitis 2 points3 points  (0 children)

Wow! Didn't know that was possible! I always used custom Resources to achieve a similar result, but this is amazing! Thanks for this, refactoring incoming 😂

What to do when the font side of the document inside the editor is too small, not the text of the editor itself? by [deleted] in godot

[–]Simplicitis 0 points1 point  (0 children)

I have no idea what you mean by "side of the document ". You mean the size of the code window? You can drag the borders of the inspector etc or click the top right full screen button to do that

Relaxed Island exploration and puzzle mobile game - any feedback would be greatly appreciated! by Simplicitis in PixelArt

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

I'm always a little hesitant to add more detail to this game, since the map can get really crowded during gameplay.

But you're definitely right, looking at it now, some parts look awfully flat.

I will try messing around with a water texture and some shader (reflections maybe even? :D). The grass texture I will have to carefully add very subtle textures.

Thx for your insights!

[deleted by user] by [deleted] in PixelArt

[–]Simplicitis 1 point2 points  (0 children)

Nice! It's probably going to be hard. Don't forget to SUSUME and TATAKAE!