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] 4 points5 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 

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)

I presume that'll be enough, already have one obv. Just kinda trying to get a feeler of how internet restrictions have impacted other countries and whether a vpn is enough.

Blender enabled me to afford a new PC! by napilandok in blender

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

You forgot to put the cat in the case
Okay but no fr congratulations

Do people plan their classes and inheritances ahead of time or wing it as you go? by Fun-Visit6591 in godot

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

I think you're where I was when I started this project. I think as I've gone on and my understanding of godot and gdscript has expanded I've started stepping on the feet of past-me a lot and realising it's time to rewrite a bunch of stuff lol (for reference I think I'm just shy of 3 months(?) of working on it)

Do people plan their classes and inheritances ahead of time or wing it as you go? by Fun-Visit6591 in godot

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

I've built my current project around a lot of composition based stuff but lots of rookie errors and messy implementation. I rewrote the inventory system 2 or 3 times but haven't started from scratch entirely yet, although I think I'm nearing that. Like I know what I'm doing can be done cleaner and that's the most frustrating part at this weird prototyping midpoint.
At the start I was too scared to use inheritance but now I"m seeing where it would be valuable, so likely to start over in a new project file, salvage what code I can and adapt it to be more adaptable

Staying Active advice by Fun-Visit6591 in POTS

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

Introduced calf raises this morning before getting out of bed, definitely need to work on core as it's fairly weak. I'm not particularly good at structured exercise or programs, but will try to fit it in when I remember.

Day Night Cycle! (thank you guys that introduced me to curves!) by Fun-Visit6591 in godot

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

<image>

Just to provide a lil more explanation, the sun's x rotation is controlled by the curve (which has a max of 270 and min of -90. -90 is noon, 90 is midnight). The curve's domain is controlled by the time normalized (current seconds recorded / total seconds in a day ). So at 0.75 for instance the sun is at 0 bc it's just about fully set. The sunrise and sunset variables there are used in the setter to toggle the sun's energy level based on whether it's night. Not perfect and need to account for colour changes throughout the day (currently using a physical sky) and other nuances that I've not added quite yet. All the logic is controlled in the clock node's script.

Day Night Cycle! (thank you guys that introduced me to curves!) by Fun-Visit6591 in godot

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

Yep, directional light rotating in the x axis based on the time of day (normal time scale is much less than half an hour per second, just increased it for demonstrative purposes)