actually it's possible to automate the starting of bgb and rom loading by calling bgb from the .bat file. open the .bat file and append "pathtobgbexe -rom pathto.gbfile" at the bottom of the .bat file. For example I use: C:\Users\Andreas\bgbw64\bgb64.exe -rom C:\Users\Andreas\Documents\GBDK\exp\output\main.gb
I figured there might be a way to do this, but did research the command like for it. I've been developing for a long time, but just started looking into Game Boy dev yesterday. I was actually looking at GB Studio which simplifies development, but they just added some features that allow you some direct control base on GBDK offerings, so now I'm here instead.
It is really weird seeing Gameboy development in C. I spend a lot of time arguing the merits of GBA development in C, let alone Gameboy! That being said, we're seeing people argue the merits of C++ on GBA these days, so I guess C on GB has marched in step with that development. I also can't believe how old GBDK is. Part of the argument for compiled languages on the GBA is that compiler tools are just so darn good these days that they often produce between assembly than what a human can do - with the GBA being ARM & Thumb based there's been a massive amount of development for tools in this area (I actually retrofitted my Android development tooling for starting out on GBA development). GBDK doesn't really have that going for it, are there any modern or newer attempts at creating a GBDK? Perhaps something LLVM compatible? I understand why this might not be possible considering GB architecture (even on the GBA it's a struggle with the C language not supporting some of the better parts of the GBA architecture). This is a good tutorial that you've started here; gets hardware graphics on the screen very quickly and easily - something most tutorials oddly avoid.
I’m not aware of anything newer in c. Seem the current community shun it in favour of asm which I get but I think for many people the barrier to starting in asm is too high and they might drop out before they get very far
@@GamingMonsters Yeah I'm understanding of the perceived barrier with assembly. Choosing to do a tutorial in C is definitely the right thing - Gameboy is hip and cool right now so attracting new developers is awesome.
@Nixienea just had a look, it's great that someone has decided to update it and keep it going in 2020, we've seen some real awesome GB games written in C recently
1:08 I know it's just an example and not trying to be nitpicky, but Super Mario Land never used the Window layer for the HUD. Instead the screen split was used in similar way to SMB1 to make the upper part not movable and the actual level scrolls normally (Not sure if the invisible sprite tile was needed in order to tell the game where the split starts like in NES games) , while that technique eliminates the ability for the main screen to scroll vertically. The only time the WIN layer was used is when you pause the game showing the text in a corner. : )
well , i've been avoiding C since 2012 lol , i've used all sorts of game engines to make my games , but i guess i gotta rekindle my toxic relationship with C and start this journey to port a small game i made into my gameboy . thanks for the tutorials brother
thank you for this series. I would like to point something out, if you want to flip between 1 and 0 quickly just write: currentspriteindex = !currentspriteindex; no need for the if-else statement.
Having that dinosaur game on the Gameboy was very funny and cool! Good job! I hope to have the time one day in the near future to put my C programming skills to the test making my own Gameboy games! What model of Gameboy is that? What models do you generally need to buy in order to run your own games on them, and where can I get one? also, can I run custom Gameboy games on a Nintendo DS also? I have one of the older versions.
that is a gameboy advance but with a modern backlit screen modded. You can get any gameboy the "magic" bit is a gameboy flash cartridge, right now your best value is the EZ Flash Jnr www.ezflashomega.com/products/EZ-Flash-Junior.html. There are probably gameboy emulators for the DS but you will need a DS flashcart like an R4 cartridge
Thanks, I did the same mistake. Now my game looks normal. I think the program loaded an unitialized sprite containing random numbers which made the sprite look weird.
it would appear that with the new GBDK 2020 you should now include the header file instead of the .c file as it wouldn't compile for me until I did that, and didn't give me a black square
Where the if..else statement if being used to decide which of two sprite index’s to use add an else if. See here for a better explanation of if, else and else if www.programiz.com/c-programming/c-if-else-statement
I had a similar problem with this until i fiddled around with it. [edit] So what i did was this. When you write more frames in, you would do it like this while(1){ set_sprite_tile(0,1); delay(30); set_sprite_tile(0,2); delay(40); set_sprite_tile(0,3); delay(30); set_sprite_tile(0,4); delay(60); set_sprite_tile(0,5); delay(70); set_sprite_tile(0,6); delay(80); } That's how i got more frames in. and you can delay time for frame sto be fast, or slow. Hope that helps!
I hate that I've only just found this four years after you've posted. Thank you so much for this wonderful and instructive series. As a child, I owned and played the original Game Boy - that big grey brick that subsisted on four AA batteries, three square meals a day - and it, along with my NES, was such an important part of my childhood. I loved video games, and I played them incessantly throughout my adolescence and young adulthood. More than thirty years later, I've returned to college to complete a computer science degree, and finding something like this... it's just really something. I can't imagine trying to explain to my child self that one day I would be able to *create* my own games and potentially share them with friends. As stressful and disappointing as the real world can be sometimes, it's really incredible to find something like this that rekindles a child-like sense of awe and inspires so many creative possibilities. Seriously, @GamingMonsters, thank you so much for this.
You could have used. No need for the if statement as there's only two possible values that you're using. currentSpriteIndex = !currentSpriteIndex set_sprite_tile(0, currentSpriteIndex);
I could but I try to write examples for non programmers that keep the logic more obvious, good to have this comment here though for more advanced users
Although I'm not too interested in Game Boy development from scratch due to GB Studio's existence and how weak the hardware is (GBA is my minimum for good gameplay experience), your guide on displaying sprites gets to the point while being thorough. The part of programming courses that I hate the most is that they always start with the command line and never move beyond ASCII; hopefully I can translate these lessons over to the SGDK, another C-based IDE that gets little love in preference of assembly. Granted, what platform I'd die for an SDK is the SNES, but beggars can't be choosers, and these kind of projects need more traction first.
Hello! i couldn't gb/gb.h in C and its is also says "Error type.h:no such file or directory" I don't know what i have to do(i'm using Embarcadero DEV-C++ 6.3
@@GamingMonsters Thank you so much for the reply. Also, I've been looking online and was wondering, would writing while(true) be bad practice in this scenario? Cheers GM! Also, ignore my comment in the first tut, it's solved (forgot to save, hehe).
7:53 Why did you say single quotes? They're double quotes. Confused the crap out of me when my code wouldn't run. Also, on the previous lesson it's 'sdio.h', you say 'sdia'. Don't get me wrong, I appreciate and am enjoying the tutorials, just pointing out some bits that are unclear.
I'm working on Mac, specifically Catalina, and Catalina no longer has support for 32-bit programs, making programs like Wine unusable. Is there a Mac-friendly alternative to this sprite-making program, or another way I could emulate this sprite making program?
Is there a way that I can animate a sprite at a different speed than the main while loop? Like a kind of local delay function. I've tried using two separate while loops, but that just freezes up the emulator. I intend on making a space invaders-esque game, and I'd like the enemies to not be animated at the speed of sound lol
You can write some code that skips animation every x loops through the main loop using something like the modulus operator in c and a count variable that is incremented by ever loop
@@GamingMonsters well, I ended up figuring it out in a very sub-optimal way, but it still works. I ended up using four variables in a few if-else statements and it ended up giving the enemies a kind of pattern to their animation. I tested variable values in a separate script and let it output either 0, 1, or 2. I used the statements that returned 0 and 2. The pattern that the if statements take looks something along the lines of 012111011211011121011110 I can send you the if statements if you’d like to see :)
i understand that the white in sprites are transparent but how does the game Kid Dracula manage to make the white not transparent against a background?
The first colour in the pallete you choose (or the default pallette) is used as the transparent color so if you set white as the 2,3 or 4th color then it will display
This is a fantastic guide, but I have a question for you. How did you manage to enter the text without repeating it? I tried with Printf but it keeps repeating me on screen. how do i solve this problem?
@@GamingMonsters yes yes in the end I solved, I used the Font and then the Layer screen for life and score. The fact is that since you are working for a platform other than a PC, certain C functions do not work, for example the system cls but at this point I have a further question, how do I randomize? because the rand () and srand () function does not give me correct (implicit declaration) how can I solve this problem?
I don’t I’m afraid, as vs code is relatively new you won’t find so many old tutorials using it but it is fast becoming one of the most popular editors for any languages due to it being high quality, cross platform, cross framework and free. I decided to use it as I have been using full visual studio for years so it’s was natural for me to move to using it for most things
@@GamingMonsters I find a solution. something like: set_sprite_data(0, 4, smile); set_sprite_tile(0, 0); move_sprite(0, 55, 75); set_sprite_tile(1, 2); move_sprite(1, 63, 75); Before, i was trying use lot of times "set_sprite_data" function to the same sprite. But it's not necessary (and will not work on this way).
@Po prostu Mateuszek you have to be very careful when declaring variables that you get the type name exactly right you have written u_int8 it should be UINT8. Also Im not sure you meant to write "x - 0" perhaps it should be "x = 0"
@@mondair99 the type UINT8 should be included when you add the include "#include " at the top of your file. Do you have that? If you do but it has a green underline see the beginning of this video th-cam.com/video/yuHpSddyugo/w-d-xo.html
everytime i compile the program, it adds main.asm, main. noi and main.ihx. why is that happening? Also I try to run the rom but it says 'loading rom succeded with warnings'
those files are created as part of the compilation, you can happily ignore them. Im not sure why it would say there are errors when loading the rom, I presume it plays fine? I would checkout my later videos on GBDK 2020 a new improved version that has fewer errors
watching video and doing the exact same but mine comes up with this after i try to get sprite to sow up? C:\Users\Computer\Documents\gameboy code\1-hello world>c:\gbdk\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -c -o main.o main.c main.c(5):warning *** function 'set_sprie_data' implicit declaration C:\Users\Computer\Documents\gameboy code\1-hello world>c:\gbdk\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -o main.gb main.o ?ASlink-Warning-Undefined Global set_sprie_data referenced by module lcc112160
sorry, its hard enough making the words up on the fly let alone making up the right words ;-) Can't promise I don't continue with that one but hope you enjoy the rest anyway
I'm having issues getting my type declarations to work like you have them. You're able to use "UBYTE" or "UINT8" but I can't get that working. For that reason, it's creating errors with some #defines like SHOW_SPRITES, I think. Any ideas? I've never used VSCode before, but I did uninstall it and then reinstall it once (anticipating I'd use it, but never did.). Any help is appreciated :)
Replied on your other thread but I suspect either you don't have the include at the top "#include " or more likely you have a green squiggle under the include, if so see th-cam.com/video/yuHpSddyugo/w-d-xo.html do either of those solve the issue?
dude, im tired of your tutorial. GB studio is out and it sucks, now i come back to your video and still stuck. How did you import all those main. files onto main.c??????? you never showed how to do it in the first video!! I cant move on until you show me how to import all those main. files into the, main.c!!!
Have you tried figuring it out yourself? If you don't know how to drag and drop a file without him showing you, you might need to take a Computers 101 course before you program a game.
@@thesehandlesarestupid271 I finally found out the reason why I couldn't compile is because I needed to install GCC by using code blocks. The sad thing is that 100% of programmers don't know how to help people be well prepared...programmers don't have wisdome, only intellect.
How do I debug my program? I mimicked the code exactly as you put it in your tutorial, but the program wouldn't be compiled. I was abled to comment out lines of code and get it to compile, and then I uncommented one line at a time to test the compiler again, and I found that the move_sprite function wasn't letting the compiler work. I was able to figure out that the reason was because I forgot to put the ; at the end of the line, but not before struggling to find any sort of explanation as to why the compiler suddenly wasn't doing anything. In my other experiences with programming, I've always been able to get error messages from the compiler, such as "main.c:11 Missing semi-colon" or something like that. Is there a way that I can set this up or enable something like that? Because as much as I want to get into this, it will be way too frustrating to run into bugs and have no way to effectively debug them. P.S.: I tried adding the -debug parameter to the bat file, but it wouldn't produce anything unless the program was successfully compiled.
If you are not already switch to using gbdk 2020 (see one of my later videos) as this tends to give more helpful error messages also see my later video on debugging using vscode
Honestly man, thank you for making these. This has been such perfect timing
Yeah I agree! He is an expert
actually it's possible to automate the starting of bgb and rom loading by calling bgb from the .bat file.
open the .bat file and append "pathtobgbexe -rom pathto.gbfile" at the bottom of the .bat file.
For example I use:
C:\Users\Andreas\bgbw64\bgb64.exe -rom C:\Users\Andreas\Documents\GBDK\exp\output\main.gb
Amazing tip, thanks pal! x
I figured there might be a way to do this, but did research the command like for it. I've been developing for a long time, but just started looking into Game Boy dev yesterday. I was actually looking at GB Studio which simplifies development, but they just added some features that allow you some direct control base on GBDK offerings, so now I'm here instead.
It is really weird seeing Gameboy development in C. I spend a lot of time arguing the merits of GBA development in C, let alone Gameboy! That being said, we're seeing people argue the merits of C++ on GBA these days, so I guess C on GB has marched in step with that development.
I also can't believe how old GBDK is. Part of the argument for compiled languages on the GBA is that compiler tools are just so darn good these days that they often produce between assembly than what a human can do - with the GBA being ARM & Thumb based there's been a massive amount of development for tools in this area (I actually retrofitted my Android development tooling for starting out on GBA development). GBDK doesn't really have that going for it, are there any modern or newer attempts at creating a GBDK? Perhaps something LLVM compatible? I understand why this might not be possible considering GB architecture (even on the GBA it's a struggle with the C language not supporting some of the better parts of the GBA architecture).
This is a good tutorial that you've started here; gets hardware graphics on the screen very quickly and easily - something most tutorials oddly avoid.
I’m not aware of anything newer in c. Seem the current community shun it in favour of asm which I get but I think for many people the barrier to starting in asm is too high and they might drop out before they get very far
@@GamingMonsters Yeah I'm understanding of the perceived barrier with assembly. Choosing to do a tutorial in C is definitely the right thing - Gameboy is hip and cool right now so attracting new developers is awesome.
@@Xilefian tattoo finishing dh Dick's sufficiently his ship fatal just had
@@victor_silva6142 wut
@Nixienea just had a look, it's great that someone has decided to update it and keep it going in 2020, we've seen some real awesome GB games written in C recently
1:08 I know it's just an example and not trying to be nitpicky, but Super Mario Land never used the Window layer for the HUD. Instead the screen split was used in similar way to SMB1 to make the upper part not movable and the actual level scrolls normally (Not sure if the invisible sprite tile was needed in order to tell the game where the split starts like in NES games) , while that technique eliminates the ability for the main screen to scroll vertically. The only time the WIN layer was used is when you pause the game showing the text in a corner. : )
cool good to know
well , i've been avoiding C since 2012 lol , i've used all sorts of game engines to make my games , but i guess i gotta rekindle my toxic relationship with C and start this journey to port a small game i made into my gameboy .
thanks for the tutorials brother
thank you for this series.
I would like to point something out, if you want to flip between 1 and 0 quickly just write: currentspriteindex = !currentspriteindex;
no need for the if-else statement.
I try and keep the code samples as readable as possible so tend to leave out less obviously things like this until people get the basics
Oh boy, I don't plan even touching something as extraterrestrial as Gameboy programming, but I'm definitely curious enough to watch it. Great stuff!
Having that dinosaur game on the Gameboy was very funny and cool! Good job! I hope to have the time one day in the near future to put my C programming skills to the test making my own Gameboy games!
What model of Gameboy is that? What models do you generally need to buy in order to run your own games on them, and where can I get one? also, can I run custom Gameboy games on a Nintendo DS also? I have one of the older versions.
that is a gameboy advance but with a modern backlit screen modded. You can get any gameboy the "magic" bit is a gameboy flash cartridge, right now your best value is the EZ Flash Jnr www.ezflashomega.com/products/EZ-Flash-Junior.html.
There are probably gameboy emulators for the DS but you will need a DS flashcart like an R4 cartridge
Just had a funky error thought i'd share: My sprite was just a black square! Turns out I included the sprite.h instead of .c LOL
Thanks, I did the same mistake. Now my game looks normal. I think the program loaded an unitialized sprite containing random numbers which made the sprite look weird.
Yea I made that mistake as well. It's unusual because it's normal to #include the .h rather than .C
it would appear that with the new GBDK 2020 you should now include the header file instead of the .c file as it wouldn't compile for me until I did that, and didn't give me a black square
how do i include more than 2 frames of animation into the animation cycle?
Where the if..else statement if being used to decide which of two sprite index’s to use add an else if. See here for a better explanation of if, else and else if www.programiz.com/c-programming/c-if-else-statement
I had a similar problem with this until i fiddled around with it.
[edit]
So what i did was this.
When you write more frames in, you would do it like this
while(1){
set_sprite_tile(0,1);
delay(30);
set_sprite_tile(0,2);
delay(40);
set_sprite_tile(0,3);
delay(30);
set_sprite_tile(0,4);
delay(60);
set_sprite_tile(0,5);
delay(70);
set_sprite_tile(0,6);
delay(80);
}
That's how i got more frames in. and you can delay time for frame sto be fast, or slow.
Hope that helps!
sprite_Index = (sprite_index + 1) % numer_of_animation_sprites;
I hate that I've only just found this four years after you've posted. Thank you so much for this wonderful and instructive series. As a child, I owned and played the original Game Boy - that big grey brick that subsisted on four AA batteries, three square meals a day - and it, along with my NES, was such an important part of my childhood. I loved video games, and I played them incessantly throughout my adolescence and young adulthood. More than thirty years later, I've returned to college to complete a computer science degree, and finding something like this... it's just really something. I can't imagine trying to explain to my child self that one day I would be able to *create* my own games and potentially share them with friends.
As stressful and disappointing as the real world can be sometimes, it's really incredible to find something like this that rekindles a child-like sense of awe and inspires so many creative possibilities. Seriously, @GamingMonsters, thank you so much for this.
Thanks for sharing your story, it’s always great to hear others being inspired to fulfill the dream of making your own game
@@GamingMonsters Do you plan on making any more videos?
You could have used. No need for the if statement as there's only two possible values that you're using.
currentSpriteIndex = !currentSpriteIndex
set_sprite_tile(0, currentSpriteIndex);
I could but I try to write examples for non programmers that keep the logic more obvious, good to have this comment here though for more advanced users
or currentSpriteIndex = currentSpriteIndex == 0;
Although I'm not too interested in Game Boy development from scratch due to GB Studio's existence and how weak the hardware is (GBA is my minimum for good gameplay experience), your guide on displaying sprites gets to the point while being thorough. The part of programming courses that I hate the most is that they always start with the command line and never move beyond ASCII; hopefully I can translate these lessons over to the SGDK, another C-based IDE that gets little love in preference of assembly.
Granted, what platform I'd die for an SDK is the SNES, but beggars can't be choosers, and these kind of projects need more traction first.
Thank you! It's great video. It's great tutorial.
Is there tile designer for mac user?
I found your repository. github.com/gingemonster/GameBoyPngConverter
Thanks!
Followed this after fixing an issue and all I get is four black dots in the middle of the screen, not the sprite.
Figured it out. I was using the header file instead of the c file.
Nice! Visual Boy Advanced? and What is your preferred method to flash the ROM?
Now, where have I seen that dino game before?... Might have to Google it... oh, no. My internet connection has gone
hey, i want to load a 16x16 sprite but it just shows an older sprite i was using for testing, any help?
Hello!
i couldn't gb/gb.h in C and its is also says "Error type.h:no such file or directory"
I don't know what i have to do(i'm using Embarcadero DEV-C++ 6.3
Check comments in the first video in the series there should be some with these kinds of errors and suggestions for fixing
This is brilliant! Any chance you'll be making GBC upgrades to support colors? I'd love to make something on that system.
Check out the series playlist th-cam.com/play/PLeEj4c2zF7PaFv5MPYhNAkBGrkx4iPGJo.html and you will find a gameboy color tutorial
@@GamingMonsters Thank you so much for the reply. Also, I've been looking online and was wondering, would writing while(true) be bad practice in this scenario?
Cheers GM! Also, ignore my comment in the first tut, it's solved (forgot to save, hehe).
Yes while(true) would work the same
Hey dude, very good video.
Excellent video again!
this doesn't work for me, all I get is a blank screen and bgb's VRAM viewer has a red line through all the sprite tiles if I click on the OAM tab
7:53 Why did you say single quotes? They're double quotes. Confused the crap out of me when my code wouldn't run. Also, on the previous lesson it's 'sdio.h', you say 'sdia'. Don't get me wrong, I appreciate and am enjoying the tutorials, just pointing out some bits that are unclear.
Thanks mick, I’ll see if there is any way for me to correct those in annotations.
too small code size
I'm working on Mac, specifically Catalina, and Catalina no longer has support for 32-bit programs, making programs like Wine unusable. Is there a Mac-friendly alternative to this sprite-making program, or another way I could emulate this sprite making program?
Thannnnk you for these videos
Is there a way that I can animate a sprite at a different speed than the main while loop? Like a kind of local delay function. I've tried using two separate while loops, but that just freezes up the emulator. I intend on making a space invaders-esque game, and I'd like the enemies to not be animated at the speed of sound lol
You can write some code that skips animation every x loops through the main loop using something like the modulus operator in c and a count variable that is incremented by ever loop
@@GamingMonsters well, I ended up figuring it out in a very sub-optimal way, but it still works. I ended up using four variables in a few if-else statements and it ended up giving the enemies a kind of pattern to their animation. I tested variable values in a separate script and let it output either 0, 1, or 2. I used the statements that returned 0 and 2. The pattern that the if statements take looks something along the lines of 012111011211011121011110
I can send you the if statements if you’d like to see :)
when i want to make a bigger sprite, it just cuts leaving my character in tiny parts
Maybe watch the later metasprites video?
Thank you daniel
How can i show multiple sprites on the screen?
i understand that the white in sprites are transparent but how does the game Kid Dracula manage to make the white not transparent against a background?
The first colour in the pallete you choose (or the default pallette) is used as the transparent color so if you set white as the 2,3 or 4th color then it will display
@@GamingMonsters Thanks for pointing that out. :-)
This is a fantastic guide, but I have a question for you. How did you manage to enter the text without repeating it? I tried with Printf but it keeps repeating me on screen. how do i solve this problem?
If it’s repeating your text it’s because your printf line is within the while loop perhaps?
@@GamingMonsters yes yes in the end I solved, I used the Font and then the Layer screen for life and score. The fact is that since you are working for a platform other than a PC, certain C functions do not work, for example the system cls
but at this point I have a further question, how do I randomize? because the rand () and srand () function does not give me correct (implicit declaration) how can I solve this problem?
@@corradotrigilia6989 github.com/gbdk-salvage/grooves-game-boy-programming/blob/master/16%20-%20random/random.c
Great video!
I see you using vs code but I see tutorial sand most are in code blocks and I want to learn c in vs code, do you have any recommendations?
I don’t I’m afraid, as vs code is relatively new you won’t find so many old tutorials using it but it is fast becoming one of the most popular editors for any languages due to it being high quality, cross platform, cross framework and free. I decided to use it as I have been using full visual studio for years so it’s was natural for me to move to using it for most things
THIS IS SO AWESOME!!!!!!!
for me it says UINT8 doesnt exist
How would i render more than 1 sprite
Is there a way to rotate sprites?
I want to create a big asteroid with sprites wich are using the same texture just rotated.
See the later video in the series on sprite flipping
@@GamingMonsters Ah thank you!
I'll try buying the game maybe.
Can i use 2 different sprites in my game
If i do this, the second sprite is not on the screen
can you email your code to gaming@gingemonster.com and Ill take a look
Great videos, man. Can you set the same sprite more that one time? I'm trying but... :(
You can change the tile the sprite uses whenever you want it that’s what you mean?
@@GamingMonsters I find a solution. something like:
set_sprite_data(0, 4, smile);
set_sprite_tile(0, 0);
move_sprite(0, 55, 75);
set_sprite_tile(1, 2);
move_sprite(1, 63, 75);
Before, i was trying use lot of times "set_sprite_data" function to the same sprite. But it's not necessary (and will not work on this way).
Dear, i made sprite but it blinking and moving right to left very fast as compared to your video. What could be the reason for this ?
Do you have the line of code that’s starts delay(1000) and is it in the right place?
@@GamingMonsters thank you delay(1000) was not at the right place.
I never get a .h file when I export the tiles
why if block the current sprite index rather than modulo it
Modulo is currently very slow in gbdk but is being improved
I have parsing error with UINT8. Do I need to use diffrent symbol or try just a diffrent command?
can you post your code somewhere?
drive.google.com/open?id=1m8pizdh8QOyXphs2BbdjUS2_Be_HcSOG
@Po prostu Mateuszek you have to be very careful when declaring variables that you get the type name exactly right you have written u_int8 it should be UINT8. Also Im not sure you meant to write "x - 0" perhaps it should be "x = 0"
@@GamingMonsters my error, mentioned in a comment here recently, is not this problem. I have typed UINT8 and it didn't know that type.
@@mondair99 the type UINT8 should be included when you add the include "#include " at the top of your file. Do you have that? If you do but it has a green underline see the beginning of this video th-cam.com/video/yuHpSddyugo/w-d-xo.html
How can you make a GB color game as opposed to just a gameboy game?
see th-cam.com/video/xbXcvB87ClU/w-d-xo.html and th-cam.com/video/uD6-SlJlzQY/w-d-xo.html
everytime i compile the program, it adds main.asm, main. noi and main.ihx. why is that happening?
Also I try to run the rom but it says 'loading rom succeded with warnings'
those files are created as part of the compilation, you can happily ignore them. Im not sure why it would say there are errors when loading the rom, I presume it plays fine? I would checkout my later videos on GBDK 2020 a new improved version that has fewer errors
Can I make game using Assembly?
Yes you can take a look at gbdev.io/gb-asm-tutorial/
How would I animate my sprite when it has 4 animation tiles instead of 2?
So I found out about the extra else if().
I tried using it but I got an adress overflow. Any way to fix this?
Can you paste the entire error here, reading the detail may give you more of a clue what’s wrong
It gives the error when I run the bat file
"main.c:0: error:malformed option `-D USE-SFR-FOR-REG'"
Check the make.bat file, make sure there's no space in between -D and USE-SFR-FOR-REG, it should read -DUSE_SFR_FOR_REG
watching video and doing the exact same but mine comes up with this after i try to get sprite to sow up? C:\Users\Computer\Documents\gameboy code\1-hello world>c:\gbdk\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -c -o main.o main.c
main.c(5):warning *** function 'set_sprie_data' implicit declaration
C:\Users\Computer\Documents\gameboy code\1-hello world>c:\gbdk\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -o main.gb main.o
?ASlink-Warning-Undefined Global set_sprie_data referenced by module lcc112160
Because the line is set_sprite_data not set_sprie_data and the error is telling you it can’t find a function called that
@@GamingMonsters now it says this?PS C:\Users\Computer\Documents\gameboy code\1-hello world> .\make.bat
C:\Users\Computer\Documents\gameboy code\1-hello world>c:\gbdk\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -c -o main.o main.c
main.c(6) parse error: token -> 'smile' ; column 29
main.c(9):error *** code not generated for 'main' due to previous errors
C:\Users\Computer\Documents\gameboy code\1-hello world>c:\gbdk\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -o main.gb main.o
Can you zip up all your code and email to gaming@gingemonster.com I’ll take a look
this is awesome. but it really bugs me that you call statements functions
sorry, its hard enough making the words up on the fly let alone making up the right words ;-) Can't promise I don't continue with that one but hope you enjoy the rest anyway
how do i make a gbc game?
see the later videos on color
For some reason when i compile it makes a copy of hello world
As in the gb file it creates when loaded is the helloworld tutorial not the sprites one?
GamingMonsters yes
Can you zip and send me all the code gaming@gingemonster.com
@@GamingMonsters Hi there,
did you happen to find out why this is happening? I'm having the same issue.
Thank you so much for making these videos!
@@Myersjes99 I dont believe they ever sent me their code, please zip yours and send it over
Where can i download this rom?
github.com/gingemonster/GamingMonstersGameBoySampleCode/tree/master/01_helloworld
@@GamingMonsters Thanks a lot!
I'm having issues getting my type declarations to work like you have them. You're able to use "UBYTE" or "UINT8" but I can't get that working. For that reason, it's creating errors with some #defines like SHOW_SPRITES, I think. Any ideas? I've never used VSCode before, but I did uninstall it and then reinstall it once (anticipating I'd use it, but never did.). Any help is appreciated :)
Replied on your other thread but I suspect either you don't have the include at the top
"#include "
or more likely you have a green squiggle under the include, if so see th-cam.com/video/yuHpSddyugo/w-d-xo.html
do either of those solve the issue?
That’s just the chrome dinosaur game
It is indeed I credit chrome almost everywhere I talk about it for example gaming-monster.itch.io/dinos-offline-adventure
Funny thing is, you'll always be offline with an old Gameboy! 😂
www.devrs.com/gb/hmgd/gbtd.html
the link to the tile designer
make part 3 or we riot
errr check out the playlist and channel we are up to part 23
@@GamingMonsters oh dear i thought there was no part 3 cuz the youtube sidebar didnt show it. Sorry!
Gameboy developer kit is a virus😟😟😟
dude, im tired of your tutorial. GB studio is out and it sucks, now i come back to your video and still stuck.
How did you import all those main. files onto main.c???????
you never showed how to do it in the first video!!
I cant move on until you show me how to import all those main. files into the, main.c!!!
Have you tried figuring it out yourself? If you don't know how to drag and drop a file without him showing you, you might need to take a Computers 101 course before you program a game.
@@thesehandlesarestupid271 I finally found out the reason why I couldn't compile is because I needed to install GCC by using code blocks. The sad thing is that 100% of programmers don't know how to help people be well prepared...programmers don't have wisdome, only intellect.
How do I debug my program? I mimicked the code exactly as you put it in your tutorial, but the program wouldn't be compiled. I was abled to comment out lines of code and get it to compile, and then I uncommented one line at a time to test the compiler again, and I found that the move_sprite function wasn't letting the compiler work.
I was able to figure out that the reason was because I forgot to put the ; at the end of the line, but not before struggling to find any sort of explanation as to why the compiler suddenly wasn't doing anything. In my other experiences with programming, I've always been able to get error messages from the compiler, such as "main.c:11 Missing semi-colon" or something like that. Is there a way that I can set this up or enable something like that? Because as much as I want to get into this, it will be way too frustrating to run into bugs and have no way to effectively debug them.
P.S.: I tried adding the -debug parameter to the bat file, but it wouldn't produce anything unless the program was successfully compiled.
If you are not already switch to using gbdk 2020 (see one of my later videos) as this tends to give more helpful error messages also see my later video on debugging using vscode