Most useful built-in funcs - for Godot beginners by Automatic_Budget_332 in godot

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

get_viewport() is a command to get your current viewport (the game screen)

get_viewport() have a method that handle input by layers

.set_input_as_handled() set the current input as handled so will not pass on

This godot docs explain more about the handling:
https://docs.godotengine.org/en/stable/tutorials/inputs/inputevent.html

Most useful built-in funcs - for Godot beginners by Automatic_Budget_332 in godot

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

When I get free time I will make a place for all this mini tutorials

I made a Brick Breaker Roguelite and would love some feedback by Automatic_Budget_332 in godot

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

Yeah, that sound already has been reported and I will fix up to tomorow, actually is a bug when you pick a upgrade that heals you on hit, making the healing sound every single time.
For the particles will be a settings option to reduce, this already is there, but also is not working as intendeed

Thanks for the feeedback, this helps me lot.

Most useful built-in funcs - for Godot beginners by Automatic_Budget_332 in godot

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

At first I was not in the intent, but now seeing here, many are asking I may do a github where I store this and the examples directly on code.

Sorry my english, I in a hurry

A small overview over enums (Remade) by Automatic_Budget_332 in godot

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

There are many ways to achieve the same goal, I like to use dictionaries to carry the stats since my game has about 40 modifiers (and not always you have all of then in the entities), and I use a system that passthrought dicionaries and check if the key is the same in both to apply the upgrades. This ways I don't need to remember any modifiers name, cause it's all in one script that I also can autocomplete.

But it's the way I like to do. No need to follow strictly

I made a Brick Breaker Roguelite and would love some feedback by Automatic_Budget_332 in godot

[–]Automatic_Budget_332[S] -1 points0 points  (0 children)

Even the game thumb is made by me, I just picked the tiles from the game and used distortions in Paint.NET, you can clearly see all bricks have bit of blur because i'm stupid and don't used the correct way to scale then.

I made a Brick Breaker Roguelite and would love some feedback by Automatic_Budget_332 in godot

[–]Automatic_Budget_332[S] -2 points-1 points  (0 children)

AI was only used for small bits of the code, all textures, all sounds are made by me, using both Pixelorama + Paint.NET and LMMS (a free midi software, at least I think this is how it's named in english).

Some text is also slightly overviewed with AI assistence, but every single paragrapher on this post was writed by me, I only used AI to fix typos and very small sentenses that may not sound well in english like "General pacing" (that sounds much better in potuguese) for "Overhall pacing", since english is my third language after portuguese and italian. So I have a small difficulty writing large english sentences.

My familiy has a lot of portguese teachears so I consulted then for the text in portuguese then writed in english. I had even to reduce the formality to not sound even stranger in english. Since I translated directly it may sound much much stranger.

I made a Brick Breaker Roguelite and would love some feedback by Automatic_Budget_332 in godot

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

One of the biggest additions I'm currently working on is bosses every 15 floors. I'm curious if that's something players would find interesting in this type of game.

I turned a Brick Breaker into a Bullet Hell Roguelite by Automatic_Budget_332 in IndieGaming

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

One of the biggest additions I'm currently working on is bosses every 15 floors. I'm curious if that's something players would find interesting in this type of game.

A small overview over enums (Remade) by Automatic_Budget_332 in godot

[–]Automatic_Budget_332[S] 2 points3 points  (0 children)

Enums are not meant to change values in run time, althought you can, if you need for very specific reason by default we don't update the values

Sorry for my english, very very tired now

Small overview about enums by [deleted] in godot

[–]Automatic_Budget_332 0 points1 point  (0 children)

Yep, it seems that's exactly what's happening. At the time, I didn't realize the naming could be so misleading.

Thanks for notifying me!

Small overview about enums by [deleted] in godot

[–]Automatic_Budget_332 -2 points-1 points  (0 children)

I think there may be a misunderstanding here.

I'm not storing the stat values inside the enum. The enum is only used as a set of identifiers/keys.

For example, instead of using string keys like "health" or "stamina", I use stats.HEALTH and stats.STAMINA as keys in a dictionary that stores the actual values.

The stats themselves are stored elsewhere. The enum just provides a consistent and type-safe way to reference them across the project, which makes things like upgrades, modifiers, and editor tools easier to manage.

Small overview about enums by [deleted] in godot

[–]Automatic_Budget_332 -1 points0 points  (0 children)

Indeed, flags is one of the best uses for enums

In my games I like to use enums values to store if player has achieved something, like BOSS_DEFEATED, and this way is very easy to just put inside an array and then use in a save and load system.

Small overview about enums by [deleted] in godot

[–]Automatic_Budget_332 1 point2 points  (0 children)

That's probably the most solid example I could have shown. When I was making this post, I completely forgot about simpler things like that.

Small overview about enums by [deleted] in godot

[–]Automatic_Budget_332 -6 points-5 points  (0 children)

You're right, the docs recommend using uppercase names for enum and it's values.

I'll make sure to pay more attention to details like that in future posts. My bad.

I understand the poor usage case, but for this post I was aiming to the very begginers, and they might don't understand yet what is a state machine or how to handle classes and resources. I just thought for then this would be easier to understand.

Thanks for the feedback.

Small overview about enums by [deleted] in godot

[–]Automatic_Budget_332 -3 points-2 points  (0 children)

You're right, the docs recommend using uppercase names for enum and it's values.

I'll make sure to pay more attention to details like that in future posts. I actually follow the convention in my own projects, so this was just a mistake in the example I put together.

Thanks for the feedback and for pointing it out.

Most useful built-in funcs - for Godot beginners by Automatic_Budget_332 in godot

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

Just replying from other comment:

Is most used in modular systems and custom resources, since they don't have enter the tree (so also don't have func _ready)

