This is pretty fun! Not sure how you made 10000 non-procedurally-generated levels, that's amazing :-o
Viewing post in INTERBLOCKED [Game Boy] comments
Thanks! Technically they ARE procedurally generated but they are done so by a much more high powered processor then the gbz80 would be able to do. I suppose one could make the game generate levels but I don't think they would be good/complex/varried. What the Game Boy is doing with the levels is loading the premade levels from rom. This required them to be very very compressed and did that by making use of every single bit to represent data. 36 different block positions with 4 different block types. That is 1 byte. Then the keyblock's position (only 4 not 36) represents another 2 bits and so the rest of the keyblock byte doubles as a header :)
No, I love great questions! Yes exactly 1 Byte per block. 1 Byte for the key block and header. I basically search through each Byte for the header flag. When I find one I loop that 122 more times, it then stops at header 123 and then loads the blocks after it until the next header/keyblock byte. If you're curious I have a header byte for level 10001 so that it knows how to load level 10000 :). You might think that it's slow to do that, but it's about 1300ish levels in each rom bank and I have constants to determine which rom bank to search based on which level is being loaded. So at most it takes maybe half a second to find the correct level to load. I think my largest level is 16 blocks but I can't remember with 100% certainty.