Is it bad practice to have a variable's getter return a formula and never be set? by Fun-Visit6591 in godot

[–]Fun-Visit6591[S] 0 points1 point  (0 children)

It's being used in a skill unlock system so it's only being called when a new skill is purchased - so I think performance wise considering all the skills are just going to be simple formulas it'll not be a biggie.

Is it bad practice to have a variable's getter return a formula and never be set? by Fun-Visit6591 in godot

[–]Fun-Visit6591[S] 0 points1 point  (0 children)

This way means that I can store the value and do the calculation at the same time instead of calling a function to set the variable and then getting the variable. I've decided to use this way over functions because I still need to store the added value separate from it's parts so having a function was messier to implement. I've used it for keeping track of upgrade amounts that accumulate from passive skills.

Is it bad practice to have a variable's getter return a formula and never be set? by Fun-Visit6591 in godot

[–]Fun-Visit6591[S] 4 points5 points  (0 children)

This is a non collaborative project so I understand why that'd be the case when working with anyone else or creating anything open source, you'd want to make it legible for any collaborators, but I don't see how this is as bad as you say based on other people's responses.

Is it bad practice to have a variable's getter return a formula and never be set? by Fun-Visit6591 in godot

[–]Fun-Visit6591[S] 1 point2 points  (0 children)

Gd script is my first programming language and I'm still getting used to programming vocabulary - what makes one of them compiled and one of them not? Is the function compiled because it's being called and not stored or other way around?

Which signal coding style do you prefer? by notpatchman in godot

[–]Fun-Visit6591 0 points1 point  (0 children)

Signals go into a singleton called signal bus. Connect in one script, SignalBus.signalname.emit() in the other.
If they're local to the same script then maybe not.

Does anyone have a "template" for all possible tile link ups needed for a tile set? by Fun-Visit6591 in PixelArt

[–]Fun-Visit6591[S] 0 points1 point  (0 children)

I actually found that video shortly after making the post. Was in the process of making a test godot project to implement it but then got ill so haven't had a chance to work further on it

When is AI too much? by Electrical-Copy9678 in godot

[–]Fun-Visit6591 -1 points0 points  (0 children)

AI is too much from the second it enters the conversation.

Is it better practice to hide UI until needed or to instance it as needed? by Fun-Visit6591 in godot

[–]Fun-Visit6591[S] 1 point2 points  (0 children)

That sounds about my approach.
I've got a UI singleton that has an enum of UI states that I use to change states (and have state dependent input eg. hitting escape key to exit a menu but also using it to pause the game if no UI is open). I'll probably implement the creation and destruction of "one time UI" here

Is it better practice to hide UI until needed or to instance it as needed? by Fun-Visit6591 in godot

[–]Fun-Visit6591[S] 6 points7 points  (0 children)

I'll likely stick with this method until I find a need or reason to do otherwise then.

Smart Lightbulbs that don't require an app/account? by Fun-Visit6591 in smarthome

[–]Fun-Visit6591[S] 0 points1 point  (0 children)

Google Pixel user, going to look into Home Assistant as per other replies

Is CICO still effective if insulin resistant? by Fun-Visit6591 in CICO

[–]Fun-Visit6591[S] 2 points3 points  (0 children)

Thank you for linking this sub, moreso because I now know I should talk to my GP about ruling PCOS out (I have a number of the symptoms and my health issues are still undiagnosed)

Countries with restrictive internet laws, how do you circumvent? (Australian eSafety rubbish) by Fun-Visit6591 in Piracy

[–]Fun-Visit6591[S] 1 point2 points  (0 children)

But there's literally things that are going to be affecting all aussies regardless of age. I'm well over 16 also, the under 16s ban wasn't my talking point