- 134
- 167 114
Karl Zylinski
Sweden
Приєднався 4 жов 2019
I teach Odin and how to create video games without an engine. Independent game developer.
Exploring Odin without leaving your editor
Odin Sublime Syntax Highlight: github.com/odin-lang/sublime-odin (can also be installed using package control)
OLS + Sublime Setup video: ua-cam.com/video/RF2MgVqfBV8/v-deo.html
My book "Understand the Odin Programming Language": odinbook.com
A work around for VS Code: Copy the whole core folder to your project (yes, make a copy!) and press Ctrl + T. You can then find rune_at_pos by typing runepos. If you add the space then it doesn't work. This is all of course a huge hack, and one of several reasons why I don't use VS Code.
OLS + Sublime Setup video: ua-cam.com/video/RF2MgVqfBV8/v-deo.html
My book "Understand the Odin Programming Language": odinbook.com
A work around for VS Code: Copy the whole core folder to your project (yes, make a copy!) and press Ctrl + T. You can then find rune_at_pos by typing runepos. If you add the space then it doesn't work. This is all of course a huge hack, and one of several reasons why I don't use VS Code.
Переглядів: 1 271
Відео
I wrote a book about the Odin Programming Language
Переглядів 1,3 тис.14 годин тому
More about the book: odinbook.com/ Read a free sample: odinbook.com/sample.html Buy on Itch (HTML eBook): zylinski.itch.io/odinbook Buy on Amazon (eBook): www.amazon.com/dp/B0DQ1V7LW4 Understanding the Odin Programming Language is a book that teaches both basic and advanced concepts. You'll learn about variables, constants, procedures, manual memory management, parametric polymorphism, data-ori...
The Odin Holiday Gamejam 2024 ✨ Make a game!
Переглядів 1,2 тис.День тому
Sign up for the jam: itch.io/jam/odin-holiday-jam If you want to learn Odin ahead of the jam (not required!): 1. Set up Odin, instructions here: odin-lang.org/docs/install/ or follow this setup playlist: ua-cam.com/play/PLxE7SoPYTef1yStERdourKEtEH2Jc0opf.html 2. Follow this video tutorial: ua-cam.com/video/lfiQNCNUifI/v-deo.html 3. For more in-depth knowledge, you can buy my book "Understanding...
What are pointers? (Odin)
Переглядів 1,5 тис.Місяць тому
What are pointers, along with some examples of how to use them. I've written a book about Odin: odinbook.com/ ✨ Support me patreon.com/karl_zylinski
Common mistakes when slicing strings
Переглядів 1,2 тис.2 місяці тому
How slicing of UTF-8 strings can go wrong when you assume that the slicing operator works on a "per character basis". Support me on Patreon www.patreon.com/karl_zylinski Odin book is now available at: odinbook.com/ Discuss Odin and gamedev on my Discord server: discord.gg/4FsHgtBmFK I do Odin tutoring and code consultation, more info here: zylinski.se/odin-tutoring/ The Odin Programming Langua...
How to run C code from Odin
Переглядів 1,6 тис.3 місяці тому
How to setup Odin bindings for a C library, making it possible to run that C code from your Odin code. This video includes how the C library itself looks and is compiled. This uses what is known as the FFI (Foreign Function Interface). The code in the video: github.com/karl-zylinski/odin-bindings-to-c I've written a book about Odin: odinbook.com/ ✨ Support me on Patreon www.patreon.com/karl_zyl...
I'm writing an Odin book!
Переглядів 1,9 тис.3 місяці тому
UPDATE: It's now available at odinbook.com/ In the Odin book I'm writing I'll give big-picture explanations of things things that take a while to figure out and things that may not be apparent from the online documentation. Odin tutoring service (NO LONGER AVAILABLE): zylinski.se/odin-tutoring/ Ask questions about the book on my Discord server: discord.gg/4FsHgtBmFK Support me on Patreon: www.p...
Odin's constants have their own little type system
Переглядів 1,3 тис.3 місяці тому
Today I answer two questions: - Why can you assign 7.42 to both f32 and f64 variables? - What are the defaults for type inference? Support me on Patreon www.patreon.com/karl_zylinski I do Odin tutoring and code consultation, more info here: zylinski.se/odin-tutoring/ The Odin Programming Language: odin-lang.org/
Efficient 2D drawing using generated atlas texture
Переглядів 1,5 тис.3 місяці тому
Efficient 2D drawing using generated atlas texture
CAT & ONION Soundtrack with (text) commentary
Переглядів 3914 місяці тому
CAT & ONION Soundtrack with (text) commentary
Why building Odin programs is so simple
Переглядів 8 тис.4 місяці тому
Why building Odin programs is so simple
Generic Odin procedures: Parametric polymorphism
Переглядів 1,4 тис.4 місяці тому
Generic Odin procedures: Parametric polymorphism
Make games using Odin + Raylib #3: An animated player ✨ RE-UPLOAD
Переглядів 1,3 тис.4 місяці тому
Make games using Odin Raylib #3: An animated player ✨ RE-UPLOAD
Make games using Odin + Raylib #2: Move, jump & fall ✨ RE-UPLOAD
Переглядів 1,5 тис.4 місяці тому
Make games using Odin Raylib #2: Move, jump & fall ✨ RE-UPLOAD
Make games using Odin + Raylib #1: Setup and first code ✨ RE-UPLOAD
Переглядів 3,6 тис.4 місяці тому
Make games using Odin Raylib #1: Setup and first code ✨ RE-UPLOAD
Odin + Raylib: Breakout game from start to finish
Переглядів 4,9 тис.5 місяців тому
Odin Raylib: Breakout game from start to finish
Odin + Raylib: Snake game from start to finish
Переглядів 4,9 тис.6 місяців тому
Odin Raylib: Snake game from start to finish
Sublime Text + Odin + Code completion
Переглядів 1,8 тис.6 місяців тому
Sublime Text Odin Code completion
Setup Odinlang compiler from source on Windows
Переглядів 1,5 тис.6 місяців тому
Setup Odinlang compiler from source on Windows
Make games using Odin + Raylib #6: Level editing basics + memory management
Переглядів 2,4 тис.7 місяців тому
Make games using Odin Raylib #6: Level editing basics memory management
Make games using Odin + Raylib #5: Platforming mechanics + cleanup
Переглядів 2,1 тис.7 місяців тому
Make games using Odin Raylib #5: Platforming mechanics cleanup
indiedevs talk shop #3: Dennis Gustafsson (Teardown, Smash Hit)
Переглядів 1,8 тис.7 місяців тому
indiedevs talk shop #3: Dennis Gustafsson (Teardown, Smash Hit)
Next game, Patreon and source code access
Переглядів 1,1 тис.7 місяців тому
Next game, Patreon and source code access
Using Odinlang's Tracking Allocator
Переглядів 3,5 тис.7 місяців тому
Using Odinlang's Tracking Allocator
indiedevs talk shop #2: Johan Peitz (Orb of Aeternum, Icy Tower, Hellgineers, Cosmic Collapse)
Переглядів 1,2 тис.8 місяців тому
indiedevs talk shop #2: Johan Peitz (Orb of Aeternum, Icy Tower, Hellgineers, Cosmic Collapse)
indiedevs talk shop #1: Martin 'grapefrukt' Jonasson (Holedown, Subpar Pool, "Juice it or lose it")
Переглядів 8548 місяців тому
indiedevs talk shop #1: Martin 'grapefrukt' Jonasson (Holedown, Subpar Pool, "Juice it or lose it")
Make games using Odin + Raylib #4: Adding a second animation and tidying some stuff up
Переглядів 1,7 тис.8 місяців тому
Make games using Odin Raylib #4: Adding a second animation and tidying some stuff up
linux: ""cmd": ["/path/to/odin" , "run", "$folder"] works, $folder will choose to run odin compiler on the first folder in the left panel, $project , $file_path are also options.
I set my window size 1280x720 and screen size 320. But I think in my case this thing with camera and zoom (scaling logic) does not work correctly because when I move the paddle, it can reach only to the middle of the screen when I move it right.. any ideas why this can happen?
You have great experience in building game engines, it will great if you create more videos creating engines. Working with some real usable stuff. It will be great learning experience for viewers
i loved the way you pronounced str lol
I made a pascal language server and there is a "workspace symbols" command in the spec but it's implemented really poorly both in the LSP and in Sublime Text. You have to bundle all symbols in the project then encode them to JSON and send that 10's of megabytes per text every time it's invoked. The built-in search in ST functions better but it cant' really know about "global" symbols and pulls in lots of other junk. Even so its' good enough and I use that except in VSCode where it's implemented better.
in VS Code there's a command "look for symbol in workplace" and it would be the same as in Sublime. You can add any folder to your workplace. No need for copying files Edit: this command seems to only look on the first folder of the workplace. if anyone knows what's going on, let me know
Yeah, this is what I found too when trying to do this in VS Code... If I have my project as first folder, and then core is second folder, then "Find symbol in workspace..." will not look into the core folder, even though core is part of workspace.
Unfortunately "Go to Symbol in Workspace" (shortcut Ctrl + T) does not seem to work in the added workplace folders. It only looks at the root folder of the workspace. The solution for me is to use Daniel's Gavin Odin Language extension and use "Go to Definition" (shortcut F12) to look the definition in Odin's source file and do manually search from there. Not intuitive as Sublime Text symbol search functionality. But by copying base or core folders to the project does seem to work.
I also found a work around to avoid copying folders. Create a Workspace inside Odin folder (it just adds a <name>.code-workspace file) and open it in a separate VS Code instance. So when you need to search for symbols in Odin codebase, just use this specific instance. Not ideal but it's a solution for VS Code users.
I've just set up similar thing with neovim + telescope after watching this video. Thanks for making this video, this is gonna be super useful!! Also I like that you used '猫' as an example lol
Very happy it gave you some ideas! 😺
Hey Karl, the developer of the IntelliJ plugin here: fuzzy search works globally over all symbols defined in the project, including the Odin SDK. It even works without first specifying the package first. Let me know if you want to give a try sometime.
A work around for VS Code: Copy the whole core folder to your project (yes, make a copy!) and press Ctrl + T. You can then find rune_at_pos by typing #runepos. If you add the space then it doesn't work. This is all of course a huge hack, and one of several reasons why I don't use VS Code.
The tutorial is great, thanks!
I have updated the source on the itch page. I did some additional documentation comment writing after this stream ended: zylinski.itch.io/cat-and-onion/devlog/853950/source-code-improvements Also, the game is on sale right now, both on Steam and Itch. Just $0.98!
How do you declare an array of functions?
arr: [dynamic]proc(int, f32) -> bool For an array of procedures that take an int, an f32 and then return bool Or replace dynamic with a number to get a fixed array
This went over my head..Is there a video that teaches the basics of contexts and allocators?
bought it. amazing book, thank you very much for all the effort you put in. I'm just now realizing that I don't have to wait for JAI when Odin has literally everything I ever wanted out of a programming language.
Thank you 💖
can you compare odin to rust? what are its strengths over rust?
i just bought the book and from what i've read so far it complements the existing material on odin very well, definitely worth it. i also really like that there's an HTML version so it fits in seamlessly with the other references i have open while working
Thank you!
it's a great book!
Thank you Lucy!
Perfect timing, i've been messing around with Odin quite a bit over the last few months. It looks to be an excellent introduction to exploring the more in depth parts of the language
I wish I knew how to read
Bought and already well into it - great book :) !
Thank you! 💖
Will you localize this book into different languages, such as Russian, Ukrainian, etc.?
Perhaps if I do a second edition that I also print. No promises!
@karl_zylinski Ok
@@karl_zylinski I would volunteer to translate it into Ukrainian, if you plan to localize it to different languages.
@@Lavashyk thank you, I'll keep it mind ❤️
I bought the book this morning, it has already been immensely helpful for understanding the language and it's features. Thank you for taking the time, I hope you keep updating the book with even more knowledge in the future.
That's wonderful to hear, thank you!
Amazing! thank you! 👍
And another thing: I am hosting an Odin Gamejam between December 27 and 29, 2024! Make a game using Odin within 48 hours. Sign up here: itch.io/jam/odin-holiday-jam
Great job! I wish I had the patience to write books. I'm sticking with Rust for now, but I will definitely check it out.
34:01 this technique is called sliding window and it's so efficient, big brain ideas karl !!!
Thanks, just bought your book and started reading!
This is a great idea! We need this kind of events to make Odin more popular I will try to participate, but I will be visiting my family during these 2 days and having time to code will not be easy, and maybe even totally impossible. We will see!
Hi Karl. What about 2d arrays in Odin?
You can do [20][20]int to make a fixed 2D array. But I usually recommend to make a 1D array and index it using `idx := y*width + x`
I have been waiting for this ever since you announced it! Can’t wait to get home and get it. Big fan of your content! Congratulations on this awesome accomplishment
Thank you!! 💖
This will be fun just joined and will streame the hole thing
Great idea!
Just joined! We'll see what kind of monstrosity I come up with lol. I'm not very experienced, but this seems fun
Yeah, it's all about having fun!
cool 🎉
is there rule for game art? can i just use basic shapes?
You can use basic shapes, or some art you made yourself. I won't disqualify anyone for using free graphics assets from the internet, but I highly recommend making your own -- it'll make your game look more fun!
Woo woo!! I'm hyped :) This will be my first ever game jam. Excited to do it in Odin and with you Karl. The game dev videos you've put out, specifically the Odin videos, are seriously invaluable. The first ever coding projects I did over 20 years ago were games on various platforms. I'm returning to making little games in large part due to your influence and how fun it is to work in Odin. Super excited for this and to see all the other submissions!
Thank you!! It'll be fun!
this is fantastic!
Just joined! :D Will there be a theme for this?
We'll see about the theme, I haven't decided yet really.
I have decided to have an _optional_ theme. So the theme is for people who need a theme for inspiration. But one does not have to follow the theme.
LESGOOOOOOOOOO, I was looking for this jam
what if someone create a game before that and pretend he/she finished it in 48 hours?
I did put in a rule to make the game within 48 hours. There's nothing stopping someone from not being honest about that, but I can probably tell if a game took way more than 48 hours to make :)
@@karl_zylinski how do we send the game to you ? Is it going to be binary or source code? also if you accept binaries do you have any protection from virus? because from PirateSoftware's experience with game jams, he received many virus.
@@karl_zylinskido we send source code or binary?
Pretty cool!! I guess it's hard to prevent anyone from starting to work on a game before the 27th? I mean it would only mean more good games so I guess it's all good!
I'm just happy if people make cool stuff! But I put a rule that says that people should make it within 48 hours... I just trust that people play nicely. It's more about having fun than being competitive anyways.
Your accent is nice, what is it?
Thank you. It's Swedish 🙃
Hey man keep up the good work. You are a very good teacher. Thank you for everything youve made.
you don't like odin's `defer` keyword?
I don't dislike it. I think it's useful when a procedure can end in several different ways (it uses `return` several times). Because then you can do some clean-up regardless of how it ended. But I don't think one should use everywhere just because it's possible. Using defer does make the code a bit harder to read, because you can no longer read it in a "linear way".
@@karl_zylinski makes sense. I was thinking of the times you called various rl. functions then went to the bottom of the scope to call the corresponding finalizing rl. functions
Looking forward to the memory management section! It's what I feel like I'm the least knowledgeable about in Odin. Since memory is supposed to be manually freed it's what has me the most worried about making a problem :D ie : when is something going to be freed automatically when it goes out of scope vs when do I need to do it myself. Similarly with the deferred call. How to use properly.
Let me know how it went! Your type of background is something that I've tried to cater to in the book. So I'm interested in if I succeeded or not
@@karl_zylinski Just got it and already loving it. Jumped straight to the Enums section because those are always fun. The remarks on the side as a 'oh by the way' are a great way to use space. It doesn't use hyper specific terminology that would require some prior understanding. Already plenty of links to other sections to say where more details about a specific term will be talked about in more depth. The if statement checking the values? Amazing, adding that it will assert if you omit the ok check will likely save quite a bit of debug time for newbies. This sentence is a bit rough though "The f32_val^ = 7 above changes the value which the pointer f32_val points to" Maybe The f32_val^ = 7 updates the value it is pointing at, thus making val = 7. The original phrasing can seem like we are updating f32_val to point to another memory address if the reader isn't thinking of value as a strictly right sided term. Writing about pointers is hard... I commend you for tackling the topic.
Congrats, currently writing mostly Ruby for game dev, bur do want to learn some Odin and C for lower level options. Picked this up to start poking through at some point. Figure it will help me be a better programmer overall with the memory management piece at the least! Edit: Will keep an eye out for the game jam, may try to do that and use this as my companion for that.
Thank you. I agree, it helps in general! Understanding manual memory management makes you better at writing code in languages such as Ruby too, because you understand what Ruby is doing automatically for you, making it possible for you to do more well-informed choices.
Congratulations. I hope is does well for you.
My Odin book is out now: odinbook.com/ ✨
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.