• 2 Posts
  • 28 Comments
Joined 1 year ago
cake
Cake day: July 16th, 2023

help-circle
  • So player has all these nodes that provide abilities. Each node has a signal that the ability is activated. This is correct. What you do after the signal was your question.

    The two options i described were:

    #1 don’t just connect to one omnibus function. Don’t connect them all to a _gave_ability() function. This is what it sounds like you are doing. Instead seperate into seperat smaller functions. Connect ability As signal to functionA(), and abilityB signal to functionB(). Then yiu are not checking all 19 cases everything a signal is called.

    #2 if you are using the omnibus function _give_ability(ability), set an input parameter for the signal saying which specific signal was emitted. This can be done by code or the inspector when connecting the signal.

    Then on _give_ability(ability) do:

    match ability: abilityA: Give ability


  • Without knowing your specific situation, it seems like each of you signals should not be connecting to one master “abilities” function to dole out the effects.

    Instead each signal should connect to its own function and that function is responsible for only its specif effect.

    ====== Another thought would be if you like your setup, change the if statement to a match/case. For many simple if checks the match is more optimized.


  • I’m in pretty much the same boat. My past 2 laptops have been dell inspirons with a touchscreen. I use the touch screen for game programming to make sure touch events work. The one I got was $500, but probably should have gone a bit higher.

    It has a i5 processor 16gb ram, 1 tb ssd. It does indeed run tf2, guild wars 2, and other not graphically intensive games. I’m satisfied and it does work well, but below are some of the negatives of my new laptop vs my old.

    It’s missing key backlights, a fingerprint to unlock, and the bodyvis much more plastic and feels not as secure as my wife’s lenovo.

    Be sure to check out pics for keyboard arrangement. My new laptop has a numberpad…which is nice, but the arrow keys got shrunk which is not nice for programming.

    Be sure to check where the trackpad is. Centralized is better. My new one is more to the left and my wrist hits it when playing tf2 and I do occasionally get some movement from my wrist in game, but not much.

    I picked money up from amazon.








  • Reducing the size to 1 I don’t think is the “correct” solution.

    In the inspector for the containers look for the “mouse” tab. That determines how the mouse interacts with that control. By default it is on STOP. Meaning it blocks all inputs “behind” it in your scene. You probably should change it to pass or ignore.

    Imaging you have a complex ui with multiple layers of buttons. You only want the top one to register click events, so it would be on STOP. If you did IGNORE then the top button would not register click events, bit the buttons under it would. If you had on PASS the top button registers the click, but then passes on the click event to the buttons under it.

    Right now you still have a 1px dead zone.

    Hope that helps.






  • I started doing diamond art. Here is a cheap set with honestly 100+ hours of content. AMAZON LINK

    I would put on a TV show and sit at my desk and Diamond art for a few hours before bed. Each picture takes 10-15 hours in my experience. When I was done I would find someone to give the picture to.

    So not only have you accomplished something and you can SEE THE PROGRESS, you don’t need a big shift in your life of watching youtube, and at the end you get to make some else happy by giving them a gift. And for a hobby it’s fairly inexpensive.


  • I started by following some YouTube videos. Follow a simple tutorial. At then end EXTEND the game a little with your own ideas. Add a new power up, make a new level, make a new enemy, make a new weapon type, something.

    Once you already have an established framework for a working game by following the tutorial you don’t have to worry so much about the bugs. This builds confidence.

    Also don’t underestimate the built in documentation and search. I’ve been using godot for 2 years now and I reference the docs almost every time I code to check if a certain method exists, or how to get a certain property.

    These videos may be old now, but heartbeast on YouTube had a few great series for godot 3.x


  • I generally don’t like plug-ins. I am not a strong enough coder to read others code well and understand what is going on. If I get stuck it feels like I don’t even know where the problem is.

    So I generally make everything myself. My released game had a simple dialog system they I stored all the dialogs in a resource file in a big dictionary. Then when I needed one I would just ask for that dictionary entry. Each dialog was set, but I could call a few different dialogs based on which characters you had, or inventory.

    There was some duplicated likes of code, but not too much.





  • It’s not a signal, but it is a quick check. In 2d there is a (in godot 4) progress_ratio that scales from 0 to 1. So a quick

    If $pathfollow.progress_ratio==1: #I’m at the end of path end_of_level()

    This is what I did in my game.

    I don’t know the lemmy markup code for a code block so sorry for bad formatting