Make games using Odin + Raylib #1: Setup and first code ✨ For beginners

Поділитися
Вставка
  • Опубліковано 18 чер 2024
  • Blog post version of this video: zylinski.se/posts/gamedev-for...
    This is a beginner friendly intro to making games using the Odin programming language and Raylib. It's meant for people without programming experience, but it might also be interesting to people who know programming, but are unfamiliar with making games.
    Throughout this series we will make a small 2D game with simple platforming mechanics.
    Contents:
    00:00 Intro & Target Audience
    01:34 What's Odin?
    02:56 What's Raylib?
    03:58 Can you make proper games with Odin and Raylib?
    04:16 Download and setup the Odin compiler
    07:58 Download Sublime Text, a code editor
    08:28 Let's write our first Odin code!
    15:52 Let's compile the code and run our game!
    17:33 Did anything go wrong?
    19:00 Compiling directly from within Sublime Text
    21:45 The end! See you in part 2
    Odinlang website: odin-lang.org/
    Odinlang install instructions: odin-lang.org/docs/install/
    PortableBuildTools: github.com/Data-Oriented-Hous...
    Raylib website: www.raylib.com/
    Buy my game CAT & ONION on itch.io zylinski.itch.io/cat-and-onion or wishlist on Steam store.steampowered.com/app/27... -- The itch version comes with the full Odin + Raylib source.
    You can find me on:
    Twitter: / karl_zylinski
    Threads: www.threads.net/@karl_zylinski
    My Gamdev Discord server: / discord (also has a channel for talking about Odinlang)
  • Ігри

