This crash nearly ruined my indie game... (for PAX East)

Sdílet
Vložit
  • čas přidán 2. 06. 2024
  • Support development on Patreon
    ❤️ / kylebanks
    Wishlist Farewell North on Steam
    👉 farewell-north.com/steam
    Join the Discord
    👉 farewell-north.com/discord
    PAX East is one of the biggest gaming festivals in the world. It's this weekend and I haven't updated my indie games demo since Gamescom - 7 months ago! In that time I've made a ton of improvements to the game that I want to get into an updated demo for PAX, but a few bugs and crashes nearly ruined the whole thing.
    In this devlog I'll show you some of the improvements I've made to the game over the last several months, and explain the two main issues that nearly ruined my demo for PAX, as well as how I fixed them. Enjoy!
    Credits
    👉 Edited by @TheShelfman
    👉 Farewell North Original Score by John Konsolakis: www.johnkonsolakis.eu
    Game Overview:
    Restore color to the desolate islands of Farewell North, an open world journey where you play as a collie traveling with his owner. Explore land and sea, uncover hidden paths, evade monsters, and free wildlife to bring color back to the world while revealing an emotional story about saying farewell.
    Twitter: / kylewbanks
    Website and Email Newsletter: farewell-north.com
    0:00 PAX East
    0:22 Game Updates
    1:17 Unity Camera Issue
    2:30 The Big Crash
    4:33 The Big Fix
    5:25 Basemap Shader
    5:38 Unity Camera Fix
    6:37 Ready for PAX!
    #devlog #gamedev #gaming #videogames #indiedev #indiegame #unity #unity3d #madewithunity #indiegames #indiegamedev #gamers
  • Hry

