I make sure I have 0 errors/warnings, even making if I'm not using delta to rename it _delta, silly I know, but when your game does break it's very easy to resolve it.
@@BrosMakeGames I'd be pretty easy, just keep collision with walls on, then on contact reflect velocity along normal of the wall. The formula for reflection is something like r=d−2(d⋅n)n where r is the resultant vector, n is the reflection vector (in this case the walls normal), and d is the input vector (velocity) Oh and d⋅n means dotproduct or dot(d,n)
@@naalex9058 A much easier way would to use the bounce method of the vector2 class, so the example I wrote a while back so will be flawed but still works. I have a room with 4 staticbody2d walls as bounds, then a characterbody2d ball that I set off at vector2(0.5,0.5) and the code in the characterbody2d is as follows: extends CharacterBody2D var dir : Vector2 = Vector2(0.5,0.5) func _process(delta): velocity = dir * 10 var Collision_Data = move_and_collide(velocity) if(Collision_Data): dir = dir.bounce(Collision_Data.get_normal()) figured this might be interesting for anyone others reading.
@@naalex9058 nice! godot has a method called "bounce" on Vector2 that does exactly this! so basically get the collision normal with move_and_collide (if using Kinematic/CharacterBody2D), check if collided, and bounce along the collision normal
Little advice for you all folks. Sometimes you just need to take a REAL break (away from you phone AND computer), and then ideas will flow more easily. Creativity needs energy, and energy needs rest.
Fucking REAL. I was recently trying to solve a problem with jumping while on a slope. It would essentially bank and I think also multiply the vertical acceleration, spent a few days on it, couldn't figure it out and was getting really frustrated. Took a few days off of it because life stuff, came back, solved that shit immediately with barely any thought.
Bro this is so true! Sometimes tho the entire system is just broken and then you have to remake it over and over again or add stuff until it's just right realizing its only a smol thing u missed lol. Bro epic vid
you mentally hurt my by reminding me that ive rewritten stuff so many times just to realize i, for example, divided by delta instead of multiplying it, plus instead of minus, wrong values and other stuff like that
That's why it's important to be aware of our assumptions we made on how we think things supposed to work. And then test those assumptions by tweaking values and debugging, until we reach to the fault in one of our assumptions that we need to fix. In this case, the assumption that the destination is within the reach of the duckies.
Having worked in the games industry for over 5 years now, can confirm, it happens to even the most experienced of us. Having said that... I actually think the game engine should warn you when you trying to do something that doesn't make any sense... like telling the nav agent to navigate to a point outside the nav mesh. Because then the problem would have been obvious way earlier, and you wouldn't have spent hours blindly debugging.
The problem was obvious just looking at it without even reading the code. And there are plenty of examples where you could make use of navigating between collision layers. The fact that you say these things and say you have been doing this for 5 years is just baffling.
Excellent video that really captures the frustration of programming haha. Another is when something doesn't work you change some stuff out of desperation, and it works, but you don't know exactly what you did to fix it or what the problem was, and then you just move on with your life
Something similar happened to me not too long ago. I'm currently making a zombie game where the player is stuck in a grocery store and has to use whatever they can survive incoming waves of zombies. Now I put together a multiplayer system, difficult at first but ultimately didn't give me many issues, shelves so that the players can store items ended up being insanely easy, zombie movement and spawning I was able to do with my eyes closed. But, the wave mechanic, the one thing I thought was gonna be so simple I could probably get a monkey to do it, ended up taking me a week to figure out. Turns out throwing rpc calls everywhere is NOT a good idea and I was basically calling an rpc call with an rpc call, so the system that handles zombie tracking wasn't accurately tracking zombies because of it.
This really is a great look into the gamedev experience. 1. You encounter a problem - and you really aren't 100% sure why it's happening. 2. You take a guess at what the problem is. 3. You implement a "fix" to try to correct it. 4. You correct the issues created by step two and scrap the "fix" 5. Repeat steps 3 and 4 until you want to rip your hair out or you accidentally enter step 6. 6. You spot the actual problem, realize you're an idiot, and solve it in two or three easy attempts. 7. You regain *almost* all of the sanity you had before the problem occurred.
You can notice this in more than just game dev. I am in my final year in school and sometimes I get really stuck at some pretty easy math problems. And I just can't wrap my head around them to find the solution for some reason. It feels the same I swear to god.
Recently I tried to implement something new and the hitbox collisions from a test print didn't show up. But I already had set up something similar before, so I got really confused. I didn't find anything on Google about my issue, so I spent hours on recreating a minimal setup to try ro find out what was different in those cases. It got worse there, since I didn't seem to be able to recreate the old setup. After a while I got frustrated and just played around for a bit, when I realized that no print messages at all show up. Which is the point where I found out that I accidently disabled the debugger messages in the engine. I didn't even know I could do that, but whelp. I was so relieved, but it didn't even feel that satisfiying :D
If you had some sort of debug visualization of the wanted destination, you would've solved that in a jiffy. That's why debugging tools are so important.
Accurate. I was playing with creating islands with proc gen, and reasoned I needed to make elevation fall off sharply along the edges of my map, leaving an island. My first try somehow smasheed all 800 pixels of 'terrain; into the top line of the window and made the rest ocean...Turns out I'm stupid, like everyone else. Felt really great to finally figure out what stupid thing I had done, which was totally forget to iterate over one axis for most of the process, resulting in my strange 1 row of x data.
As a new godot user (just shifted from Unity after 6 years) it’s amazing to see there is a state machine system for me to explore. Those tend to make programming a lot simpler and now I don’t have to create it myself LOL
Take this subscription, Sir. Many know those moments! 💙 (even though they are often much longer, till one tries to evade the situation... going to the bathroom.... doing laundry...)
What I like is, when you follow a tutorial and the code is as 1:1 as it can be, but for them it works and the same code on your computer just says nope
dude your brilliant dont call yourself stupid my man i am impressed by your skills. I've been doing coding for 2 years and 90% of that time seems to be fixing errors haha. at least thats what my teacher said it usually is and he said thats normal.
Programming is me telling my lovely wife, "i'm fine, thanks", her becoming upset for 2 days, me trying to understand wtf i just said, finally realizing it was our birthday and i forgot about it. But every day.
My dudes... this is software development in general... it just be more visual and fun in games... or frustrating instead of fun... writing code is the single thing that humbles me every day...
In Unity you can sample a position on the navmesh from a point you give, so you can random in circle then ensure it's inside the navmesh. The only problem with this approach is you can still ask for an impossible move if the navmesh of the target is not connected to the one your character is on, but that's a tricky case that's unlikely to happen I guess 😅
What's worse is when you actually understand everything. You spend ages debugging the complex logic, get right to the end, and it's a display issue. Output text instead of formatted text. I'm not bitter.
true, although I only wish I could stay as calm as this also is there some pixel filter going on or is the spinning crosshair actually animated? seeing pixels rotate always slightly bugs me so its nice to see here it looks as it should
Game development is problem solving and you are the problem - me to myself every time I try anything and it inevitably doesnt work. Best piece of advice my Computer Science lecturer gave my class was "If you write code and it works first time, it doesnt work, you just haven't come across the issue yet." Best piece of damn advice Ive ever gotten in an educational setting.
This is what most people dont see nor understand, the real struggle you get sometimes with bugs. And, its not always your fault. The worst feeling is finding an engine or language limitation that simply cannot acomplish what you want, and then you have to code a workaround youself, thats painful. But worse still is thinking you found an engine limitation, when it was just a PEBCAK issue lmfao.
Yeah this is what happens with me all the time... Recently I was working on my game and the enemy was getting stuck in the scene's global position and not the camera... Then I saw the problem I was setting the position to global myself... That had to be only position not global... Good to know I am not alone.... 😅
i really love this quote, "the code does what you tell it to do, not what you want it to do."
painfully true
I am writing this down.
"Do as I think, not as I say!" 😂
I always joke with my wife that the codes doing what i'm telling it to do and not what i think i'm telling it to do.
except those few occasions where it ACTUALLY happens to be an engine bug which leaves you doubting every problem you ever run into from that point
>Looks at debugger
>11717 errors
Too little, i have half a million
better than having a bug and not getting any errors 💀
@@chefaku good pfp btw
@@null6482 my picture reflects the nature of the human being. how some can be white, normal and good and others are bl...
I make sure I have 0 errors/warnings, even making if I'm not using delta to rename it _delta, silly I know, but when your game does break it's very easy to resolve it.
I feel like as a game dev I’m just jumping from ‘I’m a genius!’ To ‘I’m an idiot’ on repeat
Game dev in a nutshell
“If I do (xyz) that should fix it”
**multiply problem by ten**
idk why but this is the gamedev content I enjoy the most
that's great to hear, thanks!
Maybe bcuz it's actually realistic 😂
me too! super relateable
Because he perfectly puts it into perspective the experience of an average game developer.
of course its the random_in_circle
its such a simple function, how can anyone possibly have bugs related to it?
@@sjoerdev The _random_in_circle_ is perfectly fine. It's just not the _random_walkable_in_circle_ the human _actually_ wanted.
There’s always one random in the circle
"Do what I want, not what I tell you!"
Next step: add enemy ricochet off of walls on death.
YES, on my to-do list.
@@BrosMakeGames I'd be pretty easy, just keep collision with walls on, then on contact reflect velocity along normal of the wall. The formula for reflection is something like
r=d−2(d⋅n)n
where r is the resultant vector, n is the reflection vector (in this case the walls normal), and d is the input vector (velocity)
Oh and d⋅n means dotproduct or dot(d,n)
@@naalex9058 A much easier way would to use the bounce method of the vector2 class, so the example I wrote a while back so will be flawed but still works. I have a room with 4 staticbody2d walls as bounds, then a characterbody2d ball that I set off at vector2(0.5,0.5) and the code in the characterbody2d is as follows:
extends CharacterBody2D
var dir : Vector2 = Vector2(0.5,0.5)
func _process(delta):
velocity = dir * 10
var Collision_Data = move_and_collide(velocity)
if(Collision_Data):
dir = dir.bounce(Collision_Data.get_normal())
figured this might be interesting for anyone others reading.
@@naalex9058 nice! godot has a method called "bounce" on Vector2 that does exactly this! so basically get the collision normal with move_and_collide (if using Kinematic/CharacterBody2D), check if collided, and bounce along the collision normal
Little advice for you all folks. Sometimes you just need to take a REAL break (away from you phone AND computer), and then ideas will flow more easily. Creativity needs energy, and energy needs rest.
Fucking REAL. I was recently trying to solve a problem with jumping while on a slope. It would essentially bank and I think also multiply the vertical acceleration, spent a few days on it, couldn't figure it out and was getting really frustrated. Took a few days off of it because life stuff, came back, solved that shit immediately with barely any thought.
“Ok I just had an idea”
*starts murdering*
obviously the enemy is just really stupid
I feel your pain brother, this is like therapy. And the excitement/relief once it works is unparalleled
help me step player i'm stuck
Alternative title: "I didn't know birds couldn't pass through walls"
Bro this is so true! Sometimes tho the entire system is just broken and then you have to remake it over and over again or add stuff until it's just right realizing its only a smol thing u missed lol. Bro epic vid
you mentally hurt my by reminding me that ive rewritten stuff so many times just to realize i, for example, divided by delta instead of multiplying it, plus instead of minus, wrong values and other stuff like that
rewriting parts of your game mutliple times is natural and a good thing.
This is probably the most relatable video on anything software dev I've ever seen. Bravo!
"its my fault, but i dont know why"
sometimes i think i took up game dev for similar reasons i see a therapist
of course its the state machine
accidentally became woodpeckers
The video is 2 minutes but this process usually takes about 2 hours 💀
They are just dancing.
I love these short little tid bits of devlogs. Super fun to watch!
This is so relatable, and describes a lot of the issues I encounter.
I'm subscribing.
Thanks for the sub!
I'm really scared of people that don't solve the debugger errors
I'm trying to pay attention but I can't get past your insane amount of rising debugger errors.... you gonna uh...you gonna check those? D=
if you don't look down there they don't exist.
@@BrosMakeGames 100% working strat. I used this exploit to escape the IRS and the kids. It's also extremely milk-compatible.
you need a rubber duck...
That's why it's important to be aware of our assumptions we made on how we think things supposed to work. And then test those assumptions by tweaking values and debugging, until we reach to the fault in one of our assumptions that we need to fix. In this case, the assumption that the destination is within the reach of the duckies.
Really nice bitw sized vid, please make more :D
thanks! will do.
Having worked in the games industry for over 5 years now, can confirm, it happens to even the most experienced of us.
Having said that... I actually think the game engine should warn you when you trying to do something that doesn't make any sense... like telling the nav agent to navigate to a point outside the nav mesh. Because then the problem would have been obvious way earlier, and you wouldn't have spent hours blindly debugging.
The problem was obvious just looking at it without even reading the code. And there are plenty of examples where you could make use of navigating between collision layers. The fact that you say these things and say you have been doing this for 5 years is just baffling.
The code is producing thousands of errors which he never looks at...
Excellent video that really captures the frustration of programming haha. Another is when something doesn't work you change some stuff out of desperation, and it works, but you don't know exactly what you did to fix it or what the problem was, and then you just move on with your life
Feels good when it does work.
"as usual the problem was me and my stupid brain"
I felt that
as a new, learning gamedev, i can 100% confirm
Absolutely. What's worse is when there's multiple different single points of failure.
missing: 12 other attempts that were SURE to work
Yup! The hard part is figuring out where it went wrong. 99 percent of the time it's an easy fix. This is looking great btw
Something similar happened to me not too long ago. I'm currently making a zombie game where the player is stuck in a grocery store and has to use whatever they can survive incoming waves of zombies. Now I put together a multiplayer system, difficult at first but ultimately didn't give me many issues, shelves so that the players can store items ended up being insanely easy, zombie movement and spawning I was able to do with my eyes closed. But, the wave mechanic, the one thing I thought was gonna be so simple I could probably get a monkey to do it, ended up taking me a week to figure out. Turns out throwing rpc calls everywhere is NOT a good idea and I was basically calling an rpc call with an rpc call, so the system that handles zombie tracking wasn't accurately tracking zombies because of it.
now just repeat this process multiple times per every time you want to change anything whatsoever
Your code is so clean! I could never
Yup that's game dev in it's purest form.
Literally me every time I add a feature with any slight complexity.
That debugger is going CRAZY LMAO
This is an awesome way of teaching!
This really is a great look into the gamedev experience.
1. You encounter a problem - and you really aren't 100% sure why it's happening.
2. You take a guess at what the problem is.
3. You implement a "fix" to try to correct it.
4. You correct the issues created by step two and scrap the "fix"
5. Repeat steps 3 and 4 until you want to rip your hair out or you accidentally enter step 6.
6. You spot the actual problem, realize you're an idiot, and solve it in two or three easy attempts.
7. You regain *almost* all of the sanity you had before the problem occurred.
The solution sounds so simple, but one has to first come up with the idea! Also, awesome editing!
This is such a great example of everyday life in game development. Thanks so much for the commiseration.
where's the part when you say
IT TOOK ME HOURS TO FIX THIS!!!
probably in a later video when he finally fixes it. Based on his debugger tab at the end his codes still broken lol
You can notice this in more than just game dev. I am in my final year in school and sometimes I get really stuck at some pretty easy math problems. And I just can't wrap my head around them to find the solution for some reason. It feels the same I swear to god.
i want to applause for your problem solving skills, not the fact that is impressive, but you got through it. Congratulations man!
its what I love most about development. it stresses me out but i love it
would love a video about your state machine implementation, specifically how it decides which action to take
I have that "if I'm right" statement soo many times lol
I was terrified there would be a glitching NPC at the end of the video
The conclusion is always “I’m the biggest idiot of all time.”
Recently I tried to implement something new and the hitbox collisions from a test print didn't show up. But I already had set up something similar before, so I got really confused. I didn't find anything on Google about my issue, so I spent hours on recreating a minimal setup to try ro find out what was different in those cases. It got worse there, since I didn't seem to be able to recreate the old setup. After a while I got frustrated and just played around for a bit, when I realized that no print messages at all show up. Which is the point where I found out that I accidently disabled the debugger messages in the engine. I didn't even know I could do that, but whelp. I was so relieved, but it didn't even feel that satisfiying :D
Very informative videos, really tell us how to solve problems instead of quitting the project and starting a new one.
Great video! I feel this so much. Yesterday was 30 minutes figuring out that my code should've been in `_physics_process` and not `_process`.
Really love your use a Kirby sound effects.
This is incredibly accurate! Great video! The struggles are real 😭
If you had some sort of debug visualization of the wanted destination, you would've solved that in a jiffy. That's why debugging tools are so important.
"I'm the biggest idiot"
Ah the sound of progress
Accurate. I was playing with creating islands with proc gen, and reasoned I needed to make elevation fall off sharply along the edges of my map, leaving an island. My first try somehow smasheed all 800 pixels of 'terrain; into the top line of the window and made the rest ocean...Turns out I'm stupid, like everyone else. Felt really great to finally figure out what stupid thing I had done, which was totally forget to iterate over one axis for most of the process, resulting in my strange 1 row of x data.
Just do what I do everytime give up!
As a new godot user (just shifted from Unity after 6 years) it’s amazing to see there is a state machine system for me to explore. Those tend to make programming a lot simpler and now I don’t have to create it myself LOL
Take this subscription, Sir. Many know those moments! 💙
(even though they are often much longer, till one tries to evade the situation... going to the bathroom.... doing laundry...)
we humbly accept your sub, thank you!
What I like is, when you follow a tutorial and the code is as 1:1 as it can be, but for them it works and the same code on your computer just says nope
my favorite
dude your brilliant dont call yourself stupid my man i am impressed by your skills. I've been doing coding for 2 years and 90% of that time seems to be fixing errors haha. at least thats what my teacher said it usually is and he said thats normal.
Ahh yes, the tried and true method of "make it smaller then bigger and see if that gets you anywhere".
Programming is me telling my lovely wife, "i'm fine, thanks", her becoming upset for 2 days, me trying to understand wtf i just said, finally realizing it was our birthday and i forgot about it.
But every day.
Superstition is a huge part of development for me
true, also loveit when you think your code is broken but then after 30 min you see that you disabled a script for testing :)
This video brings great pain and suffering
Still stuck in the stage of "I don't know what I just copy pasted but it is/isn't working."
how do you get you collision shapes to look pixelated? kinda fun that they match the sprites! Fire vid man, I know these feels
My dudes... this is software development in general... it just be more visual and fun in games... or frustrating instead of fun...
writing code is the single thing that humbles me every day...
ayyy u use the same state machine architecture that I learned!
shaggy dev for the win
this would never have been a time consuming issue if your gizmos were correctly displaying that the targets are inside the walls...
In Unity you can sample a position on the navmesh from a point you give, so you can random in circle then ensure it's inside the navmesh.
The only problem with this approach is you can still ask for an impossible move if the navmesh of the target is not connected to the one your character is on, but that's a tricky case that's unlikely to happen I guess 😅
Just wanted to comment on your 'game' looking charming, the toad protagonist and these little guys just crack me up for some reason
thank you!
Every. Day.
Just wait until you get to the Context Based Steering Behaviors part... Now thats actually the true game dev experience
Just been there... I overcame it but oh my brain...
@@Korn1holio dw, you'll spend a few more months tweaking it for the 100th or so time until it kinda feels right and performant 💀
What's worse is when you actually understand everything. You spend ages debugging the complex logic, get right to the end, and it's a display issue. Output text instead of formatted text. I'm not bitter.
That game looks really cool! :3
Birb exterminator
do you think you can do a tutorial on how you make the lighting pixelated instead of being smooth?
Instantly subscribed ❤
Haha I love this, the enemy navigation can be such a nightmare!
As an experienced software developer dipping my toes in gamedev, this constantly happens in “classic” software engineering too
For a development version of the game cosider also visualising their actual trget and not just the navmesh they are sticking to.
true, although I only wish I could stay as calm as this
also is there some pixel filter going on or is the spinning crosshair actually animated? seeing pixels rotate always slightly bugs me so its nice to see here it looks as it should
Game development is problem solving and you are the problem - me to myself every time I try anything and it inevitably doesnt work.
Best piece of advice my Computer Science lecturer gave my class was "If you write code and it works first time, it doesnt work, you just haven't come across the issue yet."
Best piece of damn advice Ive ever gotten in an educational setting.
This is what most people dont see nor understand, the real struggle you get sometimes with bugs. And, its not always your fault. The worst feeling is finding an engine or language limitation that simply cannot acomplish what you want, and then you have to code a workaround youself, thats painful. But worse still is thinking you found an engine limitation, when it was just a PEBCAK issue lmfao.
1:27 its always obvious like this but it always happens
Yeah this is what happens with me all the time... Recently I was working on my game and the enemy was getting stuck in the scene's global position and not the camera... Then I saw the problem I was setting the position to global myself... That had to be only position not global... Good to know I am not alone.... 😅
yes , But ! enemy still renders in when they are behind wall , your vision :D
Dude, can you do a tutorial on how you aim with the mouse?
I have been trying for hours to mimic that behavior but with a joystick for my game.
Knowledge is Power, once yiu understand why things work, you'll know why they aren't, it a journey and most can't walk a mile
this is so fucking real honestly. 10/10
Oh man this is totally like half of game dev for me! 😆
you've got a subscriber for life here!
huge w comment. thanks a ton!
0:30 Debugger (11717) LMAOO💀
just like me fr