Open Gabumach opened 4 weeks ago
Hello!
So this is technically possible, but it's going to be pretty tough, and it's not something I'd recommend to someone new to the tool or retro development.
The problem is how levels are laid out (relevant chapter). The map generator breaks levels into rooms that are 16 tiles wide by 12 tiles high, which covers a 256px by 192px area. In addition to the tiles, each room contains 32 bytes of sprite information and 32 bytes of padding. If you extend the data you are pulling from the map in your game without changing the map data, you end up trying to draw the sprite data as map tiles, resulting in drawing garbage textures. (Or potential crashes)
It's definitely possible to do, but a tutorial on this would be the most complicated and difficult chapter in the guide, so I am not inclined to write it at this time.
That said, depending on what you want to do I do see a workaround! If you had the current map area centered on the screen without the hud, would that be good enough?
If so, I would update the hud to have almost no data in it, then look at how we use the scroll()
method in map.c - you can play with these values to get it more centered on the screen.
A couple disclaimers about this:
HUD_PIXEL_HEIGHT
for now, as this controls where our sprite0 split happens, and could cause crashes when going between screenssplit()
and split_y()
) Due to the complexity of the topic I do not plan to write a tutorial on this, but if I can help you further for your case, let's continue the conversation!
Thank you so much for the response, I appreciate it a lot! I was able to make some progress using your instructions, and now the hud looks like this: Is there any way to remove it completely and how do I increase the level size? I'm trying to recreate this game and already got the palette working in my homebrew rom.
So unfortunately, making bigger maps is going to be somewhat difficult. I outlined the basic steps above, here's a bit more detail:
HUD_PIXEL_HEIGHT
to be 8px, then update the sprite zero position to match that.I know that's a bit loose, and definitely not to the level I write chapters in this guide, but I hope that's a good starting point.
Hello! Is it possible to fully remove hud from the game, and let the game use the entire screen for a map? When I try to do it, it ends up in garbage textures or sometimes, game freezing when I try to go to a different room. I apologize if I sound stupid, but I'm a complete newbie to C and this guide in general.
Thanks in advance!