Let's use the new Replace Tile At Position function in GB Studio 4 to make an inventory menu for our Game Boy game! #gbstudio #gamedevelopment #gameboy #inventory #tileswap
@@codepetersen Thank you, I was thinking of something in the style of Gremlins 2: The New Batch for the NES. I imagine simulating a "jump" would be fairly straightforward, but it would also be necessary for the player to be able to bypass obstacles that would normally harm them and to be able to jump anytime and anywhere.
When you get to more than one scene to press Start on, use event 'Store Current Scene On Stack' and 'Restore Previous Scene From Stack' to save your current scene and restore back to it on your 'menu close'. Great tutorial as always!
I have another question for you… when I return from the game menu the scene starts from the beginning, is there a way to resume the scene as it was before the menu? I hope I explained myself well.
@@luxbut Yes!! Before you leave the screen you need to set a global variable to actor x position and one for y position, then on init move actor x and y position to those variables. If that makes sense. I can certainly make a video for that!
@@codepetersen Maybe a video is better :) ... the actor holds the position but the "enemies" and the whole level start again as if I entered for the first time ... example, if I kill a dragon and go to the menu to change weapon, when I return from the menu the dragon is there again
Great question! At this point, we have to use a unique tile to do this, which can be an extreme challenge. What I sometimes do, is create a tile with one pixel on the edge being a different color. It is inconvenient and a waste of a tile, but that is the only way I have been able to effectively do this at this point in time. Hopefully in an update down the road, there will be an option to change a specific instance of a tile!
@@codepetersen I found the solution, it's simpler than I thought... when you press the button the first command should be "remove script input all button"
I want to provide a quick idea for polishing this concept. 1) Do mostly everything you did except on your items use a value instead of t/f (default value being 0 so you don't have to set it explicitly) 2) On your inventory menu create a Switch event for each slot. Set the Global variable for each actor with 2 options. 3) In your Switch 0, swap the tile with a "?" tile or whatever you want the default to display. 4) In the Level and on each actors On Interact collision, run an event that sets the variable value to 1 (then the deactivate event, etc...) 5) Back on the Inventory menu, in each Switch 1, set the swap to the item you would like to display! --- I've been watching your videos since you started and appreciate you sharing with the community! I made an inventory with GBVM similarly and it's been fun to revisit a childhood love of Game Boy. Keep up the great work!
@@thedoubledropdown Thank you for the feedback! Very helpful!! Also thanks for taking the time to check out my videos and for posting! The GB studio community is amazing, and I love learning with everyone!!
Awesome@@codepetersen we have been spending this year making a game. If you want to see the inventory I described in action, check out our Itch build. It's linked on our website.
Thanks but that s not a réal inventory: if you use the heart there is a blank Space in the begining. Maybe with a variable « count item you can érase all thé gaps. Like a réal v box
@@jojomomo3069 another thing you could do is have the picture with a number underneath each one. I am making a game that will have several items that can be collected, and wanted an inventory page to keep track of what I found.
@@jojomomo3069 you are limited to the size of a cartridge you want it on, but there is a save progress feature. I bet you would be surprised at what you can make as we learn how to do more with it.
That's exactly what I looked for! Thank you!
Thanks for the tutorial. Have you ever considered trying to make a tutorial on how to make a top-down platformer in GB Studio?
@@Graywyck I'll sure look into that and add it to the list! Thank you for watching and the suggestion!
@@codepetersen Thank you, I was thinking of something in the style of Gremlins 2: The New Batch for the NES. I imagine simulating a "jump" would be fairly straightforward, but it would also be necessary for the player to be able to bypass obstacles that would normally harm them and to be able to jump anytime and anywhere.
@Graywyck great idea!
When you get to more than one scene to press Start on, use event 'Store Current Scene On Stack' and 'Restore Previous Scene From Stack' to save your current scene and restore back to it on your 'menu close'.
Great tutorial as always!
@@ChunkySteveo thank you!!
I have another question for you… when I return from the game menu the scene starts from the beginning, is there a way to resume the scene as it was before the menu? I hope I explained myself well.
@@luxbut Yes!! Before you leave the screen you need to set a global variable to actor x position and one for y position, then on init move actor x and y position to those variables. If that makes sense. I can certainly make a video for that!
@@codepetersen Maybe a video is better :) ... the actor holds the position but the "enemies" and the whole level start again as if I entered for the first time ... example, if I kill a dragon and go to the menu to change weapon, when I return from the menu the dragon is there again
Good video. But how can I change just one tile when there are several identical ones, because they all get changed.
Great question! At this point, we have to use a unique tile to do this, which can be an extreme challenge. What I sometimes do, is create a tile with one pixel on the edge being a different color. It is inconvenient and a waste of a tile, but that is the only way I have been able to effectively do this at this point in time. Hopefully in an update down the road, there will be an option to change a specific instance of a tile!
sorry, I really like your tutorials... but what if I have more scenes? I added the "stacks" but after 4 scenes I get a kernel error
I'm so glad you like them, and I love the questions!! I will do some digging, and see if I can find a solution for this!
@@codepetersen thank you so much
@@codepetersen I found the solution, it's simpler than I thought... when you press the button the first command should be "remove script input all button"
@@luxbut Great find! That is much easier than I thought it would be too! I appreciate you sharing!!
I want to provide a quick idea for polishing this concept.
1) Do mostly everything you did except on your items use a value instead of t/f (default value being 0 so you don't have to set it explicitly)
2) On your inventory menu create a Switch event for each slot. Set the Global variable for each actor with 2 options.
3) In your Switch 0, swap the tile with a "?" tile or whatever you want the default to display.
4) In the Level and on each actors On Interact collision, run an event that sets the variable value to 1 (then the deactivate event, etc...)
5) Back on the Inventory menu, in each Switch 1, set the swap to the item you would like to display!
---
I've been watching your videos since you started and appreciate you sharing with the community! I made an inventory with GBVM similarly and it's been fun to revisit a childhood love of Game Boy. Keep up the great work!
@@thedoubledropdown Thank you for the feedback! Very helpful!! Also thanks for taking the time to check out my videos and for posting! The GB studio community is amazing, and I love learning with everyone!!
Awesome@@codepetersen we have been spending this year making a game. If you want to see the inventory I described in action, check out our Itch build. It's linked on our website.
@@thedoubledropdown Absolutely I do! I can't wait to check it out!
Thanks but that s not a réal inventory: if you use the heart there is a blank Space in the begining. Maybe with a variable « count item you can érase all thé gaps. Like a réal v box
@@jojomomo3069 another thing you could do is have the picture with a number underneath each one. I am making a game that will have several items that can be collected, and wanted an inventory page to keep track of what I found.
Im not sure if you can make big games on it .
@@jojomomo3069 you are limited to the size of a cartridge you want it on, but there is a save progress feature. I bet you would be surprised at what you can make as we learn how to do more with it.
@@codepetersen my attempt was to make a big rpg. More data you put in the Engine more it is lagging.