Programming an entire game from scratch | Prime Reacts
HTML-код
- Опубликовано: 18 май 2023
- Recorded live on twitch, GET IN
/ theprimeagen
Original: • Programming an entire ...
SUB TO THIS GUY: / @bigrando420
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact Наука
Flip took the day off. We got flop instead 😂
flopedits, my favorite
i hate all of you
@@flipmediaprod lol
Prime, please send my compliments to your editor, excellent zoom skills. very subtle and understated.
I think it's time for you to get a new editor 😂
Why
@@WaltuhBlackjr 7:08
it be your own people smh
@@WaltuhBlackjr 0:18
@@WaltuhBlackjr 7:10 to 7:40
"When someone says that I have the building blocks to make absolutely anything; it really means, I have currently made something in which when I make something it will still take an incredible amount of time." -ThePrimeagen
That one cut me deep.
Flip gonna be flipped
packing my bags now
@@flipmediaprod
I just had to say it since it was in my head, I do not mean it!
You haven't truly lived until you've built your own audio player. I have. Was it good? No. Was it streamlined? Easy to use? No. But, it was beautiful. And now when I use SDL2_mixer, I don't ask, "what in sam hell is this shit" No. I say, "Thank you based god." And as I call upon Mix_LoadMUS, our lord Gaben looks down from his throne of Steam Decks on high, and he says, "It is well my good and faithful servant." And then I run it through a profiler, and I agree it is well. Amen.
lol i dont think your editor listens to your videos
i had chief keef blasting to loud in the headphones while editing this one.. my bad boys
YET! somebody make an unfiltered LLM model that roasts your shitty code instead of just doing it for you...
A wiser coworker than me found the reason we could get the last three audio samples out of ffmpeg: you have to reach into ffmpeg's internal buffers and wrench away those last away by force, because ffmpeg is a little gremlin that hides them from you. Cry in the evening indeed.
0:55 Lesson learned: unlike what most companies will tell you, this actually is a great place for a free lunch
Man, I love your videos. You both hilarious and inspiring!
5:10 Juicing The Camera is actually a really good GDC talk, definitely worth checking out. Also, you should play with Bevy in Rust some day, it's hella cool
was gonna say that juicing in game dev is quite a known thing haha, but then again it's quite weird to outsiders
ruclips.net/video/tu-Qe66AvtY/видео.html&ab_channel=GDC
"I cried in the evening due to the bugs I could not figure out due to C", that resonates so strongly deep within the self.
Don't have to troubleshoot bugs if it just SEGFAULT's immediately 🧠
"tsoding = GIGACHAD"
Tip: You can use comma or period to go back or forward a frame on RUclips
wow thanks, thought you were trolling but it turns out you just have to pause the video
"A piece of piss" is one of my fav sniper lines from tf2
7:09 I think flip edits your videos using these AI automation shit.
But don't worry I zoomed in with my imagination with mozart in the bg
Sound Drivers... much to explore there! Takes me back to the DOS days of gaming and having to manually configure each and every game to have the correct sound / video card, that they're assigned to the right IRQ channels, setting the correct DMAs, etc. during the setup procedure after installing the game. The fun old days!
Watching the best doing their thing always seems easy. I think this guy is just next level.
I think the reason his game programming seems so much easier than yours is that he has been doing nothing else for the last years :D
He also edited out the hours worth of sitting there and thinking and procrastinating and screwing up 20 times before it finally works
Game development coding 101: show some bits of C/Zig/Odin/JAI code -> Then cut to starter Unity/Game Maker projects with changed sprites
(Except for Jonathan Blow and Randy, they'll have to create their own Kernel, OS, Programming language, game engine, etc)
AngeTheGreat would be in that category.
these are no doubt good programmers but Andreas Kling is the one who actually did create the kernel, the OS, the custom programming language, the damn web browser from scratch which was honestly more impressive than all the other little projects including the js interpreter with a JIT compiler. and basically all that in series of few hundred 1-2h long non-edited videos (he'd no doubt be quick to credit the community as well but let's be real he's the one carrying the whole thing).. he'll let you do the games though
>Hey editor, can you slowly zoom in my camera, put some music and...
>No
>Refuses to elaborate further
>Presses render
>Leaves
emotional damage
this is why they pay me the big bucks
Except they zoomed at the end, so it was deliberate rejection
@@flipmediaprod LOL
Can’t believe the editor didn’t zoom… I was ready for the smooth jazz
Jai is the most joyful programming language I ever used and I tried Zig and Rust before. Nothing comes close. It's just beautifully crafted for game development and you get all the power you need + convenience and lots of built-in goodies.
How does it compare to bevy btw. I'm curious
"The amount of capital letters in DirectX should be a crime"
COBOL: "Hold my beer"
oh man. your audience needs to watch a lot more Randy.
Randy is the best
Yeah, give more views to the dude that went to Bali to spend his supporters money when he promised to make a game and only talked about it when he was low on cash.
honestly i love randy so much. binged all his vids the second I knew about him
@@OcarinaOfVali Ah the guy who was making his own game in Australia.. I been trying to make my own game as well. But I was using the windows console to make a dialog driven game, and then tried to put it into blueprints in unreal engine... I put funny dialog in it.
@@MrLucasEss Don't forget that his official response to those concerns was "lick my balls". That's when I decided to stop watching the prick. He's an annoying child, turns out.
A shame, because it was interesting following his journey, even though it didn't really go nowhere.
12:22 This is the funniest bug caused by integer signage I've ever seen
When I was young and trying to learn to program I remember getting "Tricks of the Windows Game Programming Gurus" and just the function signatures for spawning a basic window turned me off programming for year. I thought I was just too dumb since I thought I had to memorize all the parameters for _everything_. Fortunately I've been in the software industry for a decade now, but I still shudder thinking back on those insane signatures.
"The amount of capital letters in DirectX should be a crime." I love you man, sometimes it feels like you're the only one who understands me.
Edit (had to): 1:05 to 2:22 is gold. The rest... I still love you, but you wasted approx. 15:30-(2:22-1:05) of my life. Editing comments is hard lol
It looks easy in his video because he only mentions the top level things to do.
e.g. make a triagle, make two of them so it's a quad, make it show a texture instead of just single colors.
There is a lot of code behind it that he is not showing.
Also, Jai makes it a lot easier to make games, etc (it was designed for game development) so it's easier to accomplish what you need.
For example, there is a library/module named Window_Creation that you can use to create a window with one line of code on Windows, Linux, and Mac.
There is also a library/module named Input, so you can just get input, without any hassle.
TL;DR: It's complicated to do stuff, but Jai makes it easier to accomplish, and he only shows milestones instead of every line of code.
It looks easy because it is easy.
Jai is a joy to program in.
(yeah he skipped over some steps, but it's still fast)
Skipping over some steps, like actually getting the Jai compiler ;)
We actually also use the "piece of piss mate" phrase in the UK too - although it's going out of fashion.
2:57 btw comma and period lets you seek back and foward frame by frame
The backhand with the baby powder. 😂⭐️
That austin power #2 reference by chat was amazing
Old school DirectX - OpenGL rendering window with Windows API setup 500+ lines of code before modifying any of the pixels other than the default screen color at startup. Learning how to have Windows Procedural Callback, dealing with the Windows HANDLE's... The messaging system... then configuring your Application's main window attributes and settings such as size and position, resizing it, windowed or fullscreen resolution modes. Then having to modify or configure it's HDWC drawing commands for either DirectX or OpenGL to be the primary drawing context. The good old days of having 500+ required boilerplate code up and running for every project before you even render your first graphical triangle. Oh how we are spoiled today... That can be now done in about 4-20 lines of code pending on preferred initial setup and assigned functionalities all through the use of a a simple library.
However, it's not all fun and games... If there are any unforeseen bugs which I'm sure there are in said libraries and APIs that you're using within your projects then your applications have those same bugs. You're also at the mercy of the library / API vendor(s) for when they update or make any changes to it. If and when you migrate to their newer version(s), you have to make sure your entire code base works as expected. Of course any newer versions or releases may provide many or most of those bug fixes but more than likely they've also introduced a bunch of new ones... So there's always a tradeoff!
Roll your own and carefully manage your own internal bugs (good luck). It does take a little bit longer to get your project(s) up and running yet it also provides you with more control and flexibility towards what you want your applications to do. Otherwise you'll have to rely on some outside library or API trusting that they will do in the hopes exactly what they claim or are intended, expected to do, also (good luck). For we all know too well that bugs or badly written, badly structured, poor choice of algorithm, etc... can and will show up anywhere at any time causing invalid results, code - program crashes, or even system wide crashes; all because someone missed an edge case, or improperly accessed an invalid or dangling pointer - reference object, out of bounds indexing, off by one errors, division by zero, error in calculations from narrowing or widening a type... stack and or buffer under or overflows, page or segmentation faults, and much much more... So either way there are always trade offs and bound to be bugs, so again(Good Luck).
I guess it's time to dive into doing some Vulkan programming...
Flip y u no zoom
he zoom
no
@@AzamFahmy yes
Glad to see another Randy enjoyer
i used to mod in his discord server back when he was doing the green screen stuff, it was sad to see him basically abandoning everything but i do wish him the best for his new game, now remade probably 8 times, it's been a while since last update tho
8:41 "...now i got the building blocks to do anything..." yea, if you would've listen the assignment properly, you would've had blocks right away - it clearly said "...IN Scratch" not "...FROM Scratch"😂
12:40 “classic superposition” 😭 lmaooo so tru
Nah bro. Your videos are the best
You got yourself a nice demo of a good debugger on his video, RemedyBG if I'm not mistaken
How is the sound buffer and interface so buggy you have to do that? presumably you are purchasing this right so they must support it?
Screen Tearing go _Brrrrrr_
I love writing Win32 apps. I hate it, but I love it. MS devs *really* love their capital letters
The problem with Randy is he writes something, then scraps it and rewrites it. It's a neverending cycle that he's been doing for years. He's never going to complete the game.
Song during the intro: Scoobadive - Electric.
Ready to write a game in notepad now.
6:33 You know how Technology Connections uses "the magic of buying two of them"? Now, Randy doesn't need that, because he can just copy-paste the stuff he's working with...
...But he does use the magic of editing out three days of suffering.
Editor getting a pay cut lmao
JDH, Sebastian Lague, and Tsoding are good too.
Jai looks interesting, could be an interesting topic for a video
1:32 And this is why I'd rather use libraries like SDL or Macroquad in Rust than deal with stuff like win32.
Audio driver programming will teach you the foundations needed to master languages such C/C++ and or assembly! Especially if you're below the Operating Systems API and system calls, below the what use to be the HAL (Hardware Abstraction Layer) of a system, etc... When you're down to the registers and controllers, and converters going back and forth between digital and analog manipulating individual bytes and bits... that's where the fun begins. Might want to brush up on your trig, on your understanding of FFTs. Then it's a matter of not just playback, but how the audio data is being internally represented. Is it raw? Is it compressed? Is it in a mp3 format, a wav format, or structured as a MIDI sequence? Ah yes, Audio Programming will definitely teach you to use C/C++, Assembly properly!
Rip in peace flip
When are you going to create the full fledged Rust course on Frontend Masters that we all need?
I spat out my coffee when you said the tech lead
Pro youtube tip: You can use comma and period keys to to go back or advance a video frame by frame
The editor is no Simp.
I freaking love randy
2:50 does ThePrimeagen know about YT frame advance keys? (or for that matter that you can press ?-key for list of key shortcuts)
If you just add the samples for the wave audio, the loudness increases. You have to average it out. So for two sources, halve the result... No worder his ears blew off!
Prime, you can go frame by frame on RUclips with the . and , keys :D For the next time you want to pause a video and read something that shows up for a very brief time.
breaking out the baby powder ...
JAI compiler is cross platform, like all proper compiler toolchains
i saw a "+= 1" in the audio section and i feared for my life. Thank god you paused right before
Have you watched: Acerola? Suckerpinch? Code Bullet? AngeTheGreat? TsodingDaily?
And his editor is like.. "yeah I'm not gonna do any of that"
flip didn't zoom, not even once.
the yearly randy tries something and eventually gives up
"Piece of piss?" *distant TF2 laughter*
My brother did a programming exam, there were all these IDEs to choose from, he chose notepad.
4:30 now where did I hear that music before....
... bonk.
the thing with michael reeves is that I am nerdy enough to want to see his code or things he did. Which he doesn't show cuz most of the audience clicks off at that point
Randy Daddy rocks with that shiny baldy!!!!
3:10 we have that saying in the uk too
go back to the days BEFORE debuggers to solve that soul destroying bug in c.
hard times create strong men, strong men create good times, good times create weak men, and weak men create hard times
the amount of capital letters in directx lmaoooo hahahaha
zoom in...nah, im good
Being Australian this was dope.
2:50 use the , and . keys to skip frames when paused
btw if you use calloc in C instead of malloc, it get's 0 initialized
even their headset microphones are upsidedown.
i just realized randy uses the same sublime theme that i do
Piece of piss is a popular phrase in England too
flip googled juicing the camera and we lost flip
See, everybody knows that, if you want to talk to Flip, ya gotta put on the green screen.
Im really interrested in the name of the Font used in the editor. I kinda really like it but i cant find this font just by visually comparing.
It's Randy's own font that you can get as a Patreon member I believe
As an Australian I can confirm, we are all actually form Nebraska.
He didn't use Rust, so it doesn't count. It's not a game and it ain't from scratch. In fact, it's nothing. *spits and walks away. ♥
XD
Prime preaching C being "the real mans language" while reacting to a video about Jai
why does this looks fun?
Editor took the day off to have a piece of piss day.
brraking: flip didn't zoom
Time to jump into 4coder
Randy is from my city. Walked past him a few times lol
Windows 3.1 confirmed. Performant, stylish --cutting-edge.
Flip did not zoom nor did he dim the lighting 😞
flip did not have any business editing this video at all
I also did a game from scratch and I don't think a single soul played it.
7:35 and 9:46 are probably the best parts of the video. Thanks, Flip.