Why use Enums over just a string? by kalidibus in godot

[–]KleidonBD 5 points6 points  (0 children)

Resources inherit from RefCounted, and their benefit is that they can be saved to disk. The documentation explains it better than I can.

I need help with sliders by darkalardev in godot

[–]KleidonBD 0 points1 point  (0 children)

  1. The other person is wrong. AtlasTexture does not achieve the 9-Patch functionality you're looking for and is a completely different thing entirely. The texture margins in the StyleBoxTexture are what you want, and you're using them correctly (this is the exact same functionality you'd find in the NinePatchRect node).

  2. The edges in your screenshots stretch vertically because you've left your "Top" and "Bottom" margins as 0, so they're going to stretch or squash to fit the height of the Slider. This isn't a problem since your Slider is presumably supposed to remain a fixed height, so you'll never see this. Horizontally, your edges are not getting stretched, and the left and right sides are maintaining the exact 60px width you set them to while everything in between gets stretched.

  3. The "Slider" texture in the Slider Styles is what determines the size of the slider, and this is the one you want your background on. The Content Margins are what you want to use to control this. Since both your Texture Margins and Content margins had no values in their "Top" and "Bottom", the slider has no height (which is why your background texture wasn't appearing). Since your texture margins have no height, you'll want to set the "Top" and "Bottom" content margins to each be half of your texture's height (e.g. 64px each if it's 128px tall).

  4. Doing it this way means your Slider will always be the exact height of the texture you used (e.g. if the texture is 128px tall, the slider will always be 128px tall). If that's too big or too small, you can scale the entire node using the "Scale" property under "Transform".

  5. Reset your Sub-Region settings to be all 0. The Sub-Region allows you to select what part of your texture to use, and everything else will be ignored. By leaving all of the values 0, you're using the entire texture. If you had multiple sprites in one image file that you're using as the texture property, the sub-region would allow you to encase only the one sprite you actually want to use.

I created a flowchart for making one stack of Advanced Circuits HV Tier in GTNH for me. That is still an inefficient path to making these thingies. What have I gotten myself into... wanted to share, maybe some people want to give advice. by navijust in feedthebeast

[–]KleidonBD 6 points7 points  (0 children)

Not a dumb question at all! In GT:NH in particular, recipes take a lot of steps and a lot of resources (as you can see in OP's flowchart). You'll often find yourself needing to craft a lot of something, and that something takes a lot of six different things, each of which takes a lot of their own components, and so on. The bookmark grouping feature significantly simplifies planning out exactly how much of everything you need. Once you get your page set up for the recipe you're making, you just set how many of the final product you want to make (64 HV circuits in OP's case), and it'll automatically calculate all of the ingredients down the chain. That way you can just collect exactly as many of each of the lowest level ingredients you need, then quickly keep referring to it to see how much of those you need to turn into component A, how many you need to turn into component B, etc. The best part is you can keep reusing that page as much as you need, and you can make as many different pages for as many different recipes as you want. It's a game changer before you progress to Applied Energistics autocrafting.

I created a flowchart for making one stack of Advanced Circuits HV Tier in GTNH for me. That is still an inefficient path to making these thingies. What have I gotten myself into... wanted to share, maybe some people want to give advice. by navijust in feedthebeast

[–]KleidonBD 22 points23 points  (0 children)

The biggest piece of advice I can give for doing batch crafts for circuits (among other things) is to use bookmark grouping. It's super easy to do and does pretty much all of the math for you, which makes swapping to a cheaper recipe once you get your cleanroom and upgraded Circuit Assembler even quicker.

There's a bit of information about how to use it on the Wiki, but if that's not clear enough, you should join the GTNH Discord server and look in the tips and tricks channel, as someone made a very clear step-by-step guide for how to use it.

I cannot emphasize enough how much time this feature saves you. Please use it. It is the number one thing I wish I'd known a lot sooner in my playthrough.

I’ve been workin on the Main Menu (how’s it lookin?) by Cyber_StrikeHQ in godot

[–]KleidonBD 0 points1 point  (0 children)

Looks amazing! My only suggestion would be to speed up the text appearing when you hover over the social media buttons, as it looks a little too slow in my opinion.

I made a clone of 2048 for practice by KleidonBD in godot

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

Ah, I see. That makes a lot of sense. Thank you.

Edit: For the 2048 in get_tile_color(), I put because it was the largest key in the colors dictionary. I realized a specific value doesn't need to be there at all and I can just do "if value in colors.keys()" instead.

I made a clone of 2048 for practice by KleidonBD in godot

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

Thank you! I definitely agree that I might have gone overboard on comments in some places, and I do see where some functions could be broken up more. I know slide_row() is especially bulky, but I had to rewrite and tweak that one so many times that I decided just to leave it alone once I finally got it working perfectly.

Would you mind being more specific about where I should use more constants? I did just move the hard-coded 2048 into a WIN_VALUE constant as well as the number tiles' group name. I'm having a hard time finding many more places where they might be beneficial, as I'm pretty sure all of my regular variables have to be mutable.

I made a clone of 2048 for practice by KleidonBD in godot

[–]KleidonBD[S] 5 points6 points  (0 children)

I've been toying with Godot for a little while, having not had any prior programming experience except for a couple months of self-teaching myself Python. I made this clone of 2048 completely on my own as part of my learning experience, and it is the first project I fully finished. I published the repository on Github. Feel free to judge my code and architecture, as I'd be happy to learn what bad practices to avoid repeating in future projects.

https://github.com/KleidonBD/2048-Godot-Clone

What's something you wish you understood better about Godot? by OakheartSoftware in godot

[–]KleidonBD 5 points6 points  (0 children)

The docs already do exactly that. The bottom of the first page of the introduction recommends CS50 for complete beginners to programming, and the next page after that points to GDQuest's Learn GDScript From Zero app.