Input and Config | C Game + Engine From Scratch 04

Поділитися
Вставка
  • Опубліковано 19 чер 2022
  • This ep covers input handling and keybinds, as well as the beginnings of a game loop and FPS calculation. I had to change editors to get a better experience on Windows so my typing may be a bit jank every so often.
    Code used in recording: github.com/Falconerd/engine-f...
    Pixel art for this series is custom made by Presley Carvalho. Check out his website here: perigic.com/
    Background pixel art for this series is Kings and Pigs by Pixel Frog. Check it out here: pixelfrog-assets.itch.io/king...
    Music for this series is from Breezy's Mega Quest by RyanAvx. Check it out here: ryanavx.itch.io/breezys-mega-...
    ➤ Patreon: / falconerd
    ➤ Website: dylanfalconer.com
    ➤ GitHub: github.com/Falconerd
    ➤ Twitch: / falconerd
    ➤ Discord: / discord

КОМЕНТАРІ • 25

  • @RoyerAdames
    @RoyerAdames 2 роки тому +17

    wow man, just write the game in binary. It will be faster.

  • @sdwone
    @sdwone 2 роки тому +12

    So glad to see a seemingly resurgence in good ole' do-it-yourself game engine tutorials here on UA-cam. Tools like Unreal Engine 5 are great an' all but, if we are to keep on innovating new tech for the future, then we're still going to need developers who are willing to get in, learn and get their hands dirty... Lest we all simply become Unreal Engine game developers and not much else!
    There's also another brilliant tutorial about building computers... FROM SCRATCH!!! Using nothing more than bread circuit boards, wires and chips (I think the content creator is Ben Eater) and better yet, you get to write pure assembly machine instructions to create a very basic operating system, and build simple programs on top of that!
    There's just so much out there now for developers, and budding developers of ALL stripes!

    • @DylanFalconer
      @DylanFalconer  2 роки тому +3

      It's important for some of us to study fundamentals so we can keep society running. I'm planning to follow Ben Eater's 6502 course when I free up some time - it looks fantastic

  • @Tremah2
    @Tremah2 2 роки тому +3

    Very cool, thank you! I am writing a game engine in cpp right now, so its really interesting to see someone do it in C

    • @DylanFalconer
      @DylanFalconer  2 роки тому +1

      Nice, are you writing an engine for a specific game or for general purpose?

  • @kotvkvante22
    @kotvkvante22 2 роки тому +2

    you have great videos.
    do not rush

    • @DylanFalconer
      @DylanFalconer  2 роки тому

      Thank you! I will try not to rush but also not to dilly dally

  • @Gordolone
    @Gordolone Рік тому

    I am loving this series. Your channel is really interesting, also the videos where you share your experience on dropping down from a higher language to c. I like the videos speed since it forces viewers to read the code and the documentation instead of copying from the video. Keep going man this is golden

  • @Ferenc-Racz
    @Ferenc-Racz 2 роки тому

    Nice and effective video. Congratulations. Nice job! :)

  • @videocloud6722
    @videocloud6722 2 роки тому

    Very Cool, Very Clever Writing. you are programming like a master. God bless you.

  • @interactiveslums213
    @interactiveslums213 2 роки тому +2

    although I have been studying C & OpenGL for Graphics Dev, this series has presented interesting ideas.

    • @DylanFalconer
      @DylanFalconer  2 роки тому +2

      Good luck with your studies! I'm pretty weak in graphics but even so I hope it helped

  • @gorgestboi1028
    @gorgestboi1028 Рік тому

    Damn this series slaps so far. Please dont drop it.

  • @arthurbotelhocosta
    @arthurbotelhocosta 2 місяці тому

    Just a quick question: I ran into an issue where my delta is always zero. Didnt figure out why.

  • @amk4071
    @amk4071 Рік тому

    This is kind of random, but I ran into a issue playing around with the code trying to add another keybind after "escape".
    I think the issue is that in config.c the tmp_buffer is never cleared in config_get_value - if the keybind after escape has fewer characters, config_key_bind fails to find the scancode because there's garbage at the end (i.e., "Qs" or "F10a"). I don't know if that explanation makes sense (or if any of this was just user error), but I fixed it by adding a memset(tmp_buffer, 0, sizeof tmp_buffer) at the top of the config_get_value function to "reset" the tmp_buffer every call.
    Anyways, thanks for the great series, it's been an awesome way to learn.

    • @bricksnbuttons2000
      @bricksnbuttons2000 9 місяців тому

      I hit the same thing, it's an off by one error on *(tmp_ptr + 1) = 0;
      This should be *tmp_ptr = 0; since we already incremented tmp_ptr a couple lines before

  • @ggmh-gh7zx
    @ggmh-gh7zx 2 місяці тому

    when i try to run it using the x64 terminal it say R not defined
    return error etc
    cam you please give me a solution?

  • @kaiweiyeo4279
    @kaiweiyeo4279 4 місяці тому

    Hi Dylan,
    Could the OpenGL version be the reason why my window is closing?
    Version: {4.6.0 NVIDIA 546.09}
    Version: {3.3.0 NVIDIA 546.09}
    Thank you.

  • @bricksnbuttons2000
    @bricksnbuttons2000 9 місяців тому +1

    I'm fairly certain you have an off by one error on the line `*(tmp_ptr + 1) = 0;` tmp_ptr already got incremented on that iteration so it should just be `*tmp_ptr = 0` no?

    • @DylanFalconer
      @DylanFalconer  9 місяців тому

      Yes, you are correct! We fix this later as well as the problem of not handling CRLF (Windows style) line endings

    • @bricksnbuttons2000
      @bricksnbuttons2000 8 місяців тому

      @@DylanFalconer Ahh yep still have a few videos to watch haha. Thanks for making these btw!!

    • @xil12323
      @xil12323 7 місяців тому

      @@DylanFalconer The loop can also overflow tmp_buffer if the right side of a line is too long.