Optimizing my Game so it Runs on a Potato

Поделиться
HTML-код
  • Опубликовано: 20 ноя 2024
  • ИгрыИгры

Комментарии • 1,7 тыс.

  • @theridonculesknights
    @theridonculesknights 7 месяцев назад +2529

    Shader loading sounds are fucking hilarious

    • @UsernameDoesntCare
      @UsernameDoesntCare 7 месяцев назад +163

      game be like "son, our neighbour is coming round to visit"
      game: "OH SH- FCK FCK CLEAN UP PUT EVERYTHING AWAY, KILL ALL THE DEMONS RQ"

    • @theridonculesknights
      @theridonculesknights 7 месяцев назад +67

      @@UsernameDoesntCare just Gmod glitching out sounds as the game scrambles to make itself presentable

    • @Czarewich
      @Czarewich 5 месяцев назад +16

      I kinda love it and wish it would stay in.

    • @FrankHarwald
      @FrankHarwald 5 месяцев назад +4

      seriously, the fact that you neither tell why or when shader compilation triggers now that you can't trigger then explicitly is really ridiculous.

    • @AnonNopleb
      @AnonNopleb 5 месяцев назад +11

      He better make a secret setting to enable this

  • @Markty07
    @Markty07 6 месяцев назад +1921

    12:36 PLEASE MAKE AN EASTER EGG TO ENABLE THE SOUND AGAIN
    "It sounds like the game is frantically cleaning a room" Is waaay too hilarious

    • @Fireway12
      @Fireway12 6 месяцев назад +55

      Up, this gives life to the loading screen

    • @player92381
      @player92381 6 месяцев назад +12

      i vote for this

    • @foggylight187
      @foggylight187 5 месяцев назад +40

      I also found it pleasantly nostalgic, from back in the Roblox days where you would be loading into a game but you could hear all the other players in the background while you did.

    • @Markus_included
      @Markus_included 5 месяцев назад +14

      It also kinda sounds like the character is fighting it's way into the level or something like

    • @trollsansofficial
      @trollsansofficial 5 месяцев назад +2

      Maybe as a code

  • @aiden_obj
    @aiden_obj 7 месяцев назад +6092

    PLEASE add an Easter egg so that we can enable to the audio or visuals for the shader comp loading screen, that’s hilarious😂😂

    • @Splarkszter
      @Splarkszter 7 месяцев назад +185

      100%

    • @dan_loeb
      @dan_loeb 7 месяцев назад +80

      yes, please!

    • @ZaidaZadkiel
      @ZaidaZadkiel 7 месяцев назад +48

      signed

    • @rosly_yt
      @rosly_yt 7 месяцев назад +153

      was about to comment this. I think that a 10x speed preview of the level is kind of a cool feature as well.

    • @ZaidaZadkiel
      @ZaidaZadkiel 7 месяцев назад +54

      ah i know! record the entire audio of the gameplay and then edit it and shift its speed 10x so it sounds like chipmunks all the whole loadingbar

  • @Queue3612
    @Queue3612 5 месяцев назад +125

    You should absolutely have the loading screens cycle through different titles like "Loading Game"
    "Compiling Shaders"
    Just so one of them can say "Beating Level For You" or something in reference to a replay being played in the background to generate the shaders

    • @redgeoblaze3752
      @redgeoblaze3752 3 месяца назад +6

      I remember Terraria has a ton of quirky loading messages. I'm sure some of which are actually indicative of what's going on at that given moment, but there's also ones like "Mining Bitcoin" thrown in there, so who knows.

    • @krux02
      @krux02 3 месяца назад +3

      @@redgeoblaze3752 quirky loading messages that don't actually explain anything are actually quit common. As musch as I can remember Word of Good had quite a few funny ones. Age of Wonders 2 had some. And the oldest I remember is "reticulating splines" in Sim City 2000 level generation.

    • @FlanFlanScarlet
      @FlanFlanScarlet 2 месяца назад +2

      @@krux02 Reticulating splines is my favorite nonsense loading message. It just feels so.. crunchy. It's also in sims 1 and 2 I believe.

    • @trollsansofficial
      @trollsansofficial Месяц назад +2

      If he does this then there should be a message that says "stealing your blood"

    • @adhillA97
      @adhillA97 День назад

      "Tidying the Castle" - and it enables the sound so you can hear all the clattering

  • @r4ych836
    @r4ych836 7 месяцев назад +2159

    This is the best kind of devlog, gets you excited about the game and also teaches you something about game dev!

    • @Blargis3d
      @Blargis3d  7 месяцев назад +191

      thank you, glad you enjoyed it!

    • @calebgilbertyt
      @calebgilbertyt 7 месяцев назад +47

      So true, I think most of the gamedev audience is a little brained out for something "entertaining", and just want something interesting and inspiring, amazing video blargis!

    • @cinderblocktreehouse
      @cinderblocktreehouse 6 месяцев назад +3

      @@Blargis3d hey so uh do you know what the price is going to be?

    • @tophatplayz1648
      @tophatplayz1648 3 месяца назад +1

      @@Blargis3d For the issue with having to choose 2 systems you could have a settings bar where you can choose what system the player is going to play on. I'm not sure if this would work in practice but if it does work it could fix alot of the issues happening for people with older devices. If that doesn't work you could resort to have 2 version of the game on vulkan and the other one OpenGL

    • @TheInfamousLegend27
      @TheInfamousLegend27 2 месяца назад

      @@tophatplayz1648 while it's a nice thought to enable as many people as possible to play, that would also mean double the work for them; two different graphics APIs, reworking would have to be done for all the postprocessing, particles, etc., and even then, it would never be an identical experience due to the difference between the APIs.
      think of it like a game that has a PS2 and PSP port. that's essentially what you're looking at, and twice the game for one developer ain't that great of an idea ':D

  • @wolfcl0ck
    @wolfcl0ck 6 месяцев назад +792

    "Light baking can sometimes take a long time, think on the order of minutes."
    Literally the best advertisement I've heard for Godot as someone whose main engines up to this point have been Source and Unity.

    • @STNGR4Y
      @STNGR4Y 6 месяцев назад +29

      How long does unity take usually for light baking?

    • @MarcusBuer
      @MarcusBuer 6 месяцев назад +195

      @@STNGR4Y yes

    • @sujimayne
      @sujimayne 6 месяцев назад +60

      ​@@STNGR4Yyes

    • @koekje00005
      @koekje00005 6 месяцев назад +134

      @@STNGR4Y for a complex scene? hours. you can still do other things in the meantime, but if you dare hit play on your scene it goes in the trash and you'll have to wait another 4 & half hours for it to regen

    • @STNGR4Y
      @STNGR4Y 6 месяцев назад +7

      @@koekje00005 oh ok ty

  • @Xeloph986
    @Xeloph986 7 месяцев назад +314

    I ran into the same problems with OpenGL and Vulkan when I launched my game on steam. I ended up just adapting all of my visual effects to look mostly the same between OpenGL and Vulkan and then exported both versions and set them as different launch options on steam. Imagine my panic when I launch the game on Steam and I immediately get bug reports on how the game just doesn't lauch 😭

    • @Blargis3d
      @Blargis3d  7 месяцев назад +115

      Oooof this terrifies me lol. Might end up having to do this. Was your game Godot as well?

    • @Xeloph986
      @Xeloph986 7 месяцев назад +92

      @@Blargis3d yeah it was. It ultimately came down to the fact that it's a retro pixel game. And like you said in the video, people expect to be able to run retro looking games on potatoes :D
      So yeah, setting up a Compatibility launch option or a beta option on Steam might be necessary to make sure everyone can play.

    • @sulfur2964
      @sulfur2964 7 месяцев назад +15

      I'm following ultra engine development and they completely switched to opengl from Vulcan, while gaining performance on amd GPUs. They have a great vide explaining why Vulcan is terrible for development and how almost no games use it, lol

    • @SilverDragonsmx
      @SilverDragonsmx 6 месяцев назад

      @@sulfur2964 OpenGL is functionally a dead end. Development has ceased entirely on it, and it will not see any improvements nor new features. As far as I can tell by the presentation (that also uses AI generated images, which as far as I am concerned is already a red mark against something, I also have no interest in watching a nearly 2 hour video that's functionally just someone going over a slideshow, so maybe something was covered there but not in the slideshow), with all the main arguments essentially boiling down to pointing at numbers entirely out of context, and pretending like a point has been made. (ex, Vulkan games in 2023 vs GlideFX games in 1999, which ignores that game development as a whole has changed since 1999)
      Also minimum system requirements for an API doesn't exactly mean anything - sure you can now "support" games on something as old as a geforce 420, but no one is going to be practically targeting hardware that old, meaning it's equally as valid to say "The GeForce GT 630 is the minimum support for Vulkan".
      Also OpenGL driver support is known to be sketchy at best. This has been well documented.
      Also the wording of "API drivers buggy" isn't a search term normal people will use. instead, "API driver issue" is FAR more likely to be searched, which shows 15.6m results for DirectX, 10.8m results for OpenGL, and 3.4m for Vulkan. (also the original search query gives completely different numbers, with exclusively DirectX being the only one even remotely close).
      As with any sudden and significant performance boost, I would sooner suspect a poorly implemented Vulkan pipeline over any actual benefit to switching to OpenGL.

    • @froge4300
      @froge4300 6 месяцев назад

      @@sulfur2964 vulkan is so much fun to use tho, also most new games use it

  • @janetjane4861
    @janetjane4861 6 месяцев назад +198

    12:40 NO, KEEP IT! Maybe half the volume or something but this is hilarious and exactly in the spirit of older games when devs were allowed to have fun with their projects, adding silly elements in "irrelevant" parts of the game, just for the fun of it while solving problems like this. That always adds so much charm to a game and makes it feel more alive.

    • @baltakatei
      @baltakatei 3 месяца назад +5

      *splines reticulate loudly*

    • @IdentificadorNoDisponible
      @IdentificadorNoDisponible 3 месяца назад +8

      An option to enable the volume of the loading screens would do the work.

    • @caley1942
      @caley1942 3 месяца назад +2

      its got that old multiplayer servers vibe where you would join the game and see only some random area of the map from one angle while you can hear random slashes from other players around the map not in your view 😆

  • @steluste
    @steluste 7 месяцев назад +763

    Omg thank you. I was little bit disappointed when I first launched your game because it run at 25-30 fps on my uhd 620 thinkpad. Now I'll be able to play it at 60fps wohooo
    Edit: for compiling shaders you can set camera fov to 180, detach it from the player spawn on different parts of the map and rotate it 360 degrees. I saw this method used by antii for his game Road to Vostok. You can check it out on youtube

    • @Nate-bd8fg
      @Nate-bd8fg 7 месяцев назад +31

      Rotate 180° lol

    • @realskyquest
      @realskyquest 6 месяцев назад +18

      Nice more fps, road to vostok its pretty good, but pretty buggy now after moving to godot(*rip the guy with godot 3d optimizations*)
      Godot is really neat for 2d, but 3d hurts. As a web developer I'm afraid of react and testing(*its a pain, but i still do it*)

    • @steluste
      @steluste 6 месяцев назад +10

      @@realskyquest I agree. Having good looks doesn't mean it's good at 3d.

    • @sdsdfdu4437
      @sdsdfdu4437 6 месяцев назад +1

      Which video did the road to vostok Dev talk about that?

    • @SirRebonack
      @SirRebonack 5 месяцев назад

      You literally cannot have a 180° field of view with perspective projection.

  • @awsomebot1
    @awsomebot1 5 месяцев назад +409

    I wish more devs thought like this. "My game looks retro af, so it should be able to run on potatoes"
    Tons of indie games with retro aesthetics don't seem to care for optimisation even if it's a simple shooter.
    Worse yet sometimes they'll force Unreal Engine's Lumen to achieve basically raster graphics we've had for decades.
    I guess it's their vision and all, but it seems dissonant with the graphics of the game how you need newer cards to run the thing.
    Glad you're going this route.

    • @WretchedRedoran
      @WretchedRedoran 4 месяца назад +27

      I have a sadly expensive potato of a PC, and whenever I get a game with a retro-3d aesthetic it's not terribly uncommon for it to run like absolute ass, and it always feels like such a burn.

    • @iceblub
      @iceblub 4 месяца назад +1

      fr

    • @johnywhil
      @johnywhil 3 месяца назад +16

      the problem is, year 2016 pc is not a potato. a game that visually looks like form the year 1998 shouldn't barely run on 2016 super powerful pc (of course compared to 1998 hw). we'll talk about potatoes when it'll run smoothly on my smart toaster.

    • @BRAINFOXINFINITE
      @BRAINFOXINFINITE 3 месяца назад +3

      @@johnywhil Exactly. I had a crappy 2008 prebuilt back when I first started seriously messing around with PC gaming and even that was getting 1k+ frames in games like Counter Strike: Source.

    • @Davavo
      @Davavo 3 месяца назад

      An example of this is Gloomwood, it looks nice and retro but my potato is unable to get good frames when playing which is a shame

  • @candybluebird
    @candybluebird 7 месяцев назад +277

    I live for developers talking about all the ways they optimize their code. Also you should keep the sound on for compiling shaders. It is really really funny

    • @xdanic3
      @xdanic3 7 месяцев назад +15

      Agreed, it made me laugh so much when I heard it

    • @ryan_1314
      @ryan_1314 6 месяцев назад +33

      It should be added as a secret option in settings that's just labeled something like "toggle loading screen tomfoolery"

  • @davdav4804
    @davdav4804 5 месяцев назад +26

    Your shader compilation solution is the embodiement of what gamedev feels sometimes, you look for the smart solution who will very elegantly solve your problem, but instead you can just brute force the thing in 5 minutes and get the same result !
    I loved it !

  • @Circle_boi
    @Circle_boi 7 месяцев назад +83

    Chapters
    0:00 Intro
    1:20 Occlusion Culling
    3:03 Baked Lighting
    4:27 Optimizing Enemies
    7:17 Shader Compilation
    13:40 Graphics APIs
    17:22 Rapid Fire Optimization Tips
    18:14 Ending & Results

    • @J0rdan069
      @J0rdan069 7 месяцев назад +2

      What is th point of this?

    • @SapkaliAkif
      @SapkaliAkif 7 месяцев назад +2

      @@J0rdan069 Maybe the commenter will go back to the video for spesific purposes.

    • @J0rdan069
      @J0rdan069 7 месяцев назад +6

      @@SapkaliAkif Yeah, but these chapters are already in the video.

    • @ultimaxkom8728
      @ultimaxkom8728 7 месяцев назад

      Hmmm... culling, pruning, distributing, simplifying, and memoization.

    • @SapkaliAkif
      @SapkaliAkif 7 месяцев назад +2

      @@J0rdan069 Ah, then maybe the comment was copied to the description afterwards.

  • @ninjafish1504
    @ninjafish1504 6 месяцев назад +113

    Unreal Engine game dev here - in principle you can select your renderer in the project settings - DX11/DX12/Vulkan. The engine uses a renderer abstraction layer, allowing the engine to call render commands without worrying about the implementation, and the Render Hardware Interface (RHI) layer converts it into commands in the chosen rendering api. That said, it’s often it’s easier to pick one and stick with it, as some material functions aren’t universally supported so increases the QA time significantly!

  • @BluesM18A1
    @BluesM18A1 7 месяцев назад +397

    Constantly finding barriers in your game's development that are tied to years old issues and pull requests on the github that are supposed to be fixed and merged in just the next update, that is just the Godot experience. Lord help us.
    But also thank you very much for making this video, best insight I've ever gotten on how I can apply optimizations as a fellow Godot developer.

    • @Saas_1
      @Saas_1 7 месяцев назад +5

      May I ask why you are using an engine that has the problem you just described?

    • @BluesM18A1
      @BluesM18A1 7 месяцев назад +56

      @@Saas_1 quite simply, because I am not smart enough to make my own engine yet.
      Even if I was, Godot would probably save me so much time that instead of sitting and waiting for bugfixes I'd be fixing them myself and sending pull requests.

    • @bitnewt
      @bitnewt 7 месяцев назад +56

      @@Saas_1 Other engines also have bugs, but the reports and discussion aren't as easy to find when they aren't open source.

    • @RADkate
      @RADkate 6 месяцев назад +23

      @@Saas_1 the thing is with godot it will eventually get fixed but from i know of unity it just gets replaced by an equally broken system

    • @deadfIag
      @deadfIag 6 месяцев назад +4

      Unreal doesn't have *ANY* of the issues listed in the video, using Godot is literally just shooting yourself in the foot.

  • @darkvulpes4826
    @darkvulpes4826 6 месяцев назад +65

    Okay, this is ridiculously genius and funny, like "My problem was, that shaders compiled on my machine since I've beat my levels myself. How do I fix it for new players? Okay, guess I just have to beat the level for them first myself too, every time." Like someone said in comments, it would be actually very fun option to just turn on preview of shader compilation sequence.
    PS: it's really cool to see your devlogs everytime, both interesting and very informative for other dev who just begin to do yheir stuff.

  • @TertorForss
    @TertorForss 5 месяцев назад +8

    Optimizing is a lost art at this point, devs just go nuclear option assuming everyone has a literal fusion reactor in their basement powering their RTX 9990 Hyper X card from the future.
    Kudos for doing it and for the video in general, good stuff.

  • @TavishMcEwen
    @TavishMcEwen 7 месяцев назад +206

    If you can get an id for each enemy, instead of generating a random number for each, you can instead use mod(id, 20)
    so the 1st, 21st, 41th, 61th, etc enemies will update on the 1st tick, then the 2nd, 22nd, 42nd, etc on the 2nd
    perfectly dividing the enemies up into 20ths for AI updates every tick

    • @Blargis3d
      @Blargis3d  7 месяцев назад +104

      Whoah! I'm gonna use this. Also deterministic which is great for speedrunning and stuff

    • @TavishMcEwen
      @TavishMcEwen 6 месяцев назад +6

      @Blargis3d idk what the mod function in gdscript/c# is but it just gives a remainder, just in case that wasn't clear

    • @alphamineron
      @alphamineron 6 месяцев назад +14

      @@TavishMcEwen I think everyone understands mod() unless you’re a high school kid. It’s basic maths and so common in programming

    • @TavishMcEwen
      @TavishMcEwen 6 месяцев назад +29

      @@alphamineron you know what they say about assumptions

    • @HALOHERO117
      @HALOHERO117 5 месяцев назад

      @@Blargis3d could you possibly make a tutorial on how to make basic camera movements like the camera in your game on the player

  • @bobross9370
    @bobross9370 6 месяцев назад +54

    16:30 You could create two separate builds and have them as launch options on steam.

    • @biraw534
      @biraw534 3 месяца назад +5

      Just like with r6. I noticed it, but I didn't know what was vulkan until now.

    • @alexjay8867
      @alexjay8867 3 месяца назад

      @blargis do this

    • @alexjay8867
      @alexjay8867 3 месяца назад

      @Blargis

    • @007kingifrit
      @007kingifrit Месяц назад +1

      this is not good advice. this requires the player to make choices and have technical knowledge. as a consumer i just want it to work, i don't want to plan things

    • @biraw534
      @biraw534 Месяц назад

      ​@@007kingifrit yeah I agree with u. When I played r6 first time I didn't know about it, and it tanked my preformance. Loking from this angle, I woulden't suggest it now.

  • @c.codyflick2210
    @c.codyflick2210 7 месяцев назад +68

    Re: compiling shaders. That's what me and my colleagues in the industry like to call a "spicy" hack. 👌

  • @ryan_1314
    @ryan_1314 6 месяцев назад +12

    THANK YOU THANK YOU THANK YOU!!!!! As someone who has a potato computer similar to the one in the video (gen4 processor, 8gig ram, no GPU I think) I'm glad you had a computer that bad in mind when optimizing. I'm no programmer by any means, but there's so many games I play that could easily have performance fixed with simple optimizations, such as enabling culling for more objects, staggering calculation times, reducing keyframes, not processing animations for objects out of view, or being able to toggle off shaders so potato PCs like mine don't have to process every object's ray tracing and motion blur. Literally just watching you optimize your game has convinced me to add it to my wishlist :)

    • @leongamin3834
      @leongamin3834 2 месяца назад

      Actually turning off animations isnt big optimization benefit, sure every little is good but to turn off as much dynamic lighting as possible was here probably one of the biggest Performance things.
      Also why the heck did he had dynamic lighting if basicly nothing could interact with it, such things are the reason for bad Performance.
      Also to make the pathfinding calculations dont happen on the same time only reduce short lag Spikes/time freezes. To make the calculations every 20 frames is a good thing.
      To the topic of culling, yes it is good but not really important because computers dont have anymore the Problem with drawing normal polygons. Here it is a thing of good models, if your objects are good, you dont use transparent textures and if you have the same object multiple times it uses only one draw call(a Signal that tells the graphic card to draw a object).

  • @Hiasae-spue
    @Hiasae-spue 7 месяцев назад +107

    I think an alternative way to mitigate shader stutters could be to have a main menu background, where a camera flies through a sort of demo/secret level.
    This would look kinda old school and in line with your game art style.

    • @FrozenDozer
      @FrozenDozer 7 месяцев назад +50

      And then your main menu stutters and freezes like crazy. Not exactly ideal, lol

    • @Aeduo
      @Aeduo 7 месяцев назад +7

      @@FrozenDozer I wonder if shader compilation blocks the whole process or if the like, menu and player controls and stuff are on a separate thread from the main game, if the menu would stay interactable even if the scene in the background is choppy. It'd be noticeable but certainly not as big of a problem as ingame stutters.

    • @L1vv4n
      @L1vv4n 7 месяцев назад +5

      @@Aeduo i don't know for sure, but if during stutter a GPU waits for shaider to process current frame it might be that decoupling menu rendering from the background render is too complex task. Like you will need two renders a separate frames, and than ask gpu to combine current state of both into one frame.

    • @Aeduo
      @Aeduo 7 месяцев назад +2

      @@L1vv4n I think this is kinda the point of something like vulkan though, where you can have some task going on while other stuff is happening and you synchronize tasks and allow stuff to continue or wait based on what tasks have completed or not.

    • @ledark2512
      @ledark2512 7 месяцев назад +11

      @@Aeduo asynchronous shader compilation exists, it waits for the shaders to be compiled before rendering, which solves the freezes at the cose that it may make assets invisible for a moment. I'm unsure that exists for Godot though

  • @ExtraTrstl
    @ExtraTrstl 4 месяца назад +1

    Thank you for this! I don't know how it's typically done, but knowing a game dev legit used out of date hardware to optimize for actually playing the game is outstanding.

  • @jex8885
    @jex8885 7 месяцев назад +30

    This was probably the most interesting gamedev video I've seen yet, it's production grade information for polish, which is rare imo.

  • @MasterTeeee
    @MasterTeeee 2 месяца назад +6

    Baked lighting will also make your finished product larger, in terms of memory. Same with OC.
    All these techniques have the side effect that you're effectively switching the cost from processing cycles to memory usage.
    One thing to bear in mind with this (amongst many) is that, processing cycles are effectively infinite, you'll always have more, you'll just drop render frames if there aren't enough available. Memory is finite, and if you run out, the kernel will either crash (panic), or kill your game, causing it to crash.
    Now, in a game of this scope, it's probably not a huge deal, but if the engine has memory leaks (and all engines/code has memory leaks somewhere) and/or your game code has memory leaks, or somewhere along the compilation chain there are memory leaks (you see where I'm going), then after some time, you'll start to encounter issues that are incredibly difficult to fix.
    I just wanted to clarify that what seems like magic, and to always be a good idea, does have some tradeoffs, and is something every engineer should be aware of.
    PS: Also, NEVER delete files/directories that you don't know what it does. Just rename the directory (add an _ to the start of it's name or something), or change the file extension (.old works well) and this will usually (there are exceptions) have the same effect as deleting it. Then, if you hit a castrophic, "I shouldn't have done that" moment, then you can just rename it back, even if you have boot Linux from usb or something.

  • @Joshimuz
    @Joshimuz 7 месяцев назад +579

    Hello, speedrunner here.
    I haven't watched the whole video yet and I'm in a rush but during the AI section you mention adding a random number to the AI's pathing tick cycle. Please seed this random number generator to the same seed everytime or the tiiiinnnnyyy amount of randomness this will cause will certainly screw TASes (and maybe super high level speedruns) forever.
    Thanks :P

    • @Blargis3d
      @Blargis3d  7 месяцев назад +329

      Ooooh that's a really good point. Noted! Shouldn't be too hard to seed this

    • @Joshimuz
      @Joshimuz 7 месяцев назад +97

      ​@@Blargis3dNice, sorry to probably add another global variable to the pile :P

    • @trentbillington1093
      @trentbillington1093 7 месяцев назад +119

      @@Blargis3d It also has the potential to break your shader compilation replay!

    • @rankail
      @rankail 7 месяцев назад +37

      ​@@Blargis3dit would be even better if you just count up the frame offset % 20. That would almost guarantee a rather even distribution of the calculation.

    • @thepro4805
      @thepro4805 7 месяцев назад +5

      i was thinking about how it would totally ruin TASes as well! lol

  • @That_american880
    @That_american880 3 месяца назад +2

    Just got done playing the demo and wow when the full release is released im immediately buying it the first two levels were very fun and I’m excited to see the rest of your journey

  • @GlassEye-er6rz
    @GlassEye-er6rz 7 месяцев назад +17

    Ohhh, I was just thinking today, "when are you going to release the video? " and then it comes out right in front of my eyes, enjoy watching it all

  • @soviut303
    @soviut303 5 месяцев назад +2

    Added to wishlist. While I'm sure the pathfinding randomization technique will generally give you a decent result, you could still end up with situations where most of the random numbers end up at the same time. A more bulletproof solution would be a simple queue you add enemies to. Every 20 frames the queue would advance and call the enemy's pathfinding routine. Additionally, you could have the pathfinding routine take a callback from the queue so that you could guarantee the last calculation was finished before performing the next.
    Maybe a bit overkill, but hey, this is a video about optimization.

  • @Pope_
    @Pope_ 7 месяцев назад +75

    As someone who has been forced to play some games at 20 fps for years, thank you so much for adding some of these optimizations. Specifically i want to point out the resolution scale options. Its relativly simple to implement but, from a players perspective, can make or break how fun a game is.

    • @neipo
      @neipo 5 месяцев назад +4

      yeah its great for a number of reasons, tbh w/ the aesthetic of the game I might run it at a lower resolution on my 1440p setup just for the ambiance lol

    • @roadent217
      @roadent217 4 месяца назад +2

      I find it curious how older games have so little detail that low resolution preserves a lot of visual clarity.
      I decided to play through Quake 2 RTX on my 4070, and at 1440p I would get ~85 fps at full GPU utilization ("but can it run -Crysis- Quake 2?"). But reducing it down to 1080p I got ~145-155 fps, which is perfect for my 165 hz monitor. I didn't feel any difference - something I couldn't say for modern titles, where 1080p starts feeling a bit fuzzy.

  • @crumblesilkskin
    @crumblesilkskin 6 месяцев назад +3

    13:40, thank you for blinding me while i was watching in the dark

    • @roadent217
      @roadent217 4 месяца назад +2

      That screen has DirectX, OpenGL and Vulkan, but, for the true blindness experience, it's missing SEGA.

    • @freddyfazbear29470
      @freddyfazbear29470 3 месяца назад

      RIP eyes

  • @blakkerr
    @blakkerr 7 месяцев назад +145

    Having the game do a pre-recorded run for shader compilation is a really clever idea, even if a broader solution is coming for the next versions.
    For the AI/pathfinding optimization I had a similar issue, and what I found is to have a singleton responsible for all enemies, and have enemies queue into it to have their next update calculated (can be for path update, sensor check, whatever could cause an issue in large numbers). That way you can control how many calculations you want to per tick (could even adjust it dynamically based on performance), and guaranteed to not have any accidental overlaps.

    • @sourestcake
      @sourestcake 6 месяцев назад +7

      In my experience centralized data structures are the way to go for most things. It allows you to limit and batch work like that. But i do everything in C, so that probably has an impact.

    • @acenio654
      @acenio654 6 месяцев назад

      Well I'll be damned. I just commented something really similar addressing the same point and just saw this. Hats off to you sir

    • @SioxerNikita
      @SioxerNikita 5 месяцев назад

      Even allows to do other updates for each enemy, like even general logic, sacrifice "optimal AI" for performance

    • @ИапГоревич
      @ИапГоревич 3 месяца назад

      It's a more powerful tool than the one in the video

  • @dominobuilder100
    @dominobuilder100 6 месяцев назад +15

    Another optimization: The thing with computing the shortest path from multiple sources to one destination is that it can be reversed. Instead of doing a calculation for each source, do only one calculation from the destination to all sources and you will find the same paths (but reversed). This ensures that you do minimal work and don’t double calculate anything.

    • @ZeroPlayerGame
      @ZeroPlayerGame 4 месяца назад +1

      Unfortunately Godot's navmeshes don't really support this sort of thing - you'd have to roll out a lot of custom code.

    • @dominobuilder100
      @dominobuilder100 4 месяца назад +1

      @@ZeroPlayerGame sure but shortest path is really simple to code so it will still be just a little extra work

    • @ZeroPlayerGame
      @ZeroPlayerGame 4 месяца назад +2

      @@dominobuilder100 no... on graphs maybe, but not on navmeshes where you have to deal with a continuous space

    • @dominobuilder100
      @dominobuilder100 4 месяца назад +1

      @@ZeroPlayerGame ah ok I see

    • @leongamin3834
      @leongamin3834 2 месяца назад

      ​@@dominobuilder100even if it would be possible, the amount of calculations wouldnt decrease

  • @Jungus1999
    @Jungus1999 7 месяцев назад +34

    Hey so with your Pathfinding optimization, it might be helpful to add your Knight agents to a queue and have a manager cycle the queue, invoking their pathfind() function on whatever interval you’d like. You’re probably already aware of this solution but I just thought I’d share since it helped one of my projects. Great video!

  • @Plikso
    @Plikso 5 месяцев назад +3

    0:06
    "But for gaming,it's terrible"
    *start naming the components of my computer

  • @c_ornato
    @c_ornato 7 месяцев назад +22

    As someone who is doing a retro-style fps on godot using Qodot and who has the same performance issues, I can't thank you enough for the techniques displayed here

  • @memesalldayjack3267
    @memesalldayjack3267 6 месяцев назад +1

    man, i feel like I've learned stuff that takes decades to learn just by watching this video, and the guy seems very supportive of his community which ik doesn't sound like a big deal, but it's actually pretty rare

  • @StephenBrown85
    @StephenBrown85 7 месяцев назад +16

    This was a very well put together video - a lot of this stuff is not mentioned very often and takes a while to figure out!

    • @Blargis3d
      @Blargis3d  7 месяцев назад +3

      I'm glad you found it helpful!

  • @dappercthulhu4386
    @dappercthulhu4386 6 месяцев назад +2

    Hey thanks for this. I'm pretty new to 3d game dev and your solutions to these problems will definitely influence how I approach my own projects

  • @TRUFANATIC
    @TRUFANATIC 7 месяцев назад +6

    that's the greatest devlog! i learned a lot about optimization in godot, thank you!

  • @evan-michael
    @evan-michael 6 месяцев назад +1

    I actually really like the sounds your cache solution produced. it's silly, but symbolic of your passion

  • @2004.HondaCivic
    @2004.HondaCivic 7 месяцев назад +12

    Man I genuinely cannot thank you enough for these videos. Your 90s level design video introduced me to the trenchbroom + qodot pipeline a few months ago and I have never looked back. Bloodthief is coming along very well, best of luck

  • @AndreInfanteInc
    @AndreInfanteInc 5 месяцев назад +2

    A better pattern for the pathing stuff, FYI, is to use a round-robin scheduler. So you set a budget for how many agents are allowed to update on a given frame, and each frame you have a manager move the index by n slots and update that many agents. So you can guarantee a fixed load per frame and also guarantee that an agent only goes so many frames between updates. You can use this pattern for a lot of things to smooth out your load to be precisely consistent over time.

  • @abdulwasay81
    @abdulwasay81 7 месяцев назад +9

    I am so so happy that the RUclips algorithm brought me to this place, I watched all the devlogs and really really loved your videos but more the actual game. I got excited to know that I can play it for free right now and just played the demo and OMG those few minutes made my day. Most fun I have ever had playing a single player game in a while! Thank you and I wishlisted it ❤

  • @RR-om3zx
    @RR-om3zx 4 месяца назад +1

    You are so freaking smart. That stutter fix idea is crazy.

  • @ThiagoJaqueta
    @ThiagoJaqueta 7 месяцев назад +12

    Shader pre-compilation is an essential feature for every modern PC game. Glad to see it being implemented, even if it's done in a "unusual way" :D
    For your game, consider adding a integer scaling for resolution scaling, while also giving an option to disable the filtering. So players can play at 1/2 Res, 1/3 Res, 1/4 Res, etc... Prodeus added this option and I personally love it, even though my computer can easily handle the 1440p Native res, I prefer to play older games at 1/3 Resolution to get the those chunky pixels.

    • @MaakaSakuranbo
      @MaakaSakuranbo 5 месяцев назад

      I found Godots reasoning there a bit odd? Fairly sure I've seen games that compile shaders on startup (e.g. Elite Dangerous) instead of only once stuff is seen at least.

  • @sufferingincorporatedtm1781
    @sufferingincorporatedtm1781 5 месяцев назад +1

    thats awesome dude, optimisation is a neglected area across software development these days. even some websites are bloated beyond belief. optimisation reduces e-waste! :)

  • @KorboKommando
    @KorboKommando 7 месяцев назад +6

    A game inspired by Quake, Hotline Miami, Ultrakill, and Ghostrunner? Literally some of my favorite games. I cant wait to try this game out

  • @ryanwillingham
    @ryanwillingham 4 месяца назад +1

    holy shit this makes me realize so that in so many instances when i've had a game stutter, it's the shaders compiling. saving this video even though i only work in 2d, this is super useful

  • @awsmeanthony
    @awsmeanthony 7 месяцев назад +6

    As someone with a potato I see this as a absolute W.
    Edit. I have a Vulcan specific potato so still a W.

  • @SnijwitTv
    @SnijwitTv 4 месяца назад +1

    Honestly I like the audio during shader comp

  • @VilasNil
    @VilasNil 7 месяцев назад +6

    That's a nice jade roller you got there bro, so envious

  • @B3anBag98
    @B3anBag98 6 месяцев назад +1

    Great video, lots of insightful things and exciting to see progress, GGs ^-^

  • @rinkachi-rinkitata
    @rinkachi-rinkitata 7 месяцев назад +20

    Developers like you keep my faith in game developers

    • @krolmuch
      @krolmuch 6 месяцев назад

      the biggest optimisation would not be using a python level scripting language for making a game though

    • @rinkachi-rinkitata
      @rinkachi-rinkitata 6 месяцев назад

      @@krolmuch assembly or c++ would give even more performance

    • @sheepcommander_
      @sheepcommander_ 6 месяцев назад +3

      @@krolmuch "python level" bro does not know what he's talking about

    • @krolmuch
      @krolmuch 6 месяцев назад

      @@sheepcommander_ he uses GDScript inside the game engine. tell me how is it not python level language?

    • @sheepcommander_
      @sheepcommander_ 6 месяцев назад +7

      @@krolmuch "Python level" is not a phrase that means anything, although it just occurred to me this might not be ur first language
      GDScript is a completely original language created to be closely integrated to the engine and it is also much much faster and just better than Python lol
      GDScript and C# have pretty much same performance if you use Static Typing on all your variables and methods

  • @EthylJogodo
    @EthylJogodo 6 месяцев назад +1

    your work is not only informative but also incredibly inspiring!

  • @nudiee
    @nudiee 7 месяцев назад +91

    0:59 the t-posing knights sliding towards you is terrifying

  • @antonsimkin
    @antonsimkin 7 месяцев назад +9

    you are true engineer. i think its the first in a long time i saw someone talking abt optimisation.

  • @EinManU
    @EinManU Месяц назад +3

    99% of modern game devs need to watch this.

  • @jademonass2954
    @jademonass2954 6 месяцев назад +3

    your shader compiler is super smart! props
    also the shader loading sounds are AMAZING i need that

  • @weidiocrow
    @weidiocrow 5 месяцев назад +1

    2:46 Damn, it's neat how a lower res buffer might save performance, but also cause greedy occlusion like this.
    12:05 Running a replay is one of the more creative solutions I've seen to getting over shader jitter, which I thought only happened with particles and didn't realize this was a general class of problem within Godot. Would be cool if you did this when the game started up and then used the same replay in the background like Quake did on it's menu.
    This video was very good. I'm really happy more stuff is coming out like this that points to major issues in Godot that's getting in the way of making finished games.

  • @eni1else
    @eni1else 5 месяцев назад +5

    0:36 it's a jade roller

  • @Oliepolie
    @Oliepolie 6 месяцев назад +2

    Youve been talking about all these advanced optimization techniques that ive realized now is literally every single thing I have to do while making maps for source in the hammer editor...
    entity culling, baked lighting, nav mesh optimization, etc

  • @ThePC007
    @ThePC007 7 месяцев назад +9

    12:25 I actually really liked it when you could see the pre-recorded gameplay during the “Compiling Shaders” screen, lol. In fact, I’d argue that it’s a good way to make the loading screen less boring to look at since looking at a blank screen is incredibly boring.

    • @glorytotheaprdeathtotheufl7917
      @glorytotheaprdeathtotheufl7917 7 месяцев назад +8

      Would spoil the level tough (altough I agree it looks cool)

    • @DynoStorm
      @DynoStorm 7 месяцев назад +1

      Should keep the audio, it's just funny :D

  • @ISKLEMMI
    @ISKLEMMI 6 месяцев назад +2

    17:00 - Man, I was not expecting to see that Kenneth Copeland jumpscare

  • @magichead3335
    @magichead3335 7 месяцев назад +4

    12:12 thats such a cool solution

  • @ViktorSarge
    @ViktorSarge Месяц назад +1

    This is both hilarious and highly useful. And the game is looking fun :)

  • @blendingsentinel4797
    @blendingsentinel4797 7 месяцев назад +5

    The built-in Mesa kernel driver on Linux does let some older hardware run Vulkan further than most Windows drivers, but just doing that for Linux alone is a whole other mess to implement that could break cross-platform compatibility.
    Just thought I would mention that if it seems at all useful to you. :)

  • @DrondaDesuix
    @DrondaDesuix 6 месяцев назад

    The switch from dark-mode webpage o light-mode webpage during the "changing your light setup" was masterful.

  • @smergthedargon8974
    @smergthedargon8974 7 месяцев назад +9

    3:41 Hot take:
    The left one is way better. Extremely better. So much better-looking.

  • @TheCompleteMental
    @TheCompleteMental 4 месяца назад

    Adding to the pile, dear god do I love how the compiling shaders screen sounds. Add an electric drill and handsaw noise.

  • @Butterscotch_96
    @Butterscotch_96 6 месяцев назад +42

    Funny how for 50 bucks more you can get a Steam Deck.

    • @Shrewbloom
      @Shrewbloom 5 месяцев назад +5

      shows how good of a deal the steamdeck is lol

    • @jaemynbaer4504
      @jaemynbaer4504 4 месяца назад +7

      ​@@Shrewbloommore like it shows how overpriced that laptop is😭

  • @Speed001
    @Speed001 2 месяца назад

    Oh i remember this video! You had the crazy loading screen easter egg. 12:36
    Much better than the debate of whether people should add artificial loading screens.

  • @EdcrfQazwsx
    @EdcrfQazwsx 6 месяцев назад +4

    12:27 its actually so funny, you should leave it in the game

  • @user-darkodbd
    @user-darkodbd 5 месяцев назад

    Finally a Devlog thats not just a plain Daily Diary. Thats exactly how a Devlog should be. I wish you your game does well.
    Even if im not into 3D Platformer this game looks still like alot of fun! Great Job Blargis!

  • @moeburhanimeez7354
    @moeburhanimeez7354 7 месяцев назад +5

    I love this GAME!

  • @treyonical2821
    @treyonical2821 2 месяца назад

    I think all that noise it makes during the compilation screen adds personality! I would leave it in fr

    • @treyonical2821
      @treyonical2821 2 месяца назад

      Adds MORE personality i should say

  • @blacklight683
    @blacklight683 6 месяцев назад +11

    0:03 well my pc is a rotten lotato so you still got better

  • @Tynted
    @Tynted 5 месяцев назад

    Omg that solution to the shader compilation problem is hilarious 😂I second including a way to keep those sounds enabled while loading 💀

  • @stackgator
    @stackgator 7 месяцев назад +3

    16:00 With DirectX, there's compatibility layers between different versions of DirectX. DirectX12 is pretty much the same granularity as Vulkan, and Directx11 is the same granularity as OpenGL. Both offer superior performance on Windows machines and are not exclusive to MacOS or Linux. There's also Metal for MacOS

  • @loycross
    @loycross 5 месяцев назад

    This is probably one of the most interesting godot videos I've seen in the past year. Great explanations, interesting from beginning to end and it offered a lot of insight into the engine. Thank you so much for taking the time to document all this, I'm sure it will help a ton of people!

  • @cuppajoeman8569
    @cuppajoeman8569 7 месяцев назад +10

    I was also working on a low-poly godot game, even with the compatibility renderer on my shitty laptops, I barely cracked 50-60 fps on basic maps and minimal game logic. I was pissed because I wanted to have LAN parties with CRT's with really low end hardware.
    I bit the bullet and am rewriting in c++ no engine and just pick and choosing my libraries, now I'm cooking at like 250hz + on these shitter laptops it's great (opengl renderer)

  • @stinkyratman
    @stinkyratman 3 месяца назад

    These are probably some of the best devlogs I've seen, really interesting stuff, thank you

  • @Saas_1
    @Saas_1 7 месяцев назад +10

    You know that this video is basically just showing the core problems of Godot: Bad (rendering) engine, age old and not fixed (critical) issues and the "we'll just have to wait a bit more for the engine to become amazing" mentality.

  • @WildGrowthJ
    @WildGrowthJ 2 месяца назад

    Incredible editing and info! 👍 definitely chuckled.

  • @veeloth
    @veeloth 6 месяцев назад +3

    12:22 I think it'd be extremely cool If you didn't and the loading screen was the replay, but that could spoil the level maybe?

  • @Psicough
    @Psicough 6 месяцев назад +1

    I've been learing about game development for a bit and optimization is one of my favorite topics! So this video was like crack to me

  • @maxwell_edison
    @maxwell_edison 7 месяцев назад +627

    bro get your wife a new computer PLEASE

    • @sean7221
      @sean7221 6 месяцев назад +70

      It's her punishment.

    • @Elias01056
      @Elias01056 6 месяцев назад

      ​@@sean7221for what

    • @sadstrawberrycri
      @sadstrawberrycri 6 месяцев назад +30

      ​What did she do

    • @toucan6109
      @toucan6109 6 месяцев назад +41

      Bro people have other things in life than video games

    • @maxwell_edison
      @maxwell_edison 6 месяцев назад +46

      @@toucan6109 doesn't mean she doesn't deserve a better computer? weird take is weird

  • @ParpleYt
    @ParpleYt 6 месяцев назад

    you no what The loading screen noise makes it sound like your doing stuff (I like it)

  • @thewolfstu
    @thewolfstu 5 месяцев назад +4

    16:20 could you offer both versions, Vulkan & Open GL, for your players, but that is a lot of work.

  • @NovidProkteps
    @NovidProkteps 6 месяцев назад +1

    Definitely allow for the replay and sound replay, I think it adds charm to the loading screen and is reminiscent of the gameplay demos on the menus of Quake

  • @dzjin
    @dzjin 7 месяцев назад +20

    13:50 Technically all 3 are closed source, as it is up to the GPU manufacturer to implement the APIs. OpenGL and Vulkan are open STANDARD, not source

    • @mothcatcher893
      @mothcatcher893 7 месяцев назад +9

      It also does not necessarily have to be the GPU manufacturer to implement the APIs. You have Mesa as an open-source OpenGPL and Vulkan implementation.

    • @chlorobyte_projects
      @chlorobyte_projects 6 месяцев назад +2

      kid called mesa:

  • @pie19988
    @pie19988 5 месяцев назад

    Dude...I was listening to this while also working on a game and this was incredibly helpful...thanks

  • @Spike_LP
    @Spike_LP 6 месяцев назад +10

    15:50 can you make two versions one with OpenGl and one with Vulkan and at startup it checks what it should use eather openGL or vulkan and then deleate the other one?

  • @eamonmulholland3159
    @eamonmulholland3159 5 месяцев назад

    Dude, this is the most interesting game dev video I've seen in a long time! Subbed

  • @DarkAngel-ti6ti
    @DarkAngel-ti6ti 3 месяца назад +3

    And somehow the laptop im watching this on still has worse specs💀

  • @ch4.hayabusa
    @ch4.hayabusa Месяц назад

    12:31 I love it... keep it in... it shows that you're actually working. Otherwise the screen looks fake

  • @arckanumsavage2822
    @arckanumsavage2822 4 месяца назад +5

    It's not a potato. I don't know how old are you but I remember real potatoes. This laptop is great for gaming

  • @WizardGCruz
    @WizardGCruz 6 месяцев назад

    wow man, such a heavy atmosphere, i will buy your game for sure

  • @Timely-ud4rm
    @Timely-ud4rm 6 месяцев назад +3

    15:43 Why don't you just make the game for both vulken and openGL? Mabye make a setting to use either openGL or Vulken so for the people with potato Pc's they can use openGL which works better and for people who have modern pc's vulken. Make Vulken the default graphics API but players can choose to switch back and forth in the graphic settings. Again this is just a suggestion, and depends on how many people are actually playing the game with lower end hardware. Also the fact openGL needs some work before you could implement this even if you wannted to. Also a crazy idea but just a thought is you could have the game see which graphics api is the best for that system then have that grapghics api be used by default. ofc the user can still switch between which api they want.

  • @EarwormEngineAI
    @EarwormEngineAI 5 месяцев назад

    Your solution for compiling shaders is brilliant!