8. C++ Hot Code Reloading! Change Code Without Restarting! - Celeste Clone

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 พ.ย. 2024

ความคิดเห็น • 17

  • @Cakez77
    @Cakez77  ปีที่แล้ว +2

    Making a Game in C++ doesn't have to be tedious. It's actually possible to leave the game running while making code changes. This greatly improves the workflow!

  • @User609-iu5co
    @User609-iu5co 10 หลายเดือนก่อน +6

    This is extremely good and valuable information for all game programmers, it makes coding in lower level languages much less tedious...Ive been using this DLL trick for decades. There are some difficulties involved when you want to change data structures within DLL, but with little bit of work you can keep track of memory layout of different structs and allocate/deallocate them as necessary when DLL reloads.

    • @Cakez77
      @Cakez77  10 หลายเดือนก่อน +1

      But you can not change data in the host program right? You could reallocate the game state but not something like render Data

  • @timpz
    @timpz ปีที่แล้ว +8

    For most "services" like reading game input I always create a virtual controller in the game that is given the input from the platform layer. That way I can still dynamically code things like controls without worrying about rebuilding the platform. Another thing I do is I separate the DLL to be debug-only when compiling so that I still get a single .exe when building the release (that's particularly worth it when you don't have dependencies you can't just include which is your style as well).
    One thing that would be interesting to see is dynamically reloading shaders. I know it can be done but it's not something I've seen done or done myself yet in a handmade C++ engine.
    Good content as always though, concise tutorials with this style is very rare on youtube and a great niche to fill!

    • @Cakez77
      @Cakez77  ปีที่แล้ว +1

      I'm gonna go for shader and texture reloading soon yeah. it's not that difficult

  • @ProGaming-kb9io
    @ProGaming-kb9io ปีที่แล้ว +2

    Please never stop this series!!, sooo gooooddd!!!

    • @Cakez77
      @Cakez77  ปีที่แล้ว

      Glad to hear that bro!

  • @sanderbos4243
    @sanderbos4243 10 หลายเดือนก่อน

    Super valuable, thank you! :)

  • @TheRaticide
    @TheRaticide ปีที่แล้ว +3

    This was a very informative video

    • @Cakez77
      @Cakez77  ปีที่แล้ว

      Glad you think so!

  • @theemperor09
    @theemperor09 ปีที่แล้ว +1

    Nicely explained, thanks!

    • @Cakez77
      @Cakez77  ปีที่แล้ว

      Glad it was helpful! Thanks for the feedback

  • @Mijdax
    @Mijdax ปีที่แล้ว +1

    Bro, I dont know if you remember me. I pop up sometimes in your streams every now and then and have a quick chat with you. I love your streams but unfortundately dont have too much time to hang around. But you are a big motivation for me to continue and finish my game (Super Cave Boy, maybe you remember it). Thanks a lot

    • @Cakez77
      @Cakez77  ปีที่แล้ว +1

      I appreciate the support bro, and yeah after looking that the game I remember. Seems like you stuck with black and white mostly. Hope the game is progressing nicely. Any plans to release?

    • @Mijdax
      @Mijdax ปีที่แล้ว

      @@Cakez77 yes, it will stick to it mostly. What I dont stick with anymore is the limited actions after you have done enough puzzles with them. After level 50 it will open up and give you unlimited actions but stages designed in a way that you need them. I am currently at stage 56 and there will be 75, so I am close to finishing the base stuff and then its just menus and saving.

  • @kira_io
    @kira_io หลายเดือนก่อน

    thank you ❤