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) - Ігри
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
Thank you for this re-up!! 👍
So glad I found Odin, it's such a comfortable language. Excellent tutorial : )
Thank you! Happy you found Odin!
Perfect tutorial. Happy to begin my Odin Raylib journey.
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.
Thank you ✨
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.
Tack så mycket! Happy you enjoy the game and the source. Sorry for the 10k lines long game.odin file, hahaha
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
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.
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!
This makes me happy! Thank you!
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!
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 :)
Great content! Thanks for your work, I find your videos very insightful :)
Thanks for watching! It makes me happy that people enjoy the videos
Karl, thanks for teaching us gamedev using Odin lang!
Thanks for watching! 😸
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
This is awesome!
Thank you ✨
Nice! Good stuff.
Thanks 😺
Very, very nice tutorial
Many many thanks ✨
this is sick
This is gold!
Thank you! ✨
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!
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!
Thanks!!!!
Amasing dude, was waiting for a series like this. love the format.
Thanks a lot!
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.
I'll probably cover collision a bit later in the series.
I like this music
Thank you 😻✨
Thanks!
:0)
You're welcome! Happy coding
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.
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
Thanks for your time and well put :) FYI: the background music is too loud.
Thank you. I'll make sure to lower it a bit for the next videos.
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).
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.
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?
You just mkdir, cd and create any file with the odin file extension.
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.
do you happen to be Swedish lol? Mvh fellow swedish gamedev
(also super stoked on both odin and raylib)
Hehe, yep. The accent gave me away once again :) Lycka till med Odin och Raylib!
Will there be an Video for dynamic memory management?
Yes, it will be covered. Perhaps in part 4 or 5? We'll see when it feels natural to put it in.
@@karl_zylinski When I learned C it was the hardest part! I am sure this series will help a lot of new programmers.
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
How do you change the text colour for Odin? Mine is all white
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}
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.
Fair enough
@@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
Thanks for this! Just a thing: music in tutorials is really annoying and distracting. It should be only your voice :(
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!