Can I use _physics_process and _process without the fear of droppping the framerate.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By frostymap

Hello everyone. This is my first time asking a question and its a honor to be here since I’ve been using Godot for about 3 years now learning and now making my game.

My question is, I’m making a skill upgrade scene and I have the code that updates the buttons as needed making them locked, unlocked all that. My issue is I’m not sure on using the _process or _physics_process to run the code that changes the buttons status. Because if I use the _ready function, the scene would have to reload in order for changes made by player to be show in the scene during runtime. Like if they buy a skill and the next one is to be represented to be available. So my question is simply can I use _process or _physics_process with out worrying about the frame rate of the game. Or is there a way I can use _ready and have the scene refresh when a button is pressed without reloading the scene because if a reload happens that will not look natural.

Thank you in advance.

The _process() function would probably affect the frame rate because it’s based on the frame rate. That being written, have you looked into using signals?

Ertain | 2021-02-06 10:28

Thanks for the response.

I have worked with them. But I’m trying to think how I can apply them here. I could signal when the button is pressed and then have a function that would enable the next button. I will try that. Thanks. Lol had to think while typing it helps. Thanks for the suggestion.

frostymap | 2021-02-06 10:35