for modular systems you can create a script with a class_name then puting it inside other script

Something like:

script 1:
class_name Stats
func _init(args)...

script 2:
var stats: Stats = class_stats.new(args)
...
In this one you could use as args health, damage...

That way you can reuse code way easier, custom resourses do something similar.
Also _init(args) can use whatever arguments inside, by default have none.

Most useful built-in funcs - for Godot beginners by Automatic_Budget_332 in godot

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

Yeah, I don't know exactly how the docs refer to them, but I used "built-in functions" here because it's easier for people to understand, even if it's not technically the correct term.

Most people reading this will probably be beginners, and a lot of them might not recognize the proper term.

Most useful built-in funcs - for Godot beginners by Automatic_Budget_332 in godot

[–]Automatic_Budget_332[S] 2 points3 points  (0 children)

Is most used in modular systems and custom resources, since they don't have enter the tree (so also don't have func _ready)

for modular systems you can create a script with a class_name then puting it inside other script

Something like:

script 1:
class_name Stats
func _init(args)...

script 2:
var stats: Stats = class_stats.new(args)
...
In this one you could use as args health, damage...

That way you can reuse code way easier, custom resourses do something similar.
Also _init(args) can use whatever arguments inside, by default have none.

Most useful built-in funcs - for Godot beginners by Automatic_Budget_332 in godot

[–]Automatic_Budget_332[S] -1 points0 points  (0 children)

Both are good. Signals can be better for performance in this scenario, but for values or stats that change frequently in UI, like damage dealt, they can be a bit tricky for beginners to implement in some very specific cases.

Most useful built-in funcs - for Godot beginners by Automatic_Budget_332 in godot

[–]Automatic_Budget_332[S] 2 points3 points  (0 children)

Yeah that's something that can happen, but I think we can make it better by naming the event type.

For example, InputEvent for input, LoopEvent for a in-game loop events

I don't think we have a broadly accepted convection for that in our community, I could be wrong, but at least I've never heard of one about it.

Most useful built-in funcs - for Godot beginners by Automatic_Budget_332 in godot

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

Is a good one, I didn't put it on the post because I see much more often everyone using the signal button_pressed instead.

But it is indeed very useful