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 TH-cam 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!
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!
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.
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.
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!*
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!
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'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. 😁🎮
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!
@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.
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.
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.!!
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!
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.
You really have a high quality TH-cam channel. Finally some REAL engineer/hacker that shows how things are done. TH-cam 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
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???_
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
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
@@xmlthegreat the game is free and up on her youtube channel. th-cam.com/video/G6Kb8_6nPYo/w-d-xo.html this is the game with the download link. it's a neat little POC and it can be played on any gb emulator.
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!
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: th-cam.com/video/F8kx56OZQhg/w-d-xo.html&ab_channel=javidx9
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 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.
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!
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?
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 😄
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. th-cam.com/play/PLeEj4c2zF7PaFv5MPYhNAkBGrkx4iPGJo.html
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.
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.
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.
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 :)
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!
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 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.
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.
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.
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!
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!
@@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.
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
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!
This was really cool to watch. I was a programming major in college (tried to code an ebook reader for DS as my senior project) but ened up in the IT field and stayed there. Not sure if I will ever code for fun again but this definitely peaks my interest. Please do more videos on this "series".
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.
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!!!
Glad to see you using GBDK 2020, but you should know there are updated version of tile designer and map builder that allow for different monitor resolutions, better copying and pasting, and some other small improvements that make things MUCH easier! :)
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
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. 😆🤓
The nice thing about the gameboy is how well documented everything is
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.
I appreciate this because you aren’t dumbing things down. There’s plenty of beginning from nothing courses for coding on TH-cam 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.
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!
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.
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
I just made a minecraft type game on the GBA! It's fun to program on.
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!
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.
Ah, GBDK. Such nostalgia, some of my first experience programming in C started with that.
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.
That scrolling looks surprisingly great. Would love to see more content like this.
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!*
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!
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'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. 😁🎮
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!
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'.
Who'd have thought in the 80s that two lines forming mountains would be so iconic and enjoyable to see nearly 40 years later.
Brilliant! Even at 43 I learned something new. Those are some powerful dev tools.
“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.
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!
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.
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.
You really have a high quality TH-cam channel. Finally some REAL engineer/hacker that shows how things are done. TH-cam 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.
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???_
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
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
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
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!
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.
th-cam.com/channels/VYDU8oQJFiHYLco5qVtayw.html 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. th-cam.com/video/G6Kb8_6nPYo/w-d-xo.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'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.
Yes, please, keep this series going, I'm interested as it gets
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!
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: th-cam.com/video/F8kx56OZQhg/w-d-xo.html&ab_channel=javidx9
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!!!
I dont have a gameboy, i have no patience for coding, yet here i am
*cough* GB studio *cough*
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 was literally just thinking about doing something like this the other day! Please make more development videos! :)))
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.
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
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!
Hard coding those scroll offsets really interrupts my buffer
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?
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 😄
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.
th-cam.com/play/PLeEj4c2zF7PaFv5MPYhNAkBGrkx4iPGJo.html
I need to dig out my hobbyist's hat again from the dust and dig into GBDK.
Time to demake doom for gameboy
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.
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.
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.
I really want to do a Metal Slug-style game using the GBDK
Im a programmer and this type of content is really good for game dev
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 :)
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!
Dude you should stream building a game and let the chat decide how to go about it. That would be fun I think.
Love that backlight mod. Screen looks hecking sharp
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...
having those results with just a bunch of lines of code looks very exciting. So please go ahead!
MVG: 30
Me, in panic: "That's 48!"
I too was also concerned about the hex values lol
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.
Please GBA Development!!!
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.
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.
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.
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!
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!
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'm quite impressed by the simplicity of the code. that is seriously interesting thank you so much
"Learn to code"... I see what you did there 😁
?
?
It's amazing how much you're able to achieve to demonstrate in ten minutes !
Mario in this game: I swear, I've passed those mountains for the like the 50th time already!!! ;-)
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
Everybody gangsta until MVG starts coding homebrew
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
How the **** did devs create a game like Metroid 2 outta this?
This was really cool to watch. I was a programming major in college (tried to code an ebook reader for DS as my senior project) but ened up in the IT field and stayed there. Not sure if I will ever code for fun again but this definitely peaks my interest. Please do more videos on this "series".
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 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
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!!!
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
Glad to see you using GBDK 2020, but you should know there are updated version of tile designer and map builder that allow for different monitor resolutions, better copying and pasting, and some other small improvements that make things MUCH easier! :)
every boy dream console of 90's, speaking of gameboy never gets old.thenx
This video was AWESOME! I had no idea GameBoy was so reasonably accessible - I always assumed I'd need to crack out some assembly :)
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!
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.
Honestly dude like 50% of what you say I don't understand because I have zero programming knowledge but I still love your videos
This is really cool. I've never even thought to try this sort of thing out
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
Dang, this gives me goosebumps in a good way.
I would love to see this become a series!
Unironically very excited for the Brackeys arc of MVG.
Love this idea-been thinking a lot lately about dabbling in something like this, would love to see more!