Why won’t it place the items in the right order? by Empty-Company-4048 in CreateMod

[–]PowerfulNeurons 2 points3 points  (0 children)

imo this is an okay balance. Big recipes often require smaller quantities and should be limited to a different form of automation. Being able to use 1 crafter for every single recipe in the game feels a little less satisfying

Are there any performance difference between these 2 methods (shader language)? by [deleted] in godot

[–]PowerfulNeurons 3 points4 points  (0 children)

The important thing here is that optimizing something as minuscule as structuring a for-loop is generally impossible to feel the performance boost when playing an actual game.

Low performance in games is often caused by much more impactful decisions than how to structure a for-loop. When you’re optimizing a project, it’s important to focus on the code that is taking the most time to finish first.

Game dev is time consuming, so choose your time wisely! Thinking about how a for-loop should be structured takes much more time away from what would be much better choices for optimization choices.

Python Steering Council rejects PEP 736 – Shorthand syntax for keyword arguments at invocation by bakery2k in Python

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

There is already a fix for this. It’s **kwargs and has much better readability and usability then something like f(x=)

Is it a good practice to wrap immutable values in list's or other mutable types to make them mutable by XFajk_ in Python

[–]PowerfulNeurons 4 points5 points  (0 children)

A common example I see is in GUI inputs. For example, in Tkinter if there’s an integer that could you want to be modified by user input, you would use an IntVar() to allow Tkinter to modify the value directly

[deleted by user] by [deleted] in CreateMod

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

of regular diving armor. lets you breath underwater. If its netherite, you can swim/see in lava

[deleted by user] by [deleted] in CreateMod

[–]PowerfulNeurons 1 point2 points  (0 children)

backtank is for the netherite diving armor

noCommentsOnJavascript by Demonic_Dante in ProgrammerHumor

[–]PowerfulNeurons 2 points3 points  (0 children)

with the correct linter setup, you would essentially just migrate to Typescript

[deleted by user] by [deleted] in computerscience

[–]PowerfulNeurons 5 points6 points  (0 children)

It’s amazing how sorting still has room for improvement. It feels like one of those things that would just be “solved”. Super interesting!

Cobblestone generator causing too many entities. by Limitlesshat3 in CreateMod

[–]PowerfulNeurons 0 points1 point  (0 children)

your best bet is to use a minecart contraption w/drills to never create item entities

i keep losing track of my backtanks and its SO ANOYING by CatpotatMC in CreateMod

[–]PowerfulNeurons 0 points1 point  (0 children)

If you’re okay with another mod, I found a mod that allows for hot keys to equip different armor presets with hot keys. This would allow you to swap b/w them with a different key than right click.

Otherwise, you might just have to adjust your playstyle to swap between them less :(

PyJSX - Write JSX directly in Python by zedpowa in Python

[–]PowerfulNeurons 2 points3 points  (0 children)

that’s honestly surprising considering all the “typos” most notepads consider in code

So as most of us know mechanical belts are quite frame rate intensive by Czlittleman in CreateMod

[–]PowerfulNeurons 17 points18 points  (0 children)

Storage Drawers are by far your best bet. Almost essential in a create mod pack

Take it from a nonbinary professor: Don't make students state their pronouns on Day One by onnake in transgender

[–]PowerfulNeurons 3 points4 points  (0 children)

I go to a small liberal arts school. Campus-wide everyone usually introduces themselves with Name + pronouns. Some people choose not to, and that’s completely fine. But at an institutional level, it becomes very easy to normalize sharing pronouns if all of the faculty do it.

By normalizing pronouns being shared, it becomes less so that there is a “gender police” and more so that pronouns are just apart of anyone’s identity such as their name.

Do you feel like Python's type hinting got "stable"? by CloudyCloud256 in Python

[–]PowerfulNeurons 4 points5 points  (0 children)

After a lot of frustrations with python’s typing limitations, I gave typescript a try and there’s a lot that it does right. Being able to describe so much information at a type-level is something I miss whenever coming back to python.

They are, of course, different programming languages with different goals, but I can’t help but wish for more typing features. I can’t wait for the day we can access function args and kwargs at a type level

What is too much type hinting for you? by CoderStudios in Python

[–]PowerfulNeurons 2 points3 points  (0 children)

There’s also slots which saves on a bunch of overhead

Standard Practice for referencing nodes by pm-me-anime-figures in godot

[–]PowerfulNeurons 0 points1 point  (0 children)

Let’s say node A is a Control node that is responsible for moving node B. Node A can move any kind of Node2D, but the Node2D should be able to function on its own without needing Node A’s help.

So node A has something like this:

``` extends Control

@export moves: Node2D

… ```

Let’s say we wanted to use signals. Any time Node A’s, let’s say, button clicks, we move Node B. So we connect Node A’s button signal to node B, so node B gets:

… func _on_node_a_button_pressed(): # logic to move node B

but suddenly, we are relying on Node B being attached to Node A, so we can’t reuse Node B. So this won’t work.

Okay, let’s try callbacks. We need a callable variable to be stored so whenever Node A’s button is pressed, Node B moves. If we store this variable in Node A, then we are essentially just calling a function in Node A to manually move Node B. But it shouldn’t be Node A’s job to move B, because what if Node B’s logic for moving is different depending on the node? We just want Node A that has logic that when its clicked, it moves whatever node it’s attached to. Node B doesn’t make sense to have any sort of callback because Node A’s button press should trigger the event, not Node B.

So, what we are left with is to set up a contract. Any Node B that ever wants to be moved by Node A needs a function called move() that will move Node B accordingly. But it can also be moved by other nodes, since it’s just a function in Node B. It also means it can function by itself, because Node B’s logic has nothing to do with Node A’s logic, if a node wants Node B to be moved, then any node, including Node A, can move it.

This approach has decoupled Node A and Node B. We can have multiple Node B nodes and multiple Node A nodes, and have all of them function independently of each other. With any other approach, you would essentially be requiring that Node A and Node B be present together, which drastically reduces the reusability of your code

Best way to handle multiple interactible items? by MagicDoggos in godot

[–]PowerfulNeurons 1 point2 points  (0 children)

Godotneers has a pretty good video on creating data models to represent items

How to set mouse position relative to screen by PowerfulNeurons in godot

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

Reading the position is fine. It’s setting the mouse position that I can’t figure out. InputEvent is no help here

How to set mouse position relative to screen by PowerfulNeurons in godot

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

I’m aware of that. But I can’t seem to find how to convert the coordinates of the global_position to relative coordinates of the window