• 2 Posts
  • 38 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.

















  • 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.