КОМЕНТАРІ • 73

  • @karl_zylinski
    @karl_zylinski  4 місяці тому +7

    If you found the music too loud: Sorry! Here is an unlisted re-upload with the music lowered: ua-cam.com/video/TALEojKNM4A/v-deo.html.
    00:00 Intro & Target Audience
    01:34 What's Odin?
    02:56 What's Raylib?
    03:58 Can you make proper games with Odin and Raylib?
    04:16 Download and setup the Odin compiler
    07:58 Download Sublime Text, a code editor
    08:28 Let's write our first Odin code!
    15:52 Let's compile the code and run our game!
    17:33 Did anything go wrong?
    19:00 Compiling directly from within Sublime Text
    21:45 The end! See you in part 2

  • @alyaamex
    @alyaamex 4 місяці тому +12

    So glad I found Odin, it's such a comfortable language. Excellent tutorial : )

    • @karl_zylinski
      @karl_zylinski  4 місяці тому +1

      Thank you! Happy you found Odin!

  • @JackProsper-ft1fg
    @JackProsper-ft1fg 2 місяці тому +3

    Perfect tutorial. Happy to begin my Odin Raylib journey.

  • @Timberfist
    @Timberfist 4 місяці тому +2

    I just wanted to say a big thank you for taking the time to prepare this video and the accompanying blog post. I'm just getting started with Odin and was hitting a wall setting everything up just the way I wanted it. You've saved me a lot of trouble.

  • @Evan_M_55
    @Evan_M_55 4 місяці тому +2

    I've been using SFML and OpenGL for a while but recently started to use Odin and Raylib. I've only built a few small games in Odin (pong, snake, tetris) so far but just bought your game and the source code has been awesome to learn from. Tack så mycket för denna videoserie och grattis till ditt spel.

    • @karl_zylinski
      @karl_zylinski  4 місяці тому +2

      Tack så mycket! Happy you enjoy the game and the source. Sorry for the 10k lines long game.odin file, hahaha

  • @arma5166
    @arma5166 4 місяці тому +3

    even though I don't fit into the target audience for this video, I really enjoyed and benefited from your other videos. keep it up
    Edit: I do really like how you put the main points on the screen

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

      Thank you, I was hoping it would be of interest to others as well. I think also the further one gets into the series, the more interesting it will be for already experienced devs.

  •  4 місяці тому +1

    You're making me excited about coding a pc game :)
    Feeling like first time coding on 8bits back in 80s :)
    Keep up the good work!

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

    Thank you for this, Karl! You've inspired me to actually start using Odin properly, having tinkered with it a little bit at the beginning of last year but felt a little 'at sea' with where to go next...
    Game purchased - and thank you for including the source code as an option.
    Looking forward to part two and onwards!

    • @karl_zylinski
      @karl_zylinski  4 місяці тому +1

      Thank you! Very happy it inspired you
      Thanks for buying my game 😻
      Also, the second part is already out, but maybe you just meant that you're gonna watch it later :)

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

    Great content! Thanks for your work, I find your videos very insightful :)

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

      Thanks for watching! It makes me happy that people enjoy the videos

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

    Karl, thanks for teaching us gamedev using Odin lang!

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

    I was getting weird errors on my first compile/build. I know this a noob mistake not everyone else will make. But, besides missing a comma, I had this new file in the same project folder as my hello world. x_x After fixing that, it works, ty for the tutorial, I will be following

  • @jakubtomsu
    @jakubtomsu 4 місяці тому +2

    This is awesome!

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

    Nice! Good stuff.

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

    Very, very nice tutorial

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

    this is sick

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

    This is gold!

  • @lommix-games
    @lommix-games 4 місяці тому

    Nice tutorial. Odin is really cool and your amazing devlogs just make it look so juicy. Only one last wall keeping me back, I cannot figure out how to compile odin + raylib to wasm and webgl to run in the browser. I wish you great success with your game!

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

      Thanks.
      I haven't tried to get Raylib + WASM running, and I don't think anyone has really tried it out much yet. But someone did put up a tutorial on how to do it with WebGL. Demo: thetarnav.github.io/odin-wasm/ Source: github.com/thetarnav/odin-wasm
      Maybe one can get some ideas on how to do similar stuff with Raylib from there. No promises though!

  • @mkjyt1
    @mkjyt1 22 дні тому

    Thanks!!!!

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

    Amasing dude, was waiting for a series like this. love the format.

  • @SabeDoesThingsChannel
    @SabeDoesThingsChannel 3 місяці тому

    you should maybe do a tutorial on tile maps and collisions because there is a severe lack for them for raylib and odin in general.

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

      I'll probably cover collision a bit later in the series.

  • @SydneyApplebaum
    @SydneyApplebaum 3 місяці тому

    I like this music

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

    Thanks!
    :0)

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

    Great video! If I can make an humble request: due to the hi dynamic range of your voice, luckily not brickwall compressed, it happens that the background music level is not so below when you talk more quietly. There are 3 options, basically, if you want to tweak that. 1) Just turn down the bg, lower than the lowest moment of the speak content. 2) Add a small amount of compression to your voice, with a very soft knee to keep it natural. 3) Ducking compression. But I think can be worse than doing nothing, can be very annoying. Thanks for the time you have dedicated reading this. Keep up the good work \,,/_ P.S. If you need/want/appreciate a more detailed "how to", I'm on Odin's Discord and on yours too, AFAIR.

    • @karl_zylinski
      @karl_zylinski  4 місяці тому +1

      Hi, thank you!
      The music was indeed too loud in this one. I forgot to put a compressor on the music, so when it hits some high notes it catches up with my voice. Essentially the problem is both my voice having high range and also the music having too high range.
      The voice already has a compressor and I spent a lot of time tweaking it to both make it audible but not brickwalled. And then I slapped on too loud music 🙈
      In the second video I have added a compressor to the music, so it gets pushed down a lot more. Hope you find it more pleasant. Also some problems with the mic from this first video have been fixed on the second video. The audio is all-around better. Let me know what you think :)
      Thanks again! Have a nice day

  • @PanosGeorgiadis
    @PanosGeorgiadis 4 місяці тому +1

    Thanks for your time and well put :) FYI: the background music is too loud.

    • @karl_zylinski
      @karl_zylinski  4 місяці тому +1

      Thank you. I'll make sure to lower it a bit for the next videos.

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

      I agree. I'd say the volume of background music is like salt: too little is better than too much. :)
      Although, personally I would even dispense with the music altogether. I personally find it a bit distracting (and not to my taste).

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

      I actually had to re-upload the second video due to an editing mistake. So I tweaked the music a bit since I had the chance. I agree that the music got a little bit distracting on this one, I think it's better on the second video.

  • @andrewdunbar828
    @andrewdunbar828 Місяць тому

    8:35 Do you need to set up a directory structure? Is there some kind of 'init' command that creates that? Or do you just do makdir, cd, and created any file with an odin extension?

    • @ritchielrez1680
      @ritchielrez1680 Місяць тому +1

      You just mkdir, cd and create any file with the odin file extension.

    • @karl_zylinski
      @karl_zylinski  Місяць тому

      yeah, like said here, just make the file. Odin compiler will compile all .odin files in a folder together into a single package. So the only thing you need is odin files in a folder.

  • @nite_owl_was_here
    @nite_owl_was_here 3 місяці тому

    do you happen to be Swedish lol? Mvh fellow swedish gamedev
    (also super stoked on both odin and raylib)

    • @karl_zylinski
      @karl_zylinski  3 місяці тому +1

      Hehe, yep. The accent gave me away once again :) Lycka till med Odin och Raylib!

  • @brownietcg20
    @brownietcg20 4 місяці тому +1

    Will there be an Video for dynamic memory management?

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

      Yes, it will be covered. Perhaps in part 4 or 5? We'll see when it feels natural to put it in.

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

      @@karl_zylinski When I learned C it was the hardest part! I am sure this series will help a lot of new programmers.

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

      I will try to make it easier by introducing the Tracking Allocator from the first moment I use dynamic memory. That way all the fear of memory leaks etc will be gone and people will feel more secure ​@@brownietcg20

  • @erutz5190
    @erutz5190 3 місяці тому

    How do you change the text colour for Odin? Mine is all white

    • @karl_zylinski
      @karl_zylinski  3 місяці тому

      I assume you are using Raylib:
      rl.DrawText("some text", position_x, position_y, font_size, color)
      for color you can use rl.GREEN, rl.YELLOW etc or make your own like so: {255, 200, 0, 255}

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

    my only issue with odin was that ols is still a bit buggy, at least on mac. haven't tried on windows or linux. looked pretty good, but stuck with zig for the better tooling currently.

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

      Fair enough

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

      @@karl_zylinski you may also want to bring up that odin is a finished language, the creator just has to write the language specification for it. but odin is pretty much 1.0 already. might entice more people to adopt the language and extend the ecosystem out even more than what it is now

  • @willianschneider1778
    @willianschneider1778 2 місяці тому +1

    Thanks for this! Just a thing: music in tutorials is really annoying and distracting. It should be only your voice :(

    • @karl_zylinski
      @karl_zylinski  2 місяці тому +1

      Thank you. Some people have already commented about the music. I might make a remake of the series some day that is updated + has no music. We'll see!