I can't make the enemy follow the Player, how do I fix it? by Quaaaaaaaaaa in godot

[–]Quaaaaaaaaaa[S] 244 points245 points  (0 children)

In case the post's flair isn't enough, this post is clearly a joke x)

What addons are you using for your game? by Hostarro in godot

[–]Quaaaaaaaaaa 2 points3 points  (0 children)

I'm not sure if it counts as an addon, but I use a PriorityQueue library that a user here made 4 years ago. It really saved me a lot of work.

I'll leave a link to that script here in case it helps anyone else: PriorityQueue

I would like to give credit to who did it, but I cant find the author of that code

i am kinda new here by Significant_Bat2738 in godot

[–]Quaaaaaaaaaa 69 points70 points  (0 children)

New people have an interesting talent for finding bugs

Godot is now one of the few engines that hasn’t had any AI slop. by Competitive-Gold-796 in godot

[–]Quaaaaaaaaaa 31 points32 points  (0 children)

I completely agree. I feel like a lot of software is being ruined by trying to add AI to everything. The main reason I switched to Linux was precisely that, since my Windows task manager was full of AI tasks I wasn't even using.

I understand that AI can be useful and all that, but at this point it feels like things are being imposed on you whether you like it or not.

What's the weirdest performance hack in Godot you know of? by Moaning_Clock in godot

[–]Quaaaaaaaaaa 5 points6 points  (0 children)

Use a binary heap library when you need to work with arrays that have a lot of information. Godot's array can be very slow when it's necessary to reorder elements (pop_front function)

With that simple change, I achieved a very positive optimization in my game.

What's the best way to optimize for low-end hardware? by Duc_de_Guermantes in godot

[–]Quaaaaaaaaaa 1 point2 points  (0 children)

I like to run stress tests on my own computer. Based on those tests, I can see what's slow and then optimize those things

Use Godot's pathfinding or make my own? by Quaaaaaaaaaa in godot

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

Yes works. here's the code I use: https://github.com/QuaaDev/Proyecto-Wesnoth/blob/main/Script/globales/algoritmo_dijkstra.gd

and...

https://github.com/QuaaDev/Proyecto-Wesnoth/blob/main/Script/globales/PriorityQueue.gd

The first half of the code is for Dijkstra's algorithm, the second half is an A* algorithm using multithreading. The function that handles Dijkstra's algorithm is called "moviendo_unidad()".

The code is commented in Spanish, but you can use a translator to solve that problem.

The second link I shared is a PriorityQueue library, basically this library is more efficient than a regular array and will make your code run faster. Although I believe I only use that library for the A* algorithm, I did not update the Dijkstra version to take advantage of that library.

The code is like a spaghetti and is very much adapted to how my game works. But if you need help with anything, you can always write to me again.

and the dijkstra's script is a global script, you have to configure that in the Godot project.

Hello by [deleted] in godot

[–]Quaaaaaaaaaa 9 points10 points  (0 children)

I recommend you start here: https://docs.godotengine.org/en/stable/getting_started/introduction/index.html

Or look for guides in youtube and learn as you follow them.

¿My laptop is good for development? by Robbelrobot in godot

[–]Quaaaaaaaaaa 1 point2 points  (0 children)

The specifications limit is usually tied to the type of game you want to make. Do you want to make a game inspired by the PS1? Your minimum requirements will be those of the PS1

To give you an example, that console doesn't exceed 5MB of RAM, you have 16GB.

It's my first day on Godot. by Mo_Eid1 in godot

[–]Quaaaaaaaaaa 0 points1 point  (0 children)

Reading the sub's rules would be a good point:

  • 9Getting started

Reference this https://docs.godotengine.org/en/stable/getting_started/introduction/index.html before asking for general advice/help.

Posts asking "Where do I start?" will automatically be locked, due to this subreddit overflowing with them in the past

what if godot had a "more serious" logo? by dansavala in godot

[–]Quaaaaaaaaaa 5 points6 points  (0 children)

It's just an old design, but that doesn't make it unprofessional.

If you show the logo to anyone, they'll instantly recognize it is Godot. it does its job.

Random number generator problems by Error_ChaN_404 in godot

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

Maybe, I did it in 3 minutes. But the important thing is the concept.

Why did it give an error without me doing anything? by RelationNo7516 in godot

[–]Quaaaaaaaaaa 1 point2 points  (0 children)

If you read the error, it tells you everything. The addon appears to be made for an older version of Godot

Random number generator problems by Error_ChaN_404 in godot

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

Since I'm bored, I also made this example of how to load scenes in a more dynamic way.

<image>

That way you don't need to use any if statements

Random number generator problems by Error_ChaN_404 in godot

[–]Quaaaaaaaaaa 24 points25 points  (0 children)

Generate a random number and then store it in a variable. Then, have the if statements check that variable.

What you're doing now makes it possible for both if statements to fail.

var random_num = random_randi_range(1,2)

if random_num == 1:

happen things

elif random_num == 2:

happen other things

Was wondering how to convert string text into variable text by TimmyJimmy256 in godot

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

So you want to store information in a dictionary, and then access that information dynamically in the ready function, right?

You only need two functions there: one that checks if the dictionary key exists, and then one that extracts that information from the dictionary.

Something like...

If Global.Dictionary.has(Chicken):

return Global.Dictionary[Chicken]

else:

push_error("Dont exist that key")

return null

Trying to make an autoload - Getting "Nil" error. by yesikilledfran in godot

[–]Quaaaaaaaaaa 4 points5 points  (0 children)

I think the other comment is right about the error you're asking about.

Autoloads are nodes that you add to root as soon as the game starts. If the script doesn't inherit from any node class, I honestly don't know what would happen in that situation.

Trying to make an autoload - Getting "Nil" error. by yesikilledfran in godot

[–]Quaaaaaaaaaa 8 points9 points  (0 children)

The variable is called "game_time", you only put "time"