Do a ps2 scene video, and bring some light to it. That scene has been hurting for a while. Swear Jay-Jays reuploads saved me from tons of broken links years ago. PS thank you for your hard work on the OG xbox!!
They took my snake and they turned it into a plumber. They made the eggs into barrels. The pine tree they made into a gorilla but I recognize my design. Donkey Kong my ass! That's Construction Snake.
I appreciate this because you aren’t dumbing things down. There’s plenty of beginning from nothing courses for coding on RUclips already, so this is a breath of fresh air.
Many of these co called "courses" are just people bragging about themself with little to none educational value and missing key information. Where as this is a concise pointer in a particular direction whith encouragement to go further.
Same here, I've tried before and I couldnt figure out how to do anything besides printing text when I press the ds's buttons. It would be great if he did it
You can have a look at devkitPro, specifically the devkitARM. It has a built in library called "libnds". What you do need to be prepared for, is that the ds is an insanely complex console, that still works very similar to the entire gb family, most closely to the gba. So it's probably a better idea to start programming for the gba, since you won't have to juggle between the two screens (and two separate graphic engines) of the ds.
Great to see GBDK getting some love from you. Nice use of the LYC register for the parallax. It's exactly what is used for the HUD and the moving mist in Super JetPak DX. Looking forward to seeing what you come up with in this series.
A lot of people talk about emulation as a form of game preservation, but rarely demonstrate anything beyond setting up emulators or sketchy advice about acquiring ROMs. You have a clear and obvious love of game preservation and it shows in your desire to learn about games, how they're made, and share that knowledge. Thanks!
You really have a high quality RUclips channel. Finally some REAL engineer/hacker that shows how things are done. RUclips is flooded with consumer-only videos (Unbox Therapy, MKBHD, ..) , where the channel owners have no clue about technology. Thanks for the tutorial! Keep the great work up. We former Xbox hackers have to stick together :p
@@BrunodeSouzaLino Of course they exist and they are also super professional. The problem is that you really need to search for them, because the YT algorithm is not preferring these kind of videos
For those who might not appreciate game developers, now is probably the time, this small demo took a few hours, imagine a full fledged game, debugging etc... Very time consuming indeed, for me, I dont have the patience for it but Im glad someone elss does.
Alleyway (Breakout/Arkanoid clone) can’t have taken more than a few weeks even before the gameboy hardware was finished. I look at some videos of Japanese programmers at the time and they’re all in their early 20’s, some of the bedroom game devs on the spectrum were teenagers. this isn’t rocket science but it takes a bored teenager’s enthusiasm 😁
Nostalgia from when I used to play around in the homebrew PSP scene back in the day! Used a custom homebrew SDK then too, that's where I first really learned to code in c - Awesome to see content like this!
Its like the flint and steel of the consoles. When the power goes down... you put a pair of AA batteries and you can play like a Chad in any environment :) post apocalyptic console xD
I haven't tried GDBK but I've had a play around with GB Studio and I agree the pallet and resolution restrictions make it super quick to develop for. Within a couple of hours I was able to create a decent looking tile map, a dozen or so sprites and a character walk cycle from 4 different directions as a mediocre artist.
I've only been watching your channel for a few weeks now. But I've consumed so much of your uploaded content that I need more. I subscribed rather quickly after watching the piracy and graphics videos. I think the nicest thing I can say about you and your channel is it's like a video game version of How It's Made. The sound of your narrative voice, the quality and composition of your videos and the music. I thoroughly enjoy all your educational content. You sir, are awesome. 😁🎮
Pretty good. everyone just starts with Unity but this is a good way to teach people from the basics. Nice. Am looking forward to seeing the release of the full series.
Just sourced an OG GB locally after seeing this video. Can't wait to start cranking out chiptunes and demos 🤓 Thanks for the content! This coming weekend will be epic!
Considering that 99% of commercial Game Boy game were written in Z80(-ish, the Sharp LR35902 was a mix of the Intel 8080 and the Z80) assembly, C is actually an upgrade. I'm curious how efficient C code generated by this compiler would be compared to the more direct assembly option - I'd be concerned about how well it scales to game-scale projects since RAM and ROM size are so constrained.
@@Damaniel3 C is anything but efficient compared to typical assembly. It's gotten a lot better since the original GBDK, but ultimately with C being a stack oriented language and the stack being slow to use on the GB you'll end up with quite a performance hit compared to assembly, and if you want to push the hardware you pretty much have to write everything in assembly.
@@CasualPokePlayer its worse than that -- the Sharp SM83 (and i8080 and to a lesser extent the Z80) is a horrible target for C (for example, it doesn't have some of the addressing modes useful for a C compiler), and the most commonly used gameboy C compiler isn't a particularly good C compiler. However, I would like to point out that these faults are because C is a bad match for the SM83, not because C is particularly less efficient than assembly on a more modern architecture (that's a completely different story, so I won't discuss it).
@@undefinednan7096 Most of the problems with GBDK are fixed with GBDK-2020, and yes I know, the GB is fundamentally a bad platform for C, hence a performance hit over typical assembly.
I have this idea for a game about, this is gonna sound crazy but hear me out, a guy with long ears and a green shirt who goes out sailing looking for adventure. But he gets shipwrecked and loses his trusty sword and shield when he washes up on a remote island full of secrets. The very first part is about how he has to find his stuff on the beach, and then from there, he has to find keys to open up various dungeons and defeat the monsters that lurk within, because they're guarding musical instruments that he needs to play a song. Playing this song will save the mysterious island... _or will it???_
GBDK is quite nice. You also have RGBDS if you would like to delve into ASM. If low lever programming is too difficult, you also have GB Studio which is a tool like Game Maker for the Gameboy. It utilises GBDK under the hood, and even allows you to modify the game engine itself if you know how.
This is a really awesome series idea! It would be so much fun to have this community get together and make a collection of games based on code started in your video, seeing all the branches that come from it. Start at gameboy and make our way up to modern game engines like Godot!
@@xmlthegreat the game is free and up on her youtube channel. ruclips.net/video/G6Kb8_6nPYo/видео.html this is the game with the download link. it's a neat little POC and it can be played on any gb emulator.
I sadly have no time or opportunity anymore to get back into coding, but I so much appreciate your effort doing such an introduction guide for many people to jump onto this and start their own projects! *If any of my boys ever is interested in coding or making video games I will for sure use your videos to give him some assistance!*
Congratulations, great video, I developed for DS many years ago, using the PAlib library also in C. It would be a good video too. In fact, do a part 2 of the Game Boy teaching the inclusion of sprites!
This channel is one of a my favorites channels for all time! I'm from Brazil and I learn english with your videos. Thanks for this amazing content! (And sorry if my english write is not good now :P)
Opa, tamo junto! Tem um outro canal que eu recomendo e é esse aqui. É nessa mesma pegada, mas mais técnico ainda: ruclips.net/video/F8kx56OZQhg/видео.html&ab_channel=javidx9
You have secured future game coders and helped bring back to life some of the older consoles.! Who knows if the next number one hit game and company will spawn thanks to your little bit of help and expertise in this area.!! Thank you so much for always being there for everyone who needed it.!!
@Risen General It is, however the PS2 also had 3D development kits like Renderware which was responsible for being the game engine for many many PS2 titles.
Thanks for an awesome startup guide and tutorial! I'd love to see more of this, especially with the 16 bit consoles. Also, that palette/backlight swap button on your Game Boy is amazing.
I’m an engineer (focus on embedded systems and robotics) I just find retro video games and how their hardware works really interesting. I think you did such a great job here explaining code, because you actually showed how to troubleshoot. You didn’t just write out a perfect program first try, you showed HOW to go about finding the problem when an error occurs. Great video as always man!!!
Gameboy games written in C++ with pre-defined macros to do common tasks like SHOW_BKG and DISPLAY_OK. This development framework and/or library is absolutely amazing! Thank you for showing this.
You can still write parts of the code in Assembly because it is C. Even when the gameboy was releassed basically no game developer was interested in wrtiting a game in Assembly since games tend to get complex (try programming pokemon in Assmebly it will take you a few years). This is even worse when you have more than one person working on the same codebase. So C which allows injecting Assembly when needed and it being fast enough was the obvious choice for game development for a long time.
C is only JUST above assembly. In fact translating C to assembly (what a compiler does) is usually pretty straight forward. But it greatly simplifies coding. For example assembly doesn't have a printf so that would have to be copied and pasted from somewhere else. I used to write code for my TI-83 in C++ back in the day. It's a Z80. I think the GB is also a Z80.
@@sakurajin_noa Most roms for the 8 bit era were entirely written in ASM. Even in the 16 bit era, very few games were written in C. ASM really isn't that hard. C does add some overhead in terms of CPU usage, especially the older compilers that would have been available in the actual 8/16 bit days.
@@awilliams1701 I’m aware of that. I had to convert Assembly to C and vice versa for a comp org class back in college. I SHOULDN’T be too surprised, but from what little I know of game development from the 70s to the 90s, it was mostly done in Assembly. It was a pleasant surprise that it’s in a language that I can actually read 😄
We had an amazing 2000-level class at Georgia Tech that essentially taught C to fresh faced CS kids using a Game Boy Advance game design assignment. I’ve gone back and made about a dozen more over the years since then - this is a fantastic way to spark a passion for programming!
You sir, are a genius. I can build and bench-test a computer, but this all just makes me feel like an infant. Would love to learn to code, but it's hard to find an entry-point. You would make a great teacher and can be very proud of your skills.
This is fantastic. Im an electronic engineering student and we have learned a decent foundation for programming in C, and a project like this looks a blast.
Definitely going to be following this series! Brings me back to my days as a kid with the TI 994a. They used to send out a magazine with code in it, to type up and play a new game. That's how I learned to program, by experimenting with all the different lines of code to see what it would do?
This will be a fun project for anyone who wants to start making games. Any kind of computer programming all has basic concepts and there are a number of many basic ones that have been very briefly demo'd here. If you have the will to do it, MVG is giving you the know-how.
The very week i start learning GBZ80 ASM this video comes out. Noice :> edit : isn't GBDK, like, extremely unoptimized ? Eh, ig it's good enough for beginers :)
You know someone is a passionate developer when they say "this isn't the most elegant piece of code i ever written" as to say "Don't judge me based on this, please". Thanks for this video MVG
Originally came to this video expecting an overview of GB Studio (which uses GBDK behind the scenes), but this turned out to be a more satisfying raw programming intro video!
That would be excellent sir! Used to try coding with the GBDK but never got pass the few basic stages. With your expertise, great explanation and interesting videos I'm sure that ill be able to finally make a fully fledge game with this GBDK. So please do so sir, it would be a blessing to the entire community!
Great to see more gameboy home-brew videos! It's definitely my favourite system for home-brews, there's so much out there, and lots of cool new stuff being made too! I've done lots of game boy homebrew reviews if anyones interested in checking some games out made with GBDK, and Gameboy Studio.
This has made my entire day. I love programming and development but lately in my job, I've been kind of burnt out and put off. Having something like the gameboy development kit amongst other projects I've been researching, my programming spark has been reignited.
@@squishmastah4682 Programming is (from a technical perspective) a highly logical endeavour; computers are very unforgiving, and will do exactly what you tell them, exactly how you tell them to, even if what you told them to do was completely wrong. There's no room for nuance, and a computer can't infer from the context what you meant for it to do. Once you get used to that 'model of thinking', it tends to leak through to other aspects of your life. You might start to get annoyed when people give instructions that are missing details that you *could* have guessed at, for example; the stereotypical example is cooking with recipes, which often use ambiguous units of measurement. Likewise, you'll probably start recognizing more processes in everyday life, causes and effects, reason about them as if they were defined in code, and so on. Which can lead to nagging questions like "wait, why *do* things work this way?", or spotting what seems like logical errors in how people approach things. Now I should be clear; this is not an *accurate* view of the world, even if programmers tend to forget this. Code is primarily written for humans to read, not for computers to execute, for example. And often what seems like a logical error in someone elses behaviour actually turns out to make total sense, you just didn't have all the information (but you wrongly believed that you did). But nevertheless, it's how many programmers start looking at the world around them.
"I think differently than you," is a statement hard to articulate, because we all communicate differently as well. So, I'll try to just provide some outlines below, with sources that expound on those ideas. Coding principles help keep your mind disciplined for everyday tasks. As you program and discipline yourself with your code, you'll notice your thought patterns shift to apply some of the key coding principles (in the link below). Discipline is good for everyone. www.geeksforgeeks.org/7-common-programming-principles-that-every-developer-must-follow/ I had a few more paragraphs written up here and realized that I'm not actually able to articulate it well. So, like the best of us in programming, I'm going to import someone else's work! www.quora.com/How-does-programming-change-your-way-of-thinking There are many, many answers on that page which can articulate much better the ways that I've changed my thinking.
I looked into writing DMG game and spent a decent amount of time reading about the memory layouts and op codes and was prepared to write it in assembly; never got around to starting for the last few months. All this research and I didn't know someone had a nice toolchain all setup. I might still do it in assembly for the experience, but this is a great resource.
assembly is needed for serious games because c is unoptimized and inefficient and bulkier. There are many things that require efficient timing and if anything requires that it probably won't work well or at all in c/gbdk.
GB Studio & GB Studio 2 are sort of more drag & drop SDK for GB, but still require a bit of tinkering. They are both amazing, & I'm sure will get better & better. But GBDK is so addictive. Check out: GamingMonsters GBDK series, if you haven't already, I highly recommend it. ruclips.net/p/PLeEj4c2zF7PaFv5MPYhNAkBGrkx4iPGJo
Amazing Video. I'm a regular information systems developer and always had difficulties to understand how game codes (even the simpliest ones) works and this video really makes it easy to get into it. It will be really nice to see a series of it.
This is really neat, but there are a lot of bad practices shown. - your first demo doesn't have any vblank wait, so it will waste battery. - the background didn't work because they have a max size of 32x32. To go beyond that you need to change it on the fly. - mixing up 30 and 0x30, using hex where it's not really needed, just confusing. - you added a comment explaining what each variable does - good, but why not give them meaningful names instead? - the interrupt handler wastes cycles by comparing LYC_REG to multiple values in the same call. Using "else if" would help. The Game Boy is only 4MHz (and really more like 1MHz since every instruction takes a multiple of 4 cycles) so it's very important not to waste time. - including C files is ugly and leads to complications and slow compile times. They should be compiled separately and referenced using `extern`. Besides all that, you really need to use assembly for anything reasonably complex, since the GB is so weak, the overhead of even highly efficient and optimized C can be a lot. It's still a great platform to learn on, since the assembly is really simple. You can of course mix assembly and C too.
this mad lad is putting out videos every monday for 2021. Don't burn yourself out please. I'd rather you get some sleep and live a healthy life that put out videos every week
The video said there'd be a link to the source code in the description, but I don't see one? In particular it looked to me like your parallax scrolling method was wrong because it set the register rather than reacting to it. You said that you fixed it up but never showed the final code. I need to know if I was right or wrong! :-P
Hi again - I found a working parallax example using GBDK over on GitHub from 2019 ( github.com/leo-rp/gbdk-parallax-example ), which shows an example of using the add_LCD and add_VBL interrupt methods. What MVG did not show was how to increment the background's position every time the screen refreshes (in the V-blank interrupt method). This example is quite elegant, by bitshifting the movement of the foreground to calculate the movement of the midground and background. He's also checking the LY_REG instead of LYC_REG to figure out what scanline he's on, and he's moving the background with SCX_REG and SCY_REG instead of the move_bkg function. Big respect to MVG and to leo-rp (on Github) for making this information publicly available!
Thank you for recorded this video. Since I became a pro developer I was wandering to start builting a GBC game. This video is a good way to start looking at it! Huge thanks!!!
You need to know Assembly and have access to Wario Land disassembly to be able to do that or know hex editing and hack away. If you want to do some real work on the Gameboy sooner or later you need to get your hands on Assembly because of the limited resources the Gameboy has. For many things C works fine and you could make a functional little demo on the Gameboy using just C but if you want to know how to truly work with the system you gotta learn Assembly. C has much more overhead, aka bloat than Assembly and on a system like the the Gameboy with limited resources you will be using a ton of CPU to do something that in Assembly will use much less. Assembly is 1:1 with the machine instructions and it is dependent on the microcontroller in question. In modern embedded programming we use C mostly because it is definitely easier and faster to write code for but you will find times where you might need to be really specific with how you want certain things to operate and thats when you might need to use assembly. Many compilers, havent check this one allows you to do what it's called inline assembly which is to use assembly instructions on C which is used when you want to override the compiler on a specific situation. In practice you could use C for things that dont require much CPU while you optimize things using Assembly. That being said this is a great starting point to learn C and you will end up learning a lot about the hardware cause working with the GB will force you to know the ins and out of said hardware.
This video and series is absolutely perfect and couldn’t have come at a better time. I’m getting bored working at a big game studio and I’ve been thinking about getting into GameBoy homebrew. Thanks so much MVG!
Oh wow, after watching so many videos about developing for retro consoles, I was under the impression that you had to write assembly to develop Game Boy games. I did not expect to see a full C toolchain for the platform. That is really neat!
I wish I had a teacher like this in college when it came to coding. For thousands of dollars per semester, I had some professors who would teach us crap and criticized us if we dared raise our hands to ask questions and then left us to figure everything out ourselves with a confusing and poorly written book. This guy puts together a FREE seventeen minute video which teaches coding better than many college courses do in an entire semester.
DUDE! Thank you so much for this video! I make board games and wanted to make one into a GameBoy game. This is the start I needed. What amazing timing.
This is so cool, it's not a tutorial, but for people with knowledge is an awesome guideline to start, I'll give it a try and hope I can make some demos or interactive videos
Yes! This series would be an amazing one! For experienced coders or people who want to learn something new! I am learning JavaScript right now and JavaScript is very fun and cool!
I love this idea. Even if you do not go through with the entire thing start to end a video on setting up the development environment (even if there are others, I like you) would be awesome.
100% agree because he will not only produce a great series for us all, beginners, intermidiate or MasterCoder, but, I feel he'll go on to the next level(s), GBC, GBA, Assembly?
let me know if you liked this content and want to see more from other console homebrew scenes. have a great week
I love the Dreamcast homebrew scene. They've really kept the system alive a lot longer than Sega has. You should cover that.
Do a ps2 scene video, and bring some light to it. That scene has been hurting for a while. Swear Jay-Jays reuploads saved me from tons of broken links years ago. PS thank you for your hard work on the OG xbox!!
original xbox homebrew coding would be cool to see.
Yes please! PS2 in particular is pretty rough to get into.
I think I might have to call you Dr. Modern Vintage Gamer from now on.
I’m gunna code a new game about bricks falling from above and you have to align them and make complete lines to get points.
that would never work
and it's gonna be "our" game not your game
Pfft that game already exists it’s called Super Mario Land... idiot
@@elliotcoll no its sudoku dumb dumb
Lol, Alexey Pajitnov beat you to it. 😆🤓
I've gotten really into the idea of making a game -- couldn't have posted this at a better time!
Download Unreal Engine... you will have more fun than making tetris 2.0 for your gameboy.
@@aluckyshot yes but its waay harder than making a Tetris 3.0
@@rayan0468 lol u wish, Tetris is *very* complicated
Just download Engine001. You don't have to code and its superrrrr easy.
Need an artist and or support writer
I'm gonna make a game about an italian plumber who fights a giant lizard. I think it'll take off.
you should make him fight a turtle 🤔
A video game about a... Plumber? Who would play that?
Just make sure the plumber doesn't wear a tie. Because plumbers don't wear ties.
They took my snake and they turned it into a plumber. They made the eggs into barrels. The pine tree they made into a gorilla but I recognize my design. Donkey Kong my ass! That's Construction Snake.
Don't forget multiplayer, give him a brother.
The nice thing about the gameboy is how well documented everything is
I appreciate this because you aren’t dumbing things down. There’s plenty of beginning from nothing courses for coding on RUclips already, so this is a breath of fresh air.
writing a gameboy rom in c to try and learn is a bit counter productive tho
So true!!
Many of these co called "courses" are just people bragging about themself with little to none educational value and missing key information. Where as this is a concise pointer in a particular direction whith encouragement to go further.
@@iraniansuperhacker4382 no xD
I would love a whole series of this. I would really love to program the DS.
Same here, I've tried before and I couldnt figure out how to do anything besides printing text when I press the ds's buttons.
It would be great if he did it
For that I recommend using the PAlib library, also in C. I created some games about 15 years ago
@@TiagoSantos-lt4do interessante, ill check it out.
You can have a look at devkitPro, specifically the devkitARM. It has a built in library called "libnds". What you do need to be prepared for, is that the ds is an insanely complex console, that still works very similar to the entire gb family, most closely to the gba. So it's probably a better idea to start programming for the gba, since you won't have to juggle between the two screens (and two separate graphic engines) of the ds.
THANK YOU SO MUCH I'VE BEEN WAITING FOR THIS VIDEO FOR YEARS!!!
Same here. I’ve made some flashcarts years ago, but only recently wanted to really start writing stuff for it.
YEEEEE MADAFACAAA
@@amateusz2137 @thefredo1000 yeah because this is the very first and only bit of information on the Internet on this topic
No you haven't. Probably don't even know how to code.
@@firstlast7112 Hi, I've been in the GBA homebrew community for some years, I'm also a Google intern, so I do know how to code.
Great to see GBDK getting some love from you. Nice use of the LYC register for the parallax. It's exactly what is used for the HUD and the moving mist in Super JetPak DX.
Looking forward to seeing what you come up with in this series.
A lot of people talk about emulation as a form of game preservation, but rarely demonstrate anything beyond setting up emulators or sketchy advice about acquiring ROMs. You have a clear and obvious love of game preservation and it shows in your desire to learn about games, how they're made, and share that knowledge. Thanks!
You really have a high quality RUclips channel. Finally some REAL engineer/hacker that shows how things are done. RUclips is flooded with consumer-only videos (Unbox Therapy, MKBHD, ..) , where the channel owners have no clue about technology.
Thanks for the tutorial! Keep the great work up. We former Xbox hackers have to stick together :p
Hey, no need to throw shade on other youtuber just because there're not qualified enough to talk about the things you want.
@@annedrieck7316 Shouldn't be any bad criticism, but they often talk BS when they dig deeper into the matter :D
Of course Bisqwit, Jeff Gerling, Dave's Garage and others are not channels that exist.
@@BrunodeSouzaLino Of course they exist and they are also super professional. The problem is that you really need to search for them, because the YT algorithm is not preferring these kind of videos
@@karioken Good content does not simply plop on your lap. What plops on your lap it's what's popular.
For those who might not appreciate game developers, now is probably the time, this small demo took a few hours, imagine a full fledged game, debugging etc... Very time consuming indeed, for me, I dont have the patience for it but Im glad someone elss does.
Alleyway (Breakout/Arkanoid clone) can’t have taken more than a few weeks even before the gameboy hardware was finished.
I look at some videos of Japanese programmers at the time and they’re all in their early 20’s, some of the bedroom game devs on the spectrum were teenagers.
this isn’t rocket science but it takes a bored teenager’s enthusiasm 😁
I have been watching tutorials the past month about how to make GB homebrew and games, this came at the right time, thanks MVG!
Just use GB studio
Nostalgia from when I used to play around in the homebrew PSP scene back in the day! Used a custom homebrew SDK then too, that's where I first really learned to code in c - Awesome to see content like this!
The GameBoy holds a special place in our hearts
Its like the flint and steel of the consoles. When the power goes down... you put a pair of AA batteries and you can play like a Chad in any environment :) post apocalyptic console xD
I just made a minecraft type game on the GBA! It's fun to program on.
I haven't tried GDBK but I've had a play around with GB Studio and I agree the pallet and resolution restrictions make it super quick to develop for. Within a couple of hours I was able to create a decent looking tile map, a dozen or so sprites and a character walk cycle from 4 different directions as a mediocre artist.
I've only been watching your channel for a few weeks now. But I've consumed so much of your uploaded content that I need more. I subscribed rather quickly after watching the piracy and graphics videos. I think the nicest thing I can say about you and your channel is it's like a video game version of How It's Made. The sound of your narrative voice, the quality and composition of your videos and the music. I thoroughly enjoy all your educational content. You sir, are awesome. 😁🎮
That scrolling looks surprisingly great. Would love to see more content like this.
Pretty good. everyone just starts with Unity but this is a good way to teach people from the basics. Nice. Am looking forward to seeing the release of the full series.
Just sourced an OG GB locally after seeing this video. Can't wait to start cranking out chiptunes and demos 🤓 Thanks for the content! This coming weekend will be epic!
Ah, GBDK. Such nostalgia, some of my first experience programming in C started with that.
“Making game boy games is easy”
“You know C right?”
Considering that 99% of commercial Game Boy game were written in Z80(-ish, the Sharp LR35902 was a mix of the Intel 8080 and the Z80) assembly, C is actually an upgrade. I'm curious how efficient C code generated by this compiler would be compared to the more direct assembly option - I'd be concerned about how well it scales to game-scale projects since RAM and ROM size are so constrained.
@@Damaniel3 C is anything but efficient compared to typical assembly. It's gotten a lot better since the original GBDK, but ultimately with C being a stack oriented language and the stack being slow to use on the GB you'll end up with quite a performance hit compared to assembly, and if you want to push the hardware you pretty much have to write everything in assembly.
There's GB Studio for people that don't.
@@CasualPokePlayer its worse than that -- the Sharp SM83 (and i8080 and to a lesser extent the Z80) is a horrible target for C (for example, it doesn't have some of the addressing modes useful for a C compiler), and the most commonly used gameboy C compiler isn't a particularly good C compiler. However, I would like to point out that these faults are because C is a bad match for the SM83, not because C is particularly less efficient than assembly on a more modern architecture (that's a completely different story, so I won't discuss it).
@@undefinednan7096 Most of the problems with GBDK are fixed with GBDK-2020, and yes I know, the GB is fundamentally a bad platform for C, hence a performance hit over typical assembly.
I have this idea for a game about, this is gonna sound crazy but hear me out, a guy with long ears and a green shirt who goes out sailing looking for adventure. But he gets shipwrecked and loses his trusty sword and shield when he washes up on a remote island full of secrets. The very first part is about how he has to find his stuff on the beach, and then from there, he has to find keys to open up various dungeons and defeat the monsters that lurk within, because they're guarding musical instruments that he needs to play a song. Playing this song will save the mysterious island... _or will it???_
GBDK is quite nice. You also have RGBDS if you would like to delve into ASM. If low lever programming is too difficult, you also have GB Studio which is a tool like Game Maker for the Gameboy. It utilises GBDK under the hood, and even allows you to modify the game engine itself if you know how.
This is a really awesome series idea! It would be so much fun to have this community get together and make a collection of games based on code started in your video, seeing all the branches that come from it. Start at gameboy and make our way up to modern game engines like Godot!
His code is so simple, it's almost nonexistent. Making games based on it makes no sense.
I had a friend named Maddie who loves the gameboy. She made her own puzzle game for it, even with a full story.
How long has it been since you talked to her ?
@@ArpeggioPegasus about a year ago.
ruclips.net/channel/UCVYDU8oQJFiHYLco5qVtayw this is her youtube channel, though.
More details would be nice. Where to find the game, etc.
@@xmlthegreat the game is free and up on her youtube channel. ruclips.net/video/G6Kb8_6nPYo/видео.html this is the game with the download link. it's a neat little POC and it can be played on any gb emulator.
I sadly have no time or opportunity anymore to get back into coding, but I so much appreciate your effort doing such an introduction guide for many people to jump onto this and start their own projects!
*If any of my boys ever is interested in coding or making video games I will for sure use your videos to give him some assistance!*
Congratulations, great video, I developed for DS many years ago, using the PAlib library also in C. It would be a good video too. In fact, do a part 2 of the Game Boy teaching the inclusion of sprites!
Brilliant! Even at 43 I learned something new. Those are some powerful dev tools.
This channel is one of a my favorites channels for all time! I'm from Brazil and I learn english with your videos.
Thanks for this amazing content! (And sorry if my english write is not good now :P)
brasil enois caralhooo
Além de melhorar o inglês o conteúdo também é excelente. Desbloqueei meu nintendo wii e o PSP depois de assistir os vídeos dele :)
No need to be sorry, you do good.
Sopa do maca
Opa, tamo junto! Tem um outro canal que eu recomendo e é esse aqui. É nessa mesma pegada, mas mais técnico ainda: ruclips.net/video/F8kx56OZQhg/видео.html&ab_channel=javidx9
You have secured future game coders and helped bring back to life some of the older consoles.!
Who knows if the next number one hit game and company will spawn thanks to your little bit of help and expertise in this area.!!
Thank you so much for always being there for everyone who needed it.!!
Well said! 100% agree!
Can you do more videos on homebrew for different consoles? I'd love to see an in depth homebrew video like this on the PSP, Ps2, Gamecube etc.
GBA and DS too
Atari lynx as well.
Wii.
@Risen General It is, however the PS2 also had 3D development kits like Renderware which was responsible for being the game engine for many many PS2 titles.
@Risen General I think you might be confused with 'Renderman'.
Thanks for an awesome startup guide and tutorial! I'd love to see more of this, especially with the 16 bit consoles.
Also, that palette/backlight swap button on your Game Boy is amazing.
Who'd have thought in the 80s that two lines forming mountains would be so iconic and enjoyable to see nearly 40 years later.
the sega genesis homebrew scene is really good too! like REALLY good! You can code in BASIC, C, Assembly, and new games come out VERY often!
perfect, now time to get doom running on this!
Just look at a gameboy game called tyrannosaurus tex for the gameboy color. Its a real technical achievement of raycasting on the colorful brick.
@@Sinistar1983 faceball 2000 as well
Yes, please, keep this series going, I'm interested as it gets
I dont have a gameboy, i have no patience for coding, yet here i am
*cough* GB studio *cough*
I’m an engineer (focus on embedded systems and robotics) I just find retro video games and how their hardware works really interesting. I think you did such a great job here explaining code, because you actually showed how to troubleshoot. You didn’t just write out a perfect program first try, you showed HOW to go about finding the problem when an error occurs. Great video as always man!!!
Didn’t even know GameBoy had a homebrew scene, love it!
Similar to what MVG said, there's homebrew scenes for a lot of consoles
It has been around for a long time
Gameboy games written in C++ with pre-defined macros to do common tasks like SHOW_BKG and DISPLAY_OK. This development framework and/or library is absolutely amazing! Thank you for showing this.
I figured you would be coding in Assembly. Interesting that this is in C.
Same! Coding for GB suddenly got more interesting, didn't it?
You can still write parts of the code in Assembly because it is C. Even when the gameboy was releassed basically no game developer was interested in wrtiting a game in Assembly since games tend to get complex (try programming pokemon in Assmebly it will take you a few years). This is even worse when you have more than one person working on the same codebase. So C which allows injecting Assembly when needed and it being fast enough was the obvious choice for game development for a long time.
C is only JUST above assembly. In fact translating C to assembly (what a compiler does) is usually pretty straight forward. But it greatly simplifies coding. For example assembly doesn't have a printf so that would have to be copied and pasted from somewhere else. I used to write code for my TI-83 in C++ back in the day. It's a Z80. I think the GB is also a Z80.
@@sakurajin_noa Most roms for the 8 bit era were entirely written in ASM. Even in the 16 bit era, very few games were written in C. ASM really isn't that hard. C does add some overhead in terms of CPU usage, especially the older compilers that would have been available in the actual 8/16 bit days.
@@awilliams1701 I’m aware of that. I had to convert Assembly to C and vice versa for a comp org class back in college. I SHOULDN’T be too surprised, but from what little I know of game development from the 70s to the 90s, it was mostly done in Assembly. It was a pleasant surprise that it’s in a language that I can actually read 😄
We had an amazing 2000-level class at Georgia Tech that essentially taught C to fresh faced CS kids using a Game Boy Advance game design assignment. I’ve gone back and made about a dozen more over the years since then - this is a fantastic way to spark a passion for programming!
I was literally just thinking about doing something like this the other day! Please make more development videos! :)))
I'm just a tech, not a programmer, but videos like this really give me an insight into computers in a way i just can't grasp.
I need to dig out my hobbyist's hat again from the dust and dig into GBDK.
Time to demake doom for gameboy
You sir, are a genius. I can build and bench-test a computer, but this all just makes me feel like an infant. Would love to learn to code, but it's hard to find an entry-point. You would make a great teacher and can be very proud of your skills.
This is fantastic. Im an electronic engineering student and we have learned a decent foundation for programming in C, and a project like this looks a blast.
Definitely going to be following this series! Brings me back to my days as a kid with the TI 994a. They used to send out a magazine with code in it, to type up and play a new game. That's how I learned to program, by experimenting with all the different lines of code to see what it would do?
Dude you should stream building a game and let the chat decide how to go about it. That would be fun I think.
This will be a fun project for anyone who wants to start making games. Any kind of computer programming all has basic concepts and there are a number of many basic ones that have been very briefly demo'd here. If you have the will to do it, MVG is giving you the know-how.
The very week i start learning GBZ80 ASM this video comes out. Noice :>
edit : isn't GBDK, like, extremely unoptimized ? Eh, ig it's good enough for beginers :)
You know someone is a passionate developer when they say "this isn't the most elegant piece of code i ever written" as to say "Don't judge me based on this, please". Thanks for this video MVG
Hard coding those scroll offsets really interrupts my buffer
Originally came to this video expecting an overview of GB Studio (which uses GBDK behind the scenes), but this turned out to be a more satisfying raw programming intro video!
I really want to do a Metal Slug-style game using the GBDK
That would be excellent sir! Used to try coding with the GBDK but never got pass the few basic stages. With your expertise, great explanation and interesting videos I'm sure that ill be able to finally make a fully fledge game with this GBDK. So please do so sir, it would be a blessing to the entire community!
Who didn't know what the heck was going on, but still watched the whole thing?
Not a clue, but It happened & I didn't learn much but yea...idk its cool....development of coding & gaming & stuff...
Great to see more gameboy home-brew videos! It's definitely my favourite system for home-brews, there's so much out there, and lots of cool new stuff being made too! I've done lots of game boy homebrew reviews if anyones interested in checking some games out made with GBDK, and Gameboy Studio.
MVG: 30
Me, in panic: "That's 48!"
I too was also concerned about the hex values lol
This has made my entire day. I love programming and development but lately in my job, I've been kind of burnt out and put off. Having something like the gameboy development kit amongst other projects I've been researching, my programming spark has been reignited.
You should have posted a disclaimer that learning programming has a side effect of altering how you view almost everything.
I'd love to hear you two expounding upon this thought.
@@squishmastah4682 Programming is (from a technical perspective) a highly logical endeavour; computers are very unforgiving, and will do exactly what you tell them, exactly how you tell them to, even if what you told them to do was completely wrong. There's no room for nuance, and a computer can't infer from the context what you meant for it to do.
Once you get used to that 'model of thinking', it tends to leak through to other aspects of your life. You might start to get annoyed when people give instructions that are missing details that you *could* have guessed at, for example; the stereotypical example is cooking with recipes, which often use ambiguous units of measurement.
Likewise, you'll probably start recognizing more processes in everyday life, causes and effects, reason about them as if they were defined in code, and so on. Which can lead to nagging questions like "wait, why *do* things work this way?", or spotting what seems like logical errors in how people approach things.
Now I should be clear; this is not an *accurate* view of the world, even if programmers tend to forget this. Code is primarily written for humans to read, not for computers to execute, for example. And often what seems like a logical error in someone elses behaviour actually turns out to make total sense, you just didn't have all the information (but you wrongly believed that you did). But nevertheless, it's how many programmers start looking at the world around them.
"I think differently than you," is a statement hard to articulate, because we all communicate differently as well. So, I'll try to just provide some outlines below, with sources that expound on those ideas.
Coding principles help keep your mind disciplined for everyday tasks. As you program and discipline yourself with your code, you'll notice your thought patterns shift to apply some of the key coding principles (in the link below). Discipline is good for everyone.
www.geeksforgeeks.org/7-common-programming-principles-that-every-developer-must-follow/
I had a few more paragraphs written up here and realized that I'm not actually able to articulate it well. So, like the best of us in programming, I'm going to import someone else's work!
www.quora.com/How-does-programming-change-your-way-of-thinking
There are many, many answers on that page which can articulate much better the ways that I've changed my thinking.
@@crytocc Could totally relate man, I solely depend on instructions now and I find it hard to improvise. 😹
I looked into writing DMG game and spent a decent amount of time reading about the memory layouts and op codes and was prepared to write it in assembly; never got around to starting for the last few months. All this research and I didn't know someone had a nice toolchain all setup. I might still do it in assembly for the experience, but this is a great resource.
assembly is needed for serious games because c is unoptimized and inefficient and bulkier. There are many things that require efficient timing and if anything requires that it probably won't work well or at all in c/gbdk.
"Learn to code"... I see what you did there 😁
?
?
i thought GBDK was a simple, straightforward, drag and drop dev kit for the GB. This channel delivers
GB Studio & GB Studio 2 are sort of more drag & drop SDK for GB, but still require a bit of tinkering. They are both amazing, & I'm sure will get better & better. But GBDK is so addictive.
Check out: GamingMonsters GBDK series, if you haven't already, I highly recommend it.
ruclips.net/p/PLeEj4c2zF7PaFv5MPYhNAkBGrkx4iPGJo
Please GBA Development!!!
Amazing Video. I'm a regular information systems developer and always had difficulties to understand how game codes (even the simpliest ones) works and this video really makes it easy to get into it. It will be really nice to see a series of it.
Mario in this game: I swear, I've passed those mountains for the like the 50th time already!!! ;-)
Im a programmer and this type of content is really good for game dev
This is really neat, but there are a lot of bad practices shown.
- your first demo doesn't have any vblank wait, so it will waste battery.
- the background didn't work because they have a max size of 32x32. To go beyond that you need to change it on the fly.
- mixing up 30 and 0x30, using hex where it's not really needed, just confusing.
- you added a comment explaining what each variable does - good, but why not give them meaningful names instead?
- the interrupt handler wastes cycles by comparing LYC_REG to multiple values in the same call. Using "else if" would help. The Game Boy is only 4MHz (and really more like 1MHz since every instruction takes a multiple of 4 cycles) so it's very important not to waste time.
- including C files is ugly and leads to complications and slow compile times. They should be compiled separately and referenced using `extern`.
Besides all that, you really need to use assembly for anything reasonably complex, since the GB is so weak, the overhead of even highly efficient and optimized C can be a lot. It's still a great platform to learn on, since the assembly is really simple. You can of course mix assembly and C too.
Love that backlight mod. Screen looks hecking sharp
Everybody gangsta until MVG starts coding homebrew
this mad lad is putting out videos every monday for 2021. Don't burn yourself out please. I'd rather you get some sleep and live a healthy life that put out videos every week
The video said there'd be a link to the source code in the description, but I don't see one?
In particular it looked to me like your parallax scrolling method was wrong because it set the register rather than reacting to it. You said that you fixed it up but never showed the final code. I need to know if I was right or wrong! :-P
I've been experimenting with this off and on, and don't have it it fully working yet. I'll post a reply if I get it going.
Hi again - I found a working parallax example using GBDK over on GitHub from 2019 ( github.com/leo-rp/gbdk-parallax-example ), which shows an example of using the add_LCD and add_VBL interrupt methods. What MVG did not show was how to increment the background's position every time the screen refreshes (in the V-blank interrupt method).
This example is quite elegant, by bitshifting the movement of the foreground to calculate the movement of the midground and background. He's also checking the LY_REG instead of LYC_REG to figure out what scanline he's on, and he's moving the background with SCX_REG and SCY_REG instead of the move_bkg function.
Big respect to MVG and to leo-rp (on Github) for making this information publicly available!
Thank you for recorded this video. Since I became a pro developer I was wandering to start builting a GBC game. This video is a good way to start looking at it! Huge thanks!!!
I would actually like to know more about this so I could colorize WarioLand
You need to know Assembly and have access to Wario Land disassembly to be able to do that or know hex editing and hack away. If you want to do some real work on the Gameboy sooner or later you need to get your hands on Assembly because of the limited resources the Gameboy has. For many things C works fine and you could make a functional little demo on the Gameboy using just C but if you want to know how to truly work with the system you gotta learn Assembly. C has much more overhead, aka bloat than Assembly and on a system like the the Gameboy with limited resources you will be using a ton of CPU to do something that in Assembly will use much less. Assembly is 1:1 with the machine instructions and it is dependent on the microcontroller in question. In modern embedded programming we use C mostly because it is definitely easier and faster to write code for but you will find times where you might need to be really specific with how you want certain things to operate and thats when you might need to use assembly. Many compilers, havent check this one allows you to do what it's called inline assembly which is to use assembly instructions on C which is used when you want to override the compiler on a specific situation. In practice you could use C for things that dont require much CPU while you optimize things using Assembly.
That being said this is a great starting point to learn C and you will end up learning a lot about the hardware cause working with the GB will force you to know the ins and out of said hardware.
This video and series is absolutely perfect and couldn’t have come at a better time.
I’m getting bored working at a big game studio and I’ve been thinking about getting into GameBoy homebrew.
Thanks so much MVG!
How the **** did devs create a game like Metroid 2 outta this?
This is great material. I'd watch you code homebrew for hours! Anyone else have some more recommendations of exactly this kind of content?
@The programming crypto guy thanks, that's another 100 hours sorted 👍
fun fact: 14 people cannot be first!
I'm the best
Firts
I WANT PROOF
what if they tie?
What if they comment on the same frame of existence
having those results with just a bunch of lines of code looks very exciting. So please go ahead!
Did you #include a .c file, you monster?
Yes, he did
As I said in some comment reply before, it also bothers my soul a lot :P
Oh wow, after watching so many videos about developing for retro consoles, I was under the impression that you had to write assembly to develop Game Boy games. I did not expect to see a full C toolchain for the platform. That is really neat!
You can make some neat demos and simple games in C, but, you may run into performance and memory issues as things get more complicated...
For a serious game, you'll likely need assembly, for many reasons, c just does not work well in gameboy games
Honestly dude like 50% of what you say I don't understand because I have zero programming knowledge but I still love your videos
Dang, this gives me goosebumps in a good way.
every boy dream console of 90's, speaking of gameboy never gets old.thenx
Looking forward to the series! I've been messing around with gbdk for a while now, but I'm always happy to get new knowledge!
Couldn't possibly be a better class to take!
10/10 would recommend.
You're the best teacher I've ever had MVG
I wish I had a teacher like this in college when it came to coding. For thousands of dollars per semester, I had some professors who would teach us crap and criticized us if we dared raise our hands to ask questions and then left us to figure everything out ourselves with a confusing and poorly written book. This guy puts together a FREE seventeen minute video which teaches coding better than many college courses do in an entire semester.
I would love to see this become a series!
It's amazing how much you're able to achieve to demonstrate in ten minutes !
DUDE! Thank you so much for this video! I make board games and wanted to make one into a GameBoy game. This is the start I needed. What amazing timing.
i'm quite impressed by the simplicity of the code. that is seriously interesting thank you so much
I'm more interested in developing an emulator, but I will definitely watch this whole series so long as you keep making more. Fascinating stuff.
This is so cool, it's not a tutorial, but for people with knowledge is an awesome guideline to start, I'll give it a try and hope I can make some demos or interactive videos
Finally my moment has come . Thanks MVG Greatest video ever please continue the series
This video was AWESOME! I had no idea GameBoy was so reasonably accessible - I always assumed I'd need to crack out some assembly :)
Yes! This series would be an amazing one! For experienced coders or people who want to learn something new! I am learning JavaScript right now and JavaScript is very fun and cool!
I love this idea. Even if you do not go through with the entire thing start to end a video on setting up the development environment (even if there are others, I like you) would be awesome.
100% agree because he will not only produce a great series for us all, beginners, intermidiate or MasterCoder, but, I feel he'll go on to the next level(s), GBC, GBA, Assembly?