Random QTEs for fishing

Hi again! I was just hoping to get some more eyes on something I’m developing rn- ideally to make things run a bit smoother + faster. Here’s a screenshot for reference of the code, but I will link the game as well (this is just another random side project I’m using to develop my skills + test things out!)

This is REALLY convoluted (hence why I’m asking for a little guidance!) but the basic idea is this:-

  • FISHING ROD (the bobber is holding the code for this) is CAST

  • RANDOM LETTER/NUMBER is chosen from premade list (excludes any functioning buttons such as WADS and SHIFT, which is used for the fishing rod)

  • RANDOM number is chosen for # of pushes required

  • Chosen LETTER is DISPLAYED above the PC via a LABEL

  • Whatever KEY is PRESSED is tested against the random letter- if the correct key is pressed the correct number of times (via random number chosen at start), the catch is SUCCESSFUL.

  • Successful or not, the code RESETS

The concept here is creating a random QTE each time for the player to catch the fish. Controls are in the DESC if you need them. Thank you!

2 Likes

This is pretty good so far!
Keep working on it!

1 Like

On mobile rn so I can’t really check, but seems about right what you described.

Main feedback just from glancing at the image is just to bundle things a little more.

Also, (once again hard to exactly say from a small image on my phone) I don’t think the logic gate portion is needed.
From what I’m seeing, it seems like you’re checking when a key is pressed, then if it doesn’t match you check it via an Always + Logic Gate (AND).
Instead it seems like you should just have a Switch to preventing the output from the KeyPress from going through unless the system is ready/set.
Logic Gates are perfectly fine, I just typically don’t use them because most cases can instead just use a Switch/Filter, which is a bit better for performance.

also you have a timer attached to a timer, which isn’t needed, you can just increase the delay of 1 timer. And the timers don’t need to loop back to “Reset”, as long as it isn’t set to “Repeat forever” it won’t output again unless you start it (or if it’s set to output more than once)

1 Like

Also something I noticed, an Always is going to the “One” input on the List. That will always get the first item inside of the List, so pushing items into the list won’t alter the output you get from it. And it seems like nothing is emptying the List in any way either.
Once again though, seems like you got all the general ideas and principles correct, just a bit of optimization missed. But I am known for over optimizing and perfecting code, so I’m very used to looking for bottlenecks in performance lol

1 Like

ahhh thank you so much for the pointers!! I’m gonna go through now and tweak some things to clean it up!! Halfway through I thought bundling might save me some grief and I’m definitely kicking myself now!! its gonna take me forever to get it all organized but I learned my lesson- start organizing things at the beginning :sob:

The timer on the timer was there previously before I updated my method for updating the value in the bar that keeps track of how long you have- I mistakenly thought that the timer could somehow output the number it was currently on directly to the bar so I wanted an extra buffer before the actual “timer” started, but I’m gonna take out the extra timer now since that was 100% silly thinking

I actually took the logic gate that was in front of the key press out last night at some point because it was letting input through when it wasn’t meant to :sweat: key press is now behind a switch, which fixed the issue I had with the PC randomly “catching” fish as well

At this point, it is functioning for the most part!! Still a few behaviors to modify in the fish + I want to add a system for saving which fish you’ve caught (maybe a notebook or something cute like that) Thank you again for all of your help!! This cleared up a lot of the issues I was noticing!!!

2 Likes

ok it is now completely freezing when you try to fish :sob: no clue what I’ve done here but hopefully I’ll get it fixed soon. Seems to be an issue with the key press again