C++ Game Programmer Tries ZIG for the first time.

  Рет қаралды 51,790

Low Level Game Dev

Low Level Game Dev

Жыл бұрын

Zig is a programming language meant to replace C. It is probably also a good language for making games. I usually write games in C++ but let's also try Zig. Is Zig a good programming language after all?
#zig #programming #gameprogramming #peogramminglanguages
Discord server:
/ discord
Check out my steam Game:
store.steampowered.com/app/23...
If you want to make games in C++ check out this video:
• If you want to learn h...
Source code:
github.com/meemknight/zigbird
Music: Evan King - Spicy Boom
/ contextsensitive
contextsensitive.bandcamp.com/

Пікірлер: 151
@williamclark4143
@williamclark4143 Жыл бұрын
that intro is pure gold! "Where is my static reflection!?" 😂
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
thanks 😂😂
@HeartOfLightning
@HeartOfLightning Жыл бұрын
"i used my brain to come up with a project idea..." 😂 And thanks for sharing your experiences. I don't generally use C/C++ (nor Zig) but I've definitely learned and been entertained from your channel/discord. Have a good day 🕹️
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
Thanks for your feedback, glad to have you here 💪
@ForeverZer0
@ForeverZer0 10 ай бұрын
Zig has been slowly growing on me. My biggest gripe from a learning perspective is the LSP they ship is a bit lackluster, and seems a bit slower than most.
@lufenmartofilia5804
@lufenmartofilia5804 9 ай бұрын
Same here, and also package management system
@ABHISHEKSINGH-nv1se
@ABHISHEKSINGH-nv1se 7 ай бұрын
I am also learning zig and since zig is young so the tools around it is also quite young. I think the environment around it will grow and improve once it hits the stable threshold.
@bjorn2625
@bjorn2625 Ай бұрын
Same, I've come to adore the language. My biggest gripe, however, is that there is no notational difference between variables and pointers to variables (pointers to structs still use . for member access, as opposed to ->). This makes it very hard to reason about "ownership" when I'm returned something - in C/C++ I know I'm pointing to something when I have to use -> and thus I have to consider who frees this memory.
@bjorn2625
@bjorn2625 Ай бұрын
@@lufenmartofilia5804 With 0.12.0 there is a well functioning package manager, for anybody else reading these comments.
@mel0ndev
@mel0ndev 9 ай бұрын
i love zig. once I got up and running in it, it just feels bad to use anything else. Using to build a game rn, and I'm having a great time
@lowlevelgamedev9330
@lowlevelgamedev9330 9 ай бұрын
😂 very nice, I will also build a very big game in the future using zig
@kernelpanic9560
@kernelpanic9560 2 ай бұрын
What are you using (Languages/Tools/Frameworks)to build your game on Steam?
@sebula8001
@sebula8001 Жыл бұрын
Thanks for making me laugh out loud 😂
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
you're wellcome
@leffivanov3127
@leffivanov3127 Жыл бұрын
I don't really like the syntax and passing allocators around, so Nim or D (in betterC mode) feels more pleasant to code in for me.
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
I don't like the sintax that much either but features like passing allocators for all the things are exactly the things that are needed in game developement so this is why I might switch to it
@homelessrobot
@homelessrobot 11 ай бұрын
the syntax and many other features of the language are often like those benches they have with too many arm rests on them so that hobos can't lie down on them to stay off the cold pavement. Sure they are awkward sometimes even if you are sitting in them correctly, but on the plus side, there are no stinking hobos loitering around. Who are the hobos? That's a little too philosophical of a question for the point I am trying to make here.Superficial pleasantness is not generally something zig is trying to do for your. But it is doing things for you. And if you let it, and you actually like the more substantial things its trying to do for you, its kind of pleasant eventually.
@_slier
@_slier 11 ай бұрын
@@lowlevelgamedev9330 well Odin your best bet then.. you can switch the allocator at will incase you need it.. it always pass explicitly to the current context..
@TremereTT
@TremereTT 5 ай бұрын
@@_slierAnd Odin is purposefully written as low level gamedevelopment language.
@christofferlerno2633
@christofferlerno2633 Жыл бұрын
Do make a comparison with Odin and C3 as well.
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
I'll keep the idea in mind thanks
@christofferlerno2633
@christofferlerno2633 Жыл бұрын
@@lowlevelgamedev9330 That would be awesome.
@vitalbuggy6907
@vitalbuggy6907 11 ай бұрын
This is the purest form of art
@lowlevelgamedev9330
@lowlevelgamedev9330 11 ай бұрын
yes 💪🤣
@ps4star286
@ps4star286 Жыл бұрын
Try Odin next. It is way way simpler than Zig design-wise but still gives you a lot of the features you want. I do all of my gamedev in Odin now after using C before.
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
wow it seems like many people here like odin ok if I have time I'll give it a try 💪
@stefanstefanov00
@stefanstefanov00 Жыл бұрын
How do you debug Odin programs in Linux? AFAIK Odin has been hashing out their dependencies on glibc and such for their own implementations and causing issues for external tools to debug Odin projects as a result of that. Or at least that's what a I read in a post of an engineer working on Embergen (written in Odin).
@longiusaescius2537
@longiusaescius2537 7 ай бұрын
Is odin faster?
@zulupox
@zulupox 7 ай бұрын
@@longiusaescius2537 no, but but the difference is tiny. The syntax is super clean though
@Dewd98
@Dewd98 2 ай бұрын
​@@stefanstefanov00Odin can be debugged with any tool you'd use to debug C. gdb, lldb, visual studio, RAD Debugger, RemedyBG, etc
@naranyala_dev
@naranyala_dev Жыл бұрын
tutorial please
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
hm I might make one if many people ask but it is just an idea right now.
@dionnix
@dionnix 10 ай бұрын
As a Python and Bash programmer, I don't understand a single thing in Zig 😂
@lowlevelgamedev9330
@lowlevelgamedev9330 10 ай бұрын
😂
@rxn7
@rxn7 10 ай бұрын
neither python nor bash is a programming language, so you're not a programmer but a scripter
@dionnix
@dionnix 9 ай бұрын
@@rxn7 I do rust now.
@rxn7
@rxn7 9 ай бұрын
@@dionnix based
@stretch8390
@stretch8390 4 ай бұрын
@@rxn7I can't tell if I'm about to be whooshed, but that is a rubbish take.
@LOC-Ness
@LOC-Ness 7 ай бұрын
a lot of actual zig hype... sounds like there's finally a real winner in the c successor race?
@taylankammer
@taylankammer 6 ай бұрын
amogus
@lowlevelgamedev9330
@lowlevelgamedev9330 6 ай бұрын
mogus
@They0ungTravler
@They0ungTravler 9 ай бұрын
Check out Odin next!
@lowlevelgamedev9330
@lowlevelgamedev9330 9 ай бұрын
many people told me about odin, it has to be a great language
@They0ungTravler
@They0ungTravler 9 ай бұрын
@@lowlevelgamedev9330 it’s great for game development. It helped me grasp how memory management works better than C and C++. It’s extremely similar to C. It’s like a Pascal-C baby. It isn’t designed to be a language with a killer feature(s), but a language of simplicity
@KelvinatorIsTaken
@KelvinatorIsTaken Жыл бұрын
Idk zig looks kinda sus, so it looks like we have a imposter among us 👀
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
yeah zig do be kinda sus sometimes 💀
@taskinrits
@taskinrits 11 ай бұрын
nice intro 😂
@lowlevelgamedev9330
@lowlevelgamedev9330 11 ай бұрын
thx
@tourdesource
@tourdesource Жыл бұрын
They did say it was nasty.
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
it is ok rn
@AK-vx4dy
@AK-vx4dy 11 ай бұрын
What excatly is wrong about syntax ? That is not like C/C++ ?
@lowlevelgamedev9330
@lowlevelgamedev9330 11 ай бұрын
Yeah part of it is that I am not used to it but also that is kinda wordy (I understand that everything is explicit but I don't like typing cast all day)
@AK-vx4dy
@AK-vx4dy 11 ай бұрын
@@lowlevelgamedev9330 i see. Maybe it needs new approach? Maybe by trying to translate what you know form c/c++ you accidentally bring castings? Maybe it can be expressed differently?
@ForeverZer0
@ForeverZer0 10 ай бұрын
I am not without a few minor complaints about some of the syntax, but compared to C++ or Rust, it is fantastic. Naming conventions are a bit odd IMHO; it does make sense and have some "rules" about it, just doesn't fit my personal taste. I write it using the conventions, I just wish they were different.
@AK-vx4dy
@AK-vx4dy 10 ай бұрын
@@ForeverZer0 C++ "syntax"...no comments :) What complaints you have to Rust? IMHO one should compare Zig to C and Rust to C++ for mostly fair comparision.
@ForeverZer0
@ForeverZer0 10 ай бұрын
@@AK-vx4dy I completely agree those are more comparable in regard to their practical application, I was just comparing the more general "old vs new" of systems-level languages. Rust as absolutely awful syntax, and this comes from someone who thinks it is a great language, just not swept up in the "rewrite everything in Rust" fandom. Things like unclosed single-quotes having lexical significance, every line requiring 8 sets of brackets and chained function calls just to retrieve a wrapped value, etc, etc. are not a good recipe for an aesthetically pleasing syntax IMHO.
@canalbomon
@canalbomon Ай бұрын
premake compile to make
@kiryls1207
@kiryls1207 11 ай бұрын
zig is love zig is life
@lowlevelgamedev9330
@lowlevelgamedev9330 11 ай бұрын
😂
@johnlimusicofficial220
@johnlimusicofficial220 6 ай бұрын
Zig Ha... oh wait
@that404nerd
@that404nerd Жыл бұрын
gus
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
mugus
@TheSilverRat1
@TheSilverRat1 Жыл бұрын
if you like zig may be you should try jai. I heard that is nice language
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
yes it will probably the best language for game developement but it is not out yet :((
@HobokerDev
@HobokerDev Жыл бұрын
Not like you can just try it
@SimGunther
@SimGunther Жыл бұрын
​@@lowlevelgamedev9330 Just ask that Jai guy
@solmyr42
@solmyr42 Жыл бұрын
Funny
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
thanks! ඞ
@eduardabramovich1216
@eduardabramovich1216 11 ай бұрын
please try Odin
@lowlevelgamedev9330
@lowlevelgamedev9330 11 ай бұрын
seems like many people want me to. I might try it
@eduardabramovich1216
@eduardabramovich1216 11 ай бұрын
@@lowlevelgamedev9330 you can find a nice project here: kzfaq.info/sun/PLqN23W-K4Tn2LdgSCJOCFFiPO26mvsXm3
@saultube44
@saultube44 9 ай бұрын
*_AMOGUS_*
@lowlevelgamedev9330
@lowlevelgamedev9330 9 ай бұрын
mogus
@kirillgimranov4943
@kirillgimranov4943 Ай бұрын
show that bot rust
@lowlevelgamedev9330
@lowlevelgamedev9330 Ай бұрын
no lol
@RomixalView
@RomixalView Жыл бұрын
Amogus
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
amogus
@Verssales
@Verssales 4 ай бұрын
@lowlevelgamedev9330
@lowlevelgamedev9330 4 ай бұрын
sus
@iogilarb
@iogilarb 4 ай бұрын
iota = i out ah
@lowlevelgamedev9330
@lowlevelgamedev9330 4 ай бұрын
😭💀 still don't get it but it's ok
@zfl1981
@zfl1981 17 сағат бұрын
So Zig (potentially) has the speed, but doesn't game development just absolutely 'need' that sweet, awful OOP?
@lowlevelgamedev9330
@lowlevelgamedev9330 10 сағат бұрын
no not at all, gamedev industry is moving away from oop 💪
@johanngambolputty5351
@johanngambolputty5351 Жыл бұрын
Bruh, surely you just `pacman -Syyu zig` or `apt get install zig` like with rustup...
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
😂😂
@kodingamedev
@kodingamedev 11 ай бұрын
you can but it's a third party app that does that (zvm)
@Pandanubex
@Pandanubex 9 ай бұрын
amongasss
@lowlevelgamedev9330
@lowlevelgamedev9330 9 ай бұрын
amogus
@MrGoMario
@MrGoMario 29 күн бұрын
Nice but... Talk a bit slower... What accent is that anyway? 😆
@lowlevelgamedev9330
@lowlevelgamedev9330 28 күн бұрын
I'm from Romania, and yes I'm trying to talk slower it's hard for me 😭😭 but I'll get there
@daltonyon
@daltonyon 4 ай бұрын
amOGUs
@lowlevelgamedev9330
@lowlevelgamedev9330 4 ай бұрын
yes very good
@daler-qg7sw
@daler-qg7sw 10 ай бұрын
First readable syntax!!! ZIG := [~]SHIT!_$SYNTAX 😂😂😂
@lowlevelgamedev9330
@lowlevelgamedev9330 10 ай бұрын
yes 😂😂 at least it has very good features
@ozanyasindogan
@ozanyasindogan 9 ай бұрын
Zig is giving benchmark results much faster than even Rust
@lowlevelgamedev9330
@lowlevelgamedev9330 9 ай бұрын
I didn't know that nice
@ozanyasindogan
@ozanyasindogan 9 ай бұрын
​@@lowlevelgamedev9330 kzfaq.info/get/bejne/prmmhrtz1NjbZHU.html Search for: Top 5 Fastest Programming Languages: Rust, C++, Swift, Java, and 90 more compared!
@owdoogames
@owdoogames 9 ай бұрын
@@lowlevelgamedev9330 ​ Yep, it came first in Dave's Garage 'Top 5 Fastest Programming Languages' kzfaq.info/get/bejne/prmmhrtz1NjbZHU.html
@_slier
@_slier 11 ай бұрын
i tried zig long time ago.. well i can say it have a lot of potential, but god damn, it syntax is god damn ugly.. second place in term of ugliness after rust.. geez, just take a look how many cast syntax it have.. always passing empty anonymous struct when u print something, weird loop syntax, explicit allocator and slew of others.. just yuck.. Odin the best to be honest.. hands down .. and C3 too, but yeah, C3 need a lot of traction
@lowlevelgamedev9330
@lowlevelgamedev9330 11 ай бұрын
yeah I don't like the sintax either but in terms of features it is probably the best so :/
@oglothenerd
@oglothenerd 7 ай бұрын
I use Rust. Rust is truly amazing!
@jaedson-barbosa
@jaedson-barbosa 8 ай бұрын
My problem with Zig is that instead of focusing on really important features, they are now trying to remove LLVM from the project, which is something absolutely no one asked for.
@longiusaescius2537
@longiusaescius2537 7 ай бұрын
Why?
@lowlevelgamedev9330
@lowlevelgamedev9330 6 ай бұрын
actually as far as I know that is something for the future so it won't happen very soon but idk
@pyyrr
@pyyrr 5 ай бұрын
maybe late, but the reason llvm is going (its not going btw), there will be a version that uses llvm, and one that doesnt. the idea behind having a version that doesnt use llvm is that it builds faster, and smaller. easier for debug builds for devs trying to improve the language
@stretch8390
@stretch8390 4 ай бұрын
I believe it was also the only way they believe they can make incremental compilation viable ( I might have misunderstood that though)@@pyyrr
@Leo0718
@Leo0718 Жыл бұрын
Oh my god. Please use a better mic stand. The bass rumble with the typing sound is unbearable.
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
Thanks for pointing it out. I edited the audio so hopefully this won't be a problem in future videos
@Leo0718
@Leo0718 Жыл бұрын
​​@@lowlevelgamedev9330I didn't meant to be rude. Is just that audio is 80% of the experience in a programming video and plenty of programmer KZfaqrs make the same blunder. Is such an up in quality when it doesnt sound like an earthquake when they type.
@sumofat4994
@sumofat4994 Жыл бұрын
Odin is better
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
haven't tried it yet
@sumofat4994
@sumofat4994 Жыл бұрын
@@lowlevelgamedev9330 My personal opinion it captures the spirit of C without all of the fuss. Just the compiler and you and simple rules that let you go to town. Like you mentioned everything I was doing in C was kind of built in to Odin so I like it. The Pascal style of syntax grows on you fast as well.
@danieleccleston7928
@danieleccleston7928 Жыл бұрын
@@sumofat4994 I feel the same way
@ohwow2074
@ohwow2074 Жыл бұрын
Too many new languages. C++ is trash but it's high quality trash.
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
😂😂
@devon9374
@devon9374 Жыл бұрын
Building a newer better language is easier said than done for sure. The fact that they were able to add features to C++ and keep backwards compatibility given the rapid growth and change of technology over 40 years is astonishing. Rust is not even 10 years old and it’s self imploding sadly.
@ohwow2074
@ohwow2074 Жыл бұрын
@@devon9374 how is it self imploding? And why?
@devon9374
@devon9374 Жыл бұрын
@@ohwow2074 Basically there was some drama within the committee and part of the foundation left and forked Rust into CrabLang. I was kinda of joking about the implosion, however, only time will tell.
@ohwow2074
@ohwow2074 Жыл бұрын
@@devon9374 oh I heard about that. The language itself is not bad though. If it keeps evolving we'll see how much flexibility it has.
@ycemilk
@ycemilk 10 ай бұрын
You can use V instead of Zig. Zigs syntax bad as af
@lowlevelgamedev9330
@lowlevelgamedev9330 10 ай бұрын
haven't heared of V ill check it out 💪
@rocknowradio
@rocknowradio Ай бұрын
zig is ... not compelling. Looks like a JS/Swift bastard version of a C++-Go-not-yet-rust.
@lowlevelgamedev9330
@lowlevelgamedev9330 Ай бұрын
hmm that's kinda a wierd comparison, but it has very good features and simplicity (that rust sure doesn't have :))
@rocknowradio
@rocknowradio Ай бұрын
@@lowlevelgamedev9330 For sure rust does not. I'm still confused about zig. On its own might be very good, but I don't see it interfaces easily with others.
@raptorate2872
@raptorate2872 Ай бұрын
@@rocknowradio it does, it has full interoperability with C/C++, has C ABI and can build all of them using the zig cc compiler and the build system. It is a drop in replacement to C, while still having access to any C libraries you were using before. For example for games, it can work with anything that odin has access to (raylib, sdl, vulkan,etc), and has its own upcoming framework for games but will not be finalized till the 1.0 release which is either 2025 or 2026 according to the creator. (subject to change). The language is kept concise and compact on purpose in order to avoid bloat like c++ and now sadly even rust falling for the same trap. Has better benchmarks than Go for web and Rust for computation. The zig build system and compiler can also build for nearly all platforms without the need for external build tools or dependencies as it's all zig. The route they going for managing packages is also very straightforward in the same vein as the newer GO style. The ONLY downside it suffers is from longer build times due to LLVM but that's something they want to get away from before 1.0 release. Go build times are great but zigs comptime feature is immensely powerful once you understand how to use it. Zig is primarily aimed at being successor to C while removing the limitations of C.
@patto2k358
@patto2k358 Жыл бұрын
These edits are annoying. Accent is too, but that’s not as bad and is easy to forgive.
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
Trying to work at it. Thanks for the feedback 💪
@rakaboy1619
@rakaboy1619 11 ай бұрын
@@lowlevelgamedev9330 i think accent is fine tbh you cant really get rid of that easily
@InfiniteCoder01
@InfiniteCoder01 Жыл бұрын
:cyanAmogus:)
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
🤣 amogus
@HolocaustShmolocaust
@HolocaustShmolocaust 2 ай бұрын
AMUNGUS!
@lowlevelgamedev9330
@lowlevelgamedev9330 2 ай бұрын
amogus let's goo
@AE4i1
@AE4i1 Жыл бұрын
amogus
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
among zig 😳
@kolosso305
@kolosso305 6 ай бұрын
@lowlevelgamedev9330
@lowlevelgamedev9330 6 ай бұрын
sus
@sillysagiri
@sillysagiri 11 ай бұрын
amogus
@lowlevelgamedev9330
@lowlevelgamedev9330 11 ай бұрын
good good 👍
@malikpaariszaman7899
@malikpaariszaman7899 Жыл бұрын
amogus
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
mogus
@zeke4897
@zeke4897 Жыл бұрын
amogus
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
zigmogus
@monadstack
@monadstack Жыл бұрын
amogus
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
amogus ඞ
@gamersvalley9976
@gamersvalley9976 Жыл бұрын
amogus
@lowlevelgamedev9330
@lowlevelgamedev9330 Жыл бұрын
amongus
@gamersvalley9976
@gamersvalley9976 Жыл бұрын
amoamomogusgus
How to make Minecraft in C++ or any other language
9:28
Low Level Game Dev
Рет қаралды 38 М.
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 10 МЛН
Получилось у Вики?😂 #хабибка
00:14
ХАБИБ
Рет қаралды 7 МЛН
Zig for Impatient Devs
9:48
Isaac Harris-Holt
Рет қаралды 71 М.
How to deal with memory allocation for C++ GameDev
8:03
Low Level Game Dev
Рет қаралды 13 М.
I Remade Minecraft But It is Optimized!
9:39
Low Level Game Dev
Рет қаралды 94 М.
Programming an entire game from scratch | Prime Reacts
15:31
ThePrimeTime
Рет қаралды 204 М.
zig will change programming forever
9:34
Low Level Learning
Рет қаралды 236 М.
RayLib 5 Released - The Easiest C/C++ Game Library Just Got Even Better
10:42
My Zig Experience | Prime Reacts
38:13
ThePrimeTime
Рет қаралды 145 М.
When Zig Outshines Rust | Prime Reacts
23:31
ThePrimeTime
Рет қаралды 135 М.
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 10 МЛН