How high is your highscore?

Right, I recently came into a little problem regarding storing highScores and comparing between them. It sounds stupid as most people would probably think. “Well, duhhhh use greater than or less than”

Which is fine. but with the gameboy being 8 Bit, I’m storing my scores as arrays as scores up to 255 would be rather boring….

So, for example 9,001 would fit into an array of 4 lots of UINT8, for an easier time displaying things to the screen, without extra computation.

E.g.

In a game I’m making currently, scores can extend beyond the limits of a 16 bit integer also, so we’re using slighlty longer arrays to store things in, no biggie.

But. I’ve found a handy solution to my problem, along the lines of the following:

What the code above does is compare the arrays on an integer by integer basis and set another variable with the result, reliably!

I hope this helps someone out there who has a similar issue regarding setting up high-score boards on the gameboy as this seems to be a safe an fairly quick method.

I may well be missing another way that’s quicker all-around but this seems to work for me anyway 🙂

Expect a new game posted around the end of this month 🙂

 

So, August and me coding in GBDK didn’t really happen.

Yeah, yeah, I didn’t even update this blog either. For over a month!

But, that doesn’t mean I’m stopping gameboy development, far from it. There’s plenty of games I need to finish off before I move onto tackling 6502 ASM again in October / November.

There’s quite a list of them now, how does it always end up like this!

Formula Racing.
It’s nearly all done, but just needs a bit of polish and better ROM bank management.

I Shall Be Queen.
I’d really like to add that boss fight in there sometime soon. Then I’ll accept it as complete.

Shield Warrior VII.
It’s a small game I attempted to make for Ludum Dare 36 during the bank holiday weekend, but life and family fun was way more important. So, I need to finish this one off soon!

Ayasumi Todayachi.
A horizontally scrolling shmup with alternating weapons.

Space ‘splosionator 2086.
A quick Whack-a-mole type game. But in space!

They Are Everywhere.
I’ll come back to They Are Everywhere again sometime again. I feel it needs re-programming now I have a better knowledge of the system as opposed to in October last year.

Roll on September!

Bit Bit Jam 3 Post Mortem

Hiya. I’m Ryan Carson and this is a lil transcript for my video about “I Shall Be Queen” for the Gameboy and Gameboy colour, made in 1 week for the 2016 Bit Bit Jam. This is the first game jam I’ve entered which is entirely dedicated to retro console development and Has been lots of fun to take part in.

The chosen theme this time around was “Red Hot Princess Carnage” and resulted in quite a variety of games being made for systems dating as far back as 1976 / 7.

omgslimes
Early Dev Shot- Lots left to work on still here! I think this was on tuesday / wednesday…

A you can see I ended up making a double-dragon style beat-em-up where you play a princess character, out to steal control of the kingdom by yoinking the queens crown.

The game takes place over a total of 3 stages with enemies getting tougher as the game progresses, starting off with basic slimes, moving onto snakes, floating eyeballs and arrows being shot through the stage at you.As has been mentioned a few times to me now, hitting the enemies is considerably tougher than it should be, mainly down to the height of the enemies being less than your primary punch attack.

With a bit of skill, you can manipulate them to wander down into the punches and there’s always the simpler jumping kick and mana consuming ranged fireball you can throw with the select button.I started off with a simple base code consisting mainly of collision detection and fader for the monochrome gameboy and the rest of the code was written during the week.

I was really proud with the pixel work I could put into play with this game, particularly for the main character, although, using such a large sprite for her in-game meant I had to dedicate 18 tiles per animation frame. Not good when I need to consider enemies, power ups, etc.

I could have a maximum of 14 unique frames but ended up with a total of 10, comprising of:thegrid

  • 1 Standing Frame
  • 3 Walking Frames
  • 2 Punching Frames
  • 1 Jumping Frame
  • 1 Kicking Frame
  • aaand 1 Death Frame

That’s still the majority of the 256 total available to me, leaving me with only 76 tiles to put enemies into!

I wanted to have some variety to the enemies with at least some animation so opted to make the enemies fit into 4 tiles per animation frame, with a maximum of 4 animation frames per enemy.

There’s 4 different enemies in-game, so that’s adding another 64 tiles, leaving only 12 (well..okay, 16, one enemy had just 3 frames to save on space)

The remaining tiles were dedicated to power ups, shadows, visible punches and kicks leaving a paltry 8 spare tiles at the end, I was really pushing the limits to what I could use here and many other scenes went the same way, it was tough trying to cram it all in!

Somehow it managed to fit in though and with a few sneaky tricks to reduce cpu usage, not checking for certain hit detections on every frame, etc, etc. Further code reductions to allow the main game code to fit inside one 16kb bank, the game squeezed into it’s available space.

queenspritesandconvI was hoping to add a boss fight with the queen towards the end of the jam but, despite having prepared some sprites, simply ran out of time and ROM space come Monday to add this so, had to replace it with some rather odd dialogue scenes.

All in all, I’m pretty happy with the way this game turned out. I’m tempted to round out the remaining bugs and add that boss fight at a later date but yeah, a few flaws but, it plays pretty well and looks better than I thought it would!

Heck, I even managed to add some requested scenes from a guy at work’s request, but you’ll probably need to view the code to figure it out 😉

Why not give it a quick play through at Gamejolt?

Click here to Play Me I Shall Be Queen

Oops, err yeah, the video, I’ll be uploading that one shortly ;P

gbcolortitle