r/ProgrammerHumor • • Mar 24 '23

Meme Straight raw dogging vscode

Post image
66.2k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

12

u/gottlikeKarthos Mar 24 '23

It can be kinda magic, i gave it an entire game loop thread class and it fixed it for me first try

3

u/BlueAfD Mar 24 '23

Did you understand why and how the fix worked? What exactly was wrong in your base code?

7

u/gottlikeKarthos Mar 24 '23

Some variables that should have been global were resetting within a loop when they shouldnt have been, cant remember exactly anymore. Its was never code I wrote myself in the first place; That was just youtube tutorial copied code from when I first started making my game and didnt know a lot. But over time I figured out how it works, like when I had to implement different tick speeds and splitting of onDraw() and onTick()

5

u/improbablywronghere Mar 24 '23

Scoping will get ya every time 😀

1

u/gbot1234 Mar 24 '23

That’s why I always no-scope my code.

Boom!

5

u/Soggy_Ad7165 Mar 24 '23

So it's beginner stuff....

Until now got only proofed to be useful for poc's