So, after a terrible incdent at the start of the bank holiday weekend, I pulled myself together today and spent a lovely day with the kids then, coded up some more bits for Bee Happy tonight. So, teh slowdown effect is now working when the player is over the hedge tiles which is all good and…most of the time… the flowers are removed correctly, but sometimes and I’m not sure exactly why, the offset changes by 1 frame in any direction.
I’m guessing something’s up with my timings in edge cases which is annoying but really, it’s just one more piece of the puzzle i need to fix before I move onto the next one.
I’ve got to be selective with how many tiles i can write during each VBlank period still, particularly with 2 players involved. I may have to resort to a priority system or just an every other frame depending on how close things get.
Either way, some progress is still progress, so that’s good.
Hives and Hedges
I set myself the target to get more level features into Bee Happy tonight and after some prototyping in photoshop this morning I ended up with this lil image to work towards.
This meant changing how level data was constructed and read from, keeping within my limits of not just lazily turning the rendering off for a few frames. Initally everything went well, adding the hedges seemed to cause no problems until I added the code for the Hive placement which proved to be a little too much for the PPU to handle inside 1 frame.
The problem was that I knew I was close but there were a few cycles I could spare and, with a few minutes of tinkering about with my level loading code I was able to optimize it down to run, what seems to be, safely within the NMI CPU time.
Figured I’d best post a lil video to go with it, the only real difference is that the hive outline isn’t black but that’s something I can live with.
Next up I think I need to handle background collisions in a smart fashion, ideally pre-calculating which tile each player is over before deciding what to do with that information in the NMI window.
Wish me luck, as I think I’m going to need it!
Level Loads and a Field full of Flowers!
So, eventually accomplished the goal of displaying a field full of lfowers after another couple hours of debugging tonight after overloading the PPU a few times, getting trapped inside code blocks that weren’t executing but eventually breaking free of them!
I gave in to easy mode sadly tonight and chose to use a byte per tile over cramming level data into fewer bytes. It may result in more obstacles for players to travel through (I’m still thinking hedges would be a good slow down / sticky trap for players btw) But genuinely relieved to get that field of flowers on screen without having to resort to turning the screen off.
Next up will likely be something to do with harvesting the pollen, but that’ll have to wait until Wednesday evening possibly now!