Komentáře • 131

  • @kylebanks
    @kylebanks  Před rokem +20

    Thanks for watching

  • @jondaviddrake373
    @jondaviddrake373 Před rokem +89

    I wish I had even half your patience. Seriously incredible work.

    • @kylebanks
      @kylebanks  Před rokem +2

      Haha thank you. I think it's just stubbornness more than anything

    • @yourmajesty9025
      @yourmajesty9025 Před rokem +1

      What about my patience? 9 year of developing one game full time alone… 😅

  • @Private_Duck
    @Private_Duck Před rokem +11

    That's the most demented bug I've seen in a while

    • @kylebanks
      @kylebanks  Před rokem +2

      I don't disagree :/
      Still no idea what the problem was

  • @codersama
    @codersama Před rokem +4

    bro's debugging has O(log n) time complexity
    4:33

  • @chameleonedm
    @chameleonedm Před rokem +34

    Holy SHIT dude.
    You underplayed that debug massively, I imagine you were losing your mind at moments. Thank you for this devlog, I don't think I've ever seen one run through a debug process so well. It's really highlighted to me the importance of testing on as much hardware as possible, what a wild bug

    • @kylebanks
      @kylebanks  Před rokem +13

      Yea I was sweating for a bit there 😅
      Ultimately I really don't think I would have been able to resolve it without having access to an AMD chip myself, which is scary when you eventually have to support tons of hardware you don't actually own

  • @LifeCodeGame
    @LifeCodeGame Před rokem +24

    This looks like an amazing game! Can't wait to see the demo at PAX East!

    • @kylebanks
      @kylebanks  Před rokem +3

      Thanks! I'm gutted I can't be there personally but you can find Farewell North at the Mooneye booth :)

  • @OdemGeek
    @OdemGeek Před rokem +19

    Really love your devlog style. Just shows all the troubles you get (I guess not all) to make things work.

    • @kylebanks
      @kylebanks  Před rokem

      Thank you, really appreciate it :)

  • @Letsmakeusad
    @Letsmakeusad Před rokem +3

    I literally experienced this Camera bug yesterday and spend the whole day looking for any information on the forums, documentations, but could not find anything! As I was just going crazy trying to understand why I get my FPS halved with every camera I have in the scene I stumbled randomly upon your video. While this bug continues to exist I'm glad I found that i'm not tripping and it's actually a bug and not a mistake on my end. Subscribed and will keep an eye on your videos. Great work.

    • @kylebanks
      @kylebanks  Před rokem +2

      No way! Ha what are the odds... Well, welcome to the channel 😊

  • @akidevcat
    @akidevcat Před rokem +3

    Thanks for the video, it is really interesting to watch!
    As for crash, it seems that the shader has some faulty logic that calls an invalid instruction on the GPU or blocks further execution. I had the same problem when I accidentally went outside of the StructuredBuffer size in my shader (and, to note, not exactly one item over - it caused the fault after hundreds of non-existing collection items - similar to how this happens in C on CPU) because half data type was treated as float by the compiler, thus breaking everything. The error message actually does not specify that the GPU was physically disconnected. What actually happens, your GPU is being reset as it got stuck or received an error while executing your shader code. This is quite simple to reproduce: try creating a shader with an infinite for loop, it should give you the same result. However, in your case it seems that the problem is reproducible only on the AMD architecture which is not suprising as the execution pipepile of your shader code differs between NVIDIA and AMD. The code you've shown could be investigated even further as it has functions called "GetGrayscaleDistanceFactor" and "Grayscale" - they also might be the cause. Eventually, from the code snippet you've provided it bothers me whether the zero value for normal and viewDir might cause this problem as they should never be zero length vectors.

  • @SomeHumbleOnion
    @SomeHumbleOnion Před rokem +5

    Props to you for getting this demo up man. Nothing scares me more than hearing my game has crashed. Trying to fix those issues is a NIGHTMARE

    • @kylebanks
      @kylebanks  Před rokem

      Thanks man, definitely not the fun part of making games 😅

  • @jcd9456
    @jcd9456 Před rokem +6

    Congratulations for fixing your bug. I just want you to know that I, as part of your community of subscribers, appreciate your persistence, creativity, dedication, and generosity in sharing your experience that inspires people.

    • @kylebanks
      @kylebanks  Před rokem +1

      Thanks so much, the support really means a lot

  • @fixiple2722
    @fixiple2722 Před rokem +6

    Excellent devlog! I was really with you in the bug hunting :D Keep it up ❤💥

  • @georgehennen
    @georgehennen Před rokem +1

    Thank you for updating the title. Now I don't feel click-baited, and feel like I can click it.

    • @kylebanks
      @kylebanks  Před rokem

      I never changed the title 🤔

  • @wafi5576
    @wafi5576 Před rokem +3

    really loving this dev loging style.. informative as always

  • @CameronChester
    @CameronChester Před rokem +3

    Really interesting video. Love these kind of videos with weird problems getting solved. Hope PAX goes well!

  • @LostRelicGames
    @LostRelicGames Před rokem +1

    An epic journey you are on dude. I remember watching the game come together in it's early days - it's come a long way! Almost there man!

  • @valentincabourdin6545
    @valentincabourdin6545 Před rokem +1

    Really entertaining video. GReat work on the demo!

  • @cvhamilton5
    @cvhamilton5 Před rokem +2

    Looks great! Can't wait to play the new demo!

  • @Zinisco
    @Zinisco Před rokem

    Awesome video! Excited to try this game at Pax East!

  • @Tommy_Catz
    @Tommy_Catz Před rokem

    Beautiful looking game dude! Amazing work.

  • @anbagames
    @anbagames Před rokem

    Okay, I think this devlog stressed me out more than it should have :D
    Good that you're some kind of shader wizard and were able to find and fix the bug! I probably would have gone crazy in that situation... x)
    Was your AMD GPU an OnBoard chip?

    • @kylebanks
      @kylebanks  Před rokem

      Ha sorry to stress you out man! Yea it's a low power integrated chip, I guess some gaming laptops have them because they consume much less battery than the gaming chip for trivial GPU tasks

  • @troglodyteluke
    @troglodyteluke Před rokem

    Good job! Looking for such a bug must be hard... Shaders are "scarecrow" for me... It's like another level of programming :D

    • @kylebanks
      @kylebanks  Před rokem

      Haha yea they can be pretty mysterious at times for sure

  • @Oculu5addict
    @Oculu5addict Před rokem

    Keep up the good work been here since ep1

  • @darenn-keller
    @darenn-keller Před rokem

    Happy to see you managed to get the version running for PAX! ☺

    • @kylebanks
      @kylebanks  Před rokem +1

      Thanks so much Darenn, loving the Leuer updates!

    • @darenn-keller
      @darenn-keller Před rokem

      @@kylebanks Oh thanks!

  • @godofthecripples1237
    @godofthecripples1237 Před rokem

    Been quite a while since I checked in on this game, cool to see how far it's come. It looks WAY more polished (as expected) and like something I could see gaining a pretty substantial following.

  • @adamfifield4014
    @adamfifield4014 Před rokem

    I recommend using the profiler for future problems like this. You can determine what the problem is faster bc u have updated information on your hardware the moment the crash happens.

    • @kylebanks
      @kylebanks  Před rokem

      You can't profile a hard crash, the profiler goes down with unity before debug information is available

  • @Sisufyable
    @Sisufyable Před rokem

    Well done! There's a sweetness to engine bugs making you find more efficient solutions in the end. 🤓

  • @Gurem
    @Gurem Před rokem

    That camera fix is ingenious. Just to ensure I'm understanding correctly, what ur doing is similar to moving the camera to above the player getting the texture then moving it back to the player except the camera isn't moving at all just it's viewport.

    • @kylebanks
      @kylebanks  Před rokem +1

      Sort of, instead of moving the main camera I still keep the overhead camera around (but disabled) and send it's projection matrix to the shader after the main camera sets its projection matrix. Basically it's like
      // Unity Code
      SetProjectionMatrix(mainCamera)
      // My Code, after Unity and right before drawing
      SetProjectionMatrix(disabledOverheadCamera)

  • @CorruptShark
    @CorruptShark Před rokem +1

    very excited for the full release

  • @darknetworld
    @darknetworld Před rokem +1

    Great work which not easy to debug stuff. At least you got it done and clean up some codes.

    • @kylebanks
      @kylebanks  Před rokem

      Always nice to tidy things up ☺️

  • @Smabverse
    @Smabverse Před rokem +1

    Ur game is looking AMAZING 💪

  • @Kennedy00Louis
    @Kennedy00Louis Před rokem +1

    This has to be the weirdest bug I've ever seen, it's so random and unexplainable.
    Why only on AMD specifically? Why in that particular place? And PHYSICALLY REMOVING THE GPU? HOW?
    Biggest unsolved mystery ever lmao

  • @nozzos7183
    @nozzos7183 Před rokem

    It works, earned a sub

  • @professorpandapants2652
    @professorpandapants2652 Před rokem +1

    What if you added a pile of raked autumn leaves you could jump in? Like the stick throwing mini game.

  • @noneofyourbusiness1304

    Did you try further mess with the values within the broken function, before removing it, to see if any different or even basic values still crash it? So like, getting the very exact line and variable that does it? That could help further understand the issue.
    You could also try isolate the problem to its own file with everything entirely stripped out of it that does not make it crash.

  • @lowkeydani
    @lowkeydani Před rokem

    i bless you with my thanks and graditude

  • @mattiskardell
    @mattiskardell Před 22 dny

    omg it looks so bad from the editor but so good when you actually play (that’s how you know you are a good developer)

  • @mobeenbabar2639
    @mobeenbabar2639 Před rokem

    Not for nothing my dude but YOU are amazing, thank you very much. Simplest thing I've ever downloaded I think

  • @GonziHere
    @GonziHere Před rokem +1

    There had to be some issue in that calculation that crashed the game. Most likely comming from the material in view (on lighthouse for example). Maybe IN.positionWS was missing/broken for some reason, maybe _WorldSpaceCameraPos had some issue, etc.
    Anyways, if you've checked the code and didn't find nothing, then check that spot where it's happening and check the asset involved.

    • @kylebanks
      @kylebanks  Před rokem +4

      I've gone through the frame debugger and checked every variable, and I'm truly at a loss. The only thing I can think of is that its a red herring and the real issue is still lurking somewhere else, but testing was pretty conclusive that removing that one line was the only change that would resolve the crash.

    • @GonziHere
      @GonziHere Před rokem +3

      ​@@kylebanks Yeah, I absolutely understand your fix. It's just that the code is so simple at that place that it has to be a data error.
      Or, that code is part of something bigger and this calculation has pushed it over the edge memory-wise or something like that.
      Anyways, if you'll ever revisit and find the actual issue, please mention it in your devlog. I'm bothered by not knowing :D

    • @MrGrayNk
      @MrGrayNk Před rokem

      @@GonziHere If this is a data error, then why is the issue only reproducible on AMD GPUs? And why is the error code so strange (and is present in other games)? I'm also very interested to know the root cause

  • @saito853
    @saito853 Před rokem

    This man need a medal (and probably some therapy sessions) for using the bi-weekly Unity beta releases on a production-ready game.

    • @kylebanks
      @kylebanks  Před rokem

      Wouldn't necessarily recommend it unless you're willing to tinker and explore the available Unity source code to fix things yourself, but overall it actually hasn't been too bad at all

    • @saito853
      @saito853 Před rokem

      @@kylebanks I'm working on a DOTS prototype, updating to their laster (pre-65) version broke every single component Baker because they decided to change up the syntax, fixing 30+ files just to add one extra line wasn't fun. There was also no documentation update so I would need to browse the forum for answer which wasn't fun.
      I also love tinkering with pre release stuffs but damn this is stressful

    • @TeppuTeppu
      @TeppuTeppu Před rokem

      @@saito853 I have been using multi-threading with unity, I wouldn't want to use dots because it seems unstable. Multi-threading is very delicate, definitely wouldn't trust pre release stuff.

  • @gyk-zb2fm
    @gyk-zb2fm Před rokem

    New devlog!

  • @janimusicshorts7707
    @janimusicshorts7707 Před rokem

    About the lighthouse-crash bug, did you check texture streaming pool size? I know that's how my games can slow down substantially. I can't say that is the issue (I've never faced an issue like this)
    but that could be a possibility.

    • @kylebanks
      @kylebanks  Před rokem +1

      I didn't, but given that removing the one line (unrelated to any textures) resolved it, and the total memory footprint remains the same, I don't think that's it

  • @ScarletShadow02
    @ScarletShadow02 Před rokem

    The cursed lighthouse

  • @thislooksfun1
    @thislooksfun1 Před rokem +1

    I have no idea why that crash happens, but since you can reproduce it so reliably and you have access to the source code I wonder if it would be worth reporting to AMD so they could look into it, and hopefully fix it if it's a driver/firmware issue.

  • @Simi3x
    @Simi3x Před 10 měsíci

    What did you do to improve your textures and shadows?

  • @TitanLordofPizza
    @TitanLordofPizza Před rokem

    looking great

  • @ITpanda
    @ITpanda Před rokem +1

    3 on-site, 2 off-site. Backups are too important not to utilize them. The title of this video scared me, I'm truly looking forward to games full release.

    • @kylebanks
      @kylebanks  Před rokem +3

      Oh don't worry about that, this game's got version control for days

    • @ITpanda
      @ITpanda Před rokem

      @@kylebanksDo whatever works for you, I guess. I learned years ago when I first got into IT work to never trust a singular backup or hard drive. Since the rise and ransomware sometime ago always off site back up as a spare with disconnected on site backups. It only takes losing everything once.

  • @SmartLearningAI
    @SmartLearningAI Před rokem

    I noticed you have multiple scenes loaded. are they additively added and active or what is their status?

    • @kylebanks
      @kylebanks  Před rokem +1

      They're additive. Check my last devlog, it's all about how I setup world streaming in Unity ☺️

  • @jaddd
    @jaddd Před rokem

    How can you bear all the time to run Unity and start working on the game
    I don't have all that patience even with a small project
    Any tips if you have to rev the engine to start

    • @kylebanks
      @kylebanks  Před rokem +1

      Some days it's really not fun or enjoyable, but I think you need to build some discipline and just do it. Usually once I get going I find it enjoyable again and get into a rhythm, the hardest part is just getting started

  • @tarwin
    @tarwin Před rokem

    Binary search by turning code is my favourite debug tool too!!! 😅

  • @slygamer01
    @slygamer01 Před rokem +2

    The "device removed" error is badly worded, because it is usually a GPU driver crash. But the OS sees it as the device being removed because the driver is no longer there.

    • @kylebanks
      @kylebanks  Před rokem

      Yea that's kind of what I figured, and the error that shows up inside unity is much better worded, but it was pretty confusing for a minute there

  • @mkatarn
    @mkatarn Před rokem

    At least you did not have a crash during a big live stream! 😅

    • @kylebanks
      @kylebanks  Před rokem +1

      The thought of that stresses me out big time

    • @mkatarn
      @mkatarn Před rokem

      @@kylebanks I survived, so would you 💪

  • @mcgames4455
    @mcgames4455 Před rokem

    a the device lost error the nemesis of all renderer devs

  • @4Bakers
    @4Bakers Před rokem

    I'm assuming it hit a strange edge case with that specific geometry

    • @kylebanks
      @kylebanks  Před rokem

      Must have, yea, I just can't figure out what it could have been

  • @Atharv0812
    @Atharv0812 Před rokem

    Packaging errors are always the worst.

  • @polygonalcube
    @polygonalcube Před rokem

    Will there be a version for Linux/Steam Deck?

  • @f11bot
    @f11bot Před rokem

    Yep when some Unity bug like that happens the best way is just to bypass Unity code and fix it your own. (It’s always faster from my experience XD)

  • @neozoid7009
    @neozoid7009 Před rokem

    Awesome

  • @iyi-ifeadegbulugbe2035

    nice

  • @After_Pasta
    @After_Pasta Před rokem

    Its a driver bug that effects AMD drivers crashing
    when they get certain load in dirx has been prevalent for ages

    • @kylebanks
      @kylebanks  Před rokem

      Maybe, but the issue was caused by a few simple arithmetic operations while disabling hundreds or even thousands of other operations didn't solve anything

    • @After_Pasta
      @After_Pasta Před rokem

      @@kylebanks yep to be fair to AMD they are working on making their drivers compatible for tons of other applications
      plus the way they operate can be very different from nvidia cards
      I would recommend asking someone at unity if they have come across any similar issues

  • @Robyamdam
    @Robyamdam Před rokem

    how do you not get demotivated from big game crashes like this

    • @kylebanks
      @kylebanks  Před rokem +2

      Pure stubbornness and deadline stress 🙃
      More seriously, some days it is super demotivating. But discipline and learning some tricks for debugging issues where you don't know what's going on can be a big help. That "binary search" technique can be a big help when you have a hard crash that can't rely on logs/debuggers/etc.

  • @stickguy9109
    @stickguy9109 Před rokem

    "Amd doesn't have driver issues".

  • @Skeffles
    @Skeffles Před rokem

    I would have torn my hair out at that crash. Great work fixing it!

  • @WarframeCrunch
    @WarframeCrunch Před rokem

    That's why I'm afraid starting making games xD

    • @kylebanks
      @kylebanks  Před rokem

      There's a lot to games but if you just take it one thing at a time it's much less daunting 😊

  • @adictedseon8913
    @adictedseon8913 Před 11 měsíci

    HEYY DUDEEE I am one of your fans. Can we make some 2d animations with ur game? I am interested to work with u

  • @HuskiGames
    @HuskiGames Před rokem

    Wow amazing, whenever I get a bug that is because of unity i just pack my bags and give up

  • @kolupsy
    @kolupsy Před rokem

    Don’t do pre-releases, kids

  • @a98k
    @a98k Před rokem

    switch to the engine given by the heaven themselves, godot, before another crash

  • @kingbling7571
    @kingbling7571 Před rokem

    (゚⁠ο゚⁠人⁠)⁠)

  • @bardia1285
    @bardia1285 Před rokem +1

    Unity most incompatible with Intel Graphic
    Minor compatible issues with AMD
    Fully Compatible with Nvidia
    and developers of unity never really cared about it
    it is a engine side problem bro you gonna be fine with other engines
    also lately flax engine had problems with intel gpu they fixed it in new version when users asked them they are small team but Unity big company doesn't care!!!!
    I remember lots of crashes from Intel users on game i made with unity also i had a decent system that time still unity even was crashing on my own system!