This video is where the concept of making something became real. I always thought everything would be too advanced for myself to understand but it's clicking now, thanks!
Your methodology of teaching and showing is firstly really amazing.. i hope you won't stop doing videos after this gameboy project is over.. maybe you can try doing same for consoles..Sega
You function applies values to playerPosition before it checks for collision, so player position when landing with one of the numbers is odd the Y element of player position will be 1 tile below the defined floor level.
Great video again. For me this subject is not really relevant since my game has a top down view, but nice to see this ‘bigger program’. I’m also hoping a video on collision detection in the future.
Your videos really helpful, thank you! But I have a couple of suggestions. 1) Add the theme of the video at the beginning of the title (e.g. "Jumping") 2) Add the theme of the video to the thumbnail picture I think it would help alot in navigation, especially on mobile!
@@GamingMonsters I second this suggestion. It's hard to pick out the next video, or go back and re-watch. Otherwise, really enjoying the series. Thanks!
Im half way through your course and I love it. Fairly easy to pick up. I looked at your remaining videos "by title" and I would like to ask if there is more videos in the works? I camt see anything about switching levels / screens etc? Thank you.
I took a break for a few months but have started up again recently. There are two news ones on music and two I'm still producing. Ill add your ideas to my increasingly long list ;-)
What is the diffrence between: joypad() == J_A and joypad() & J_A ? One thing I can see is when I use joypad() == J_A I cant jump and move at the same time. Is it the only one diffrence?
Dear, this jump function work best on a horizontal surface if surface have different floorpositon than what should be done? or how a sprite can jump on another sprite and stay at its top???
So I have been following your tutorials for a bit and making my own game. I am having a bit of trouble and was wondering if you can help me out. Im trying to combine jumping, gravity, and collision. so i can make a little side scroller or even a maze based game much like your key one. I have it to where it collides and jumps correctly but i cant get it to land on levels higher or lower than what i set "floorYlevel" to be. How would you go about making a check to see what level or object they can land on and walk on?
Yes a full platform style physics is not easy to grasp, I haven’t even got it perfect myself. Hopefully one day I’ll do a tutorial on this but not for a while
you have to write some code to do that that handles the button event using joypad() and then checks whether they are still pressing the button every game loop if they are pressing the button set your own variable named something like "buttonispressed" to true and do not action the press. As soon as joypad() no longer saying they are pressing the button you can set "buttonispressed" to false and you know the next time joypad() detects the button being pressed it is a new press and you action it. I do this in my game github.com/gingemonster/DinosOfflineAdventure/blob/master/main.c line 774
@@GamingMonsters Thank you for this. I got it to work now but i ran into some new problems. I setup up two buttons for this. Jump is A button and Right is move the sprite to the right. it works fine when i pressed the buttons one at a time and even when i held the right button and press the a button it moves and jumps as predicted when a is pressed while holding the right button. the problem im running into is when i hold the a button for jump and press the right button, the sprite jumps before it moves forward. i want it so when i press and hold the jump button, when i press the right button to move, the sprite just moves to the right without the jump. github.com/obscuredesign79/gameboyC/tree/master/08jumpingAdvanced this github repos is based on your tutorials and i wholeheartedly thank you for this. i tried to learn doing things in assembly and i have a hard time getting my heard wrap around it. your method of teaching is the best ive seen.
@@GamingMonsters Thank you so much GamingMonsters. i did post about this on gbdev.gg8.se/forums/viewtopic.php?id=658 and the best reply i got was this: I can answer that instead of just having the current state of the keys (obtained from the function joypad()) I also keep a copy of the previous state So checking if a key has been ticked is just checking if it is currently pressed but it wasn't on the previous state You can see how all this work here github.com/Zal0/ZGB/blob/master … ude/Keys.h I call UPDATE_KEYS on every frame github.com/Zal0/ZGB/blob/2b6302 … ain.c#L120 Hope it helps id like to thank Zalo for the reply. the problem now is that im having hard time understanding the code since im just new at programming in general. it made sense but implementing it in the code is another story. hope gamingmonster can explain it better. thanks
Its significant anywhere you write c. INT8 can store -128 to 127 UINT8 is unsigned so can store 0-255. Most of the time you can therefore use UINT8 unless you are doing things like offsets that may go negative
i cannot jump . i enter all of the code from the source but it is just wont work ? how can i fix this ? edit : i figure it out it is because of the emulator
Your code doesn't work, I have at the beginning your little sprite, and when I press Right or Left, it disappears. The code is copy pasted from yours, so what ?
Hey there, I get a warning and an error message when I compiler my file: main.c: 31 warning 112: function 'wouldhitsurface' implicit declaration And main.c:31: error 101: too many parameters How can i fix this since it is on the same Line and i can't find any solutions or errors inside of the video
ALSO! The code given in the GitHub doesn't work for me as well and it simply gives me the following: main.c:59: warning 94: comparison is always true due to limited range of data type main.c:64: warning 126: unreachable code (this is shown 8 times in my Terminal) main.c:6: warning 158: overflow in implicit constant conversion I am not sure what is happening since I tried mutiple ways of fixing my issue: I worked out the code again (with my own assets in the folder) I copied/typed over all of the code inside of the github lastly I tried a full 100%, NO editing to the code, copy paste with this new issue.
Looks like you are using the new gbdk2020? You should indeed be using this newer version but I have not yet gone back through all the tutorials to check for issues. I can replicate what you see so I’ll try and fix it
@@GamingMonsters Thanks for replying so quickly :) Yeah i am currently using the 2020 version of gbdk2020. Until this Tutorial i had no problems nor bugs. I really like your Tutorials as they are easy to Follow and make me understand the code better than forums. Keep it up👍🏻
Ok now fixed on github: github.com/gingemonster/GamingMonstersGameBoySampleCode/blob/master/08_simplejumping/main.c This code is correct (old code wasnt) and for me at least compiles on gbdk2020 and original gbdk I have added a warning to the video description, thank you for your help in identifying this. I would not be surprised if there are similar issues in following videos so please let me know
Here is how I written my way of jumping: gist.github.com/ViniDalvino/c3d34935024461da7557d6a535450e6b I am curious to see what you guys think of the way I did the jumping.
This works, the only issues is that nothing else can happen in your game until the jump is complete because all of the jump is processed during a single loop of the game loop (the "while (1)"). If you compare it to my code: github.com/gingemonster/GamingMonstersGameBoySampleCode/blob/master/08_simplejumping/main.c You can see each step of the jump is processed in a new call of the game loop so if you expanded the code to add something like platform detection or enemies you would be able to process these other parts of the game at the same time. Does that make sense?
This video is where the concept of making something became real. I always thought everything would be too advanced for myself to understand but it's clicking now, thanks!
This series in incredible - you are a living legend, sir.
Thank you for sharing your knowledge in such an easy-to-digest and non-patronising manner.
Your methodology of teaching and showing is firstly really amazing.. i hope you won't stop doing videos after this gameboy project is over.. maybe you can try doing same for consoles..Sega
You function applies values to playerPosition before it checks for collision, so player position when landing with one of the numbers is odd the Y element of player position will be 1 tile below the defined floor level.
Just watching out of curiosity but want to say you are a great programming teacher.
This is so much fun to follow along to! Thanks for making this series GamingMonsters!
That C book you recommend is my favorite. My first C book
Great video again. For me this subject is not really relevant since my game has a top down view, but nice to see this ‘bigger program’. I’m also hoping a video on collision detection in the future.
Your videos really helpful, thank you!
But I have a couple of suggestions.
1) Add the theme of the video at the beginning of the title (e.g. "Jumping")
2) Add the theme of the video to the thumbnail picture
I think it would help alot in navigation, especially on mobile!
Thank you for your suggestions I will look at how I can do that
@@GamingMonsters I second this suggestion. It's hard to pick out the next video, or go back and re-watch. Otherwise, really enjoying the series. Thanks!
thanks both, you may have noticed I have started going back through thumbnails doing this. Will be doing the titles and remaining thumbs soon
Im half way through your course and I love it. Fairly easy to pick up. I looked at your remaining videos "by title" and I would like to ask if there is more videos in the works? I camt see anything about switching levels / screens etc? Thank you.
I took a break for a few months but have started up again recently. There are two news ones on music and two I'm still producing. Ill add your ideas to my increasingly long list ;-)
This was a good one! Can't wait for collision detection. :)
Me too
Why is gravity a uint? It will come out to +254, but then you overflow the speed and get the right value, so it does not matter.
Another awesome video buddy!
hey, I tried to use the same method with the meta sprites tutorial, but the character only goes down
Please keep these videos coming.
What is the diffrence between: joypad() == J_A and joypad() & J_A ?
One thing I can see is when I use joypad() == J_A I cant jump and move at the same time. Is it the only one diffrence?
Dear, this jump function work best on a horizontal surface if surface have different floorpositon than what should be done? or how a sprite can jump on another sprite and stay at its top???
So I have been following your tutorials for a bit and making my own game. I am having a bit of trouble and was wondering if you can help me out. Im trying to combine jumping, gravity, and collision. so i can make a little side scroller or even a maze based game much like your key one. I have it to where it collides and jumps correctly but i cant get it to land on levels higher or lower than what i set "floorYlevel" to be. How would you go about making a check to see what level or object they can land on and walk on?
Yes a full platform style physics is not easy to grasp, I haven’t even got it perfect myself. Hopefully one day I’ll do a tutorial on this but not for a while
when did he program up bloke in gbtd??? i cant find this part. ive followed every video
I'm over a year late but i'm catching up. Easy peasy so far.
I love these videos!
how do you set the joypad or jump method to jump only once when the button is held?
you have to write some code to do that that handles the button event using joypad() and then checks whether they are still pressing the button every game loop if they are pressing the button set your own variable named something like "buttonispressed" to true and do not action the press. As soon as joypad() no longer saying they are pressing the button you can set "buttonispressed" to false and you know the next time joypad() detects the button being pressed it is a new press and you action it. I do this in my game github.com/gingemonster/DinosOfflineAdventure/blob/master/main.c line 774
@@GamingMonsters Thank you for this. I got it to work now but i ran into some new problems. I setup up two buttons for this. Jump is A button and Right is move the sprite to the right. it works fine when i pressed the buttons one at a time and even when i held the right button and press the a button it moves and jumps as predicted when a is pressed while holding the right button. the problem im running into is when i hold the a button for jump and press the right button, the sprite jumps before it moves forward. i want it so when i press and hold the jump button, when i press the right button to move, the sprite just moves to the right without the jump.
github.com/obscuredesign79/gameboyC/tree/master/08jumpingAdvanced
this github repos is based on your tutorials and i wholeheartedly thank you for this. i tried to learn doing things in assembly and i have a hard time getting my heard wrap around it. your method of teaching is the best ive seen.
obscuredesign79 I’ll try and take look asap
@@GamingMonsters Thank you so much GamingMonsters. i did post about this on gbdev.gg8.se/forums/viewtopic.php?id=658 and the best reply i got was this:
I can answer that
instead of just having the current state of the keys (obtained from the function joypad()) I also keep a copy of the previous state
So checking if a key has been ticked is just checking if it is currently pressed but it wasn't on the previous state
You can see how all this work here github.com/Zal0/ZGB/blob/master … ude/Keys.h
I call UPDATE_KEYS on every frame github.com/Zal0/ZGB/blob/2b6302 … ain.c#L120
Hope it helps
id like to thank Zalo for the reply. the problem now is that im having hard time understanding the code since im just new at programming in general. it made sense but implementing it in the code is another story. hope gamingmonster can explain it better. thanks
I keep getting this error when i use the BYTE : main.c(17):error *** Old style C declaration. IGNORED 'player'
This also works for gba game?
You might have explained this in a previous video but I don't remember - what is the significance of INT8 vs. UINT8 when programming for the GameBoy?
Its significant anywhere you write c. INT8 can store -128 to 127 UINT8 is unsigned so can store 0-255. Most of the time you can therefore use UINT8 unless you are doing things like offsets that may go negative
i cannot jump . i enter all of the code from the source but it is just wont work ? how can i fix this ?
edit : i figure it out it is because of the emulator
amazing video thank you
There are no methods in C btw. There are just functions and procedures :)
Yeah I can’t stop myself saying method though :-)
Your code doesn't work, I have at the beginning your little sprite, and when I press Right or Left, it disappears.
The code is copy pasted from yours, so what ?
EDIT : the sprite was going backward for the first time, and when you press Right, it goes a little bit down, so I manage to find it.
Hey there,
I get a warning and an error message when I compiler my file:
main.c: 31 warning 112: function 'wouldhitsurface' implicit declaration
And
main.c:31: error 101: too many parameters
How can i fix this since it is on the same Line and i can't find any solutions or errors inside of the video
ALSO!
The code given in the GitHub doesn't work for me as well and it simply gives me the following:
main.c:59: warning 94: comparison is always true due to limited range of data type
main.c:64: warning 126: unreachable code (this is shown 8 times in my Terminal)
main.c:6: warning 158: overflow in implicit constant conversion
I am not sure what is happening since I tried mutiple ways of fixing my issue:
I worked out the code again (with my own assets in the folder)
I copied/typed over all of the code inside of the github
lastly I tried a full 100%, NO editing to the code, copy paste with this new issue.
Looks like you are using the new gbdk2020? You should indeed be using this newer version but I have not yet gone back through all the tutorials to check for issues. I can replicate what you see so I’ll try and fix it
@@GamingMonsters Thanks for replying so quickly :)
Yeah i am currently using the 2020 version of gbdk2020. Until this Tutorial i had no problems nor bugs.
I really like your Tutorials as they are easy to Follow and make me understand the code better than forums. Keep it up👍🏻
Ok now fixed on github:
github.com/gingemonster/GamingMonstersGameBoySampleCode/blob/master/08_simplejumping/main.c
This code is correct (old code wasnt) and for me at least compiles on gbdk2020 and original gbdk
I have added a warning to the video description, thank you for your help in identifying this.
I would not be surprised if there are similar issues in following videos so please let me know
@@GamingMonsters
Thanks again :)
I Will continue the tutorials as usual and try to see if I can spot other bugs or issues
Here is how I written my way of jumping: gist.github.com/ViniDalvino/c3d34935024461da7557d6a535450e6b I am curious to see what you guys think of the way I did the jumping.
This works, the only issues is that nothing else can happen in your game until the jump is complete because all of the jump is processed during a single loop of the game loop (the "while (1)").
If you compare it to my code:
github.com/gingemonster/GamingMonstersGameBoySampleCode/blob/master/08_simplejumping/main.c
You can see each step of the jump is processed in a new call of the game loop so if you expanded the code to add something like platform detection or enemies you would be able to process these other parts of the game at the same time.
Does that make sense?