Odin + Raylib: Snake game from start to finish

Поделиться
HTML-код
  • Опубликовано: 17 янв 2025

Комментарии • 29

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

    I've written a book about Odin: odinbook.com/ ✨-- One way you can learn the language is by first following this tutorial video and after that reading the book.

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

    Very cool, love to see a tutorial to make an entire game from start to finish

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

      do you have any beginner tutorials like this for sokol to recommend?

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

    Thanks!

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

    I've never tried Odin or Raylib. But thanks to your videos I’m planning OdinWeek 💯

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

      Thanks! Good luck on the OdinWeek 😺

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

    All this in only 195 lines of code. Unsurprising that ODIN is so popular for making games. Great video, thanks

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

      I think its mostly because of how simple raylib is, you would get similar results if you wrote the code in a similar fashion in a language like cpp. Though odin does provide some nice abstractions compared to smth like c, there is not a lot of difference with cpp. I would even argue you have a lot more features useful for gamedev in cpp than in odin.

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

    This is all really helpful content for someone starting out, you're doing a great community service (as usual!)

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

    Something so satisfying about low tech game dev. Really enjoyed it, thanks for sharing.

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

    34:01 this technique is called sliding window and it's so efficient, big brain ideas karl !!!

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

    Great tutorial ! I just want to discover Odin and this video is a good start. Thanks ! I just bought your game on steam, I'm looking forward to playing

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

    This was quite fun. It was very easy to follow and I learnt a good chunk about odin

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

      Happy to hear that. Have a nice day!

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

    Good stuff!

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

    thanks for this it was a great help

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

    Hi nice tut, so can you make a little tutorial on how make text based adventure game??

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

    Good stuff!

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

    Compile this for web, possible?

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

      I haven't tried it, but you could look into this stuff, perhaps it is possible: github.com/Caedo/raylib_wasm_odin

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

    I have question, if i implement rpg, that have level 1 to level 10, how do i handle level transitions and cutscenes? Thanks

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

      Hi.
      You can make a "Level" struct and change which Level struct you are currently using. So then you have one such struct per Level. The struct can contains tiles, object or whatever yo want your level to consist of.
      As for cutscenes, you can add a 'Play_State' enum and have one value that is 'Playing' and one that is 'Cutscene'. Then in the cutscene case you can write special code for moving around characters etc.
      Or if you by cutscene just mean 'dialogue', then you can have some special 'Dialogue' play state, and then you can save some variables with who you are talking to and what the current dialogue options are.
      These are just some ideas, there are many ways to accomplish this.

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

      @@karl_zylinski thanks!!! My own approach is treat level and cutscenes as a function, and use recursion to handle level transtition, but recursion it's quite slow so i'm looking for alternative approach.

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

    Enjoyed this a lot. I'm doing C# for more than 15 years, I think I finally found something I can enjoy.

  • @dont-be-hasty
    @dont-be-hasty 4 месяца назад

    Link to the assets seems to be broken.

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

      Fixed! Thanks for letting me know.