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

Formula Racing Gameboy Homebrew Developments.

Well, it’s been around a month since I’ve posted on here about the updates to Formula Racing and there’s a lot more going on with the game now! Read on to find out about what’s done and what’s still to go.

What’s done?

More tracks! 

There’s now 10 tracks designed for Formula racing, including my new personal favourite USSR – 1! I’m going to be re-visiting the track designs for previous levels shortly, in order to spruce them up a tad.

More Track Details!

I foolishly forgot that I had a spare 128 tiles to use for either sprites of background tiles.. So, I’ve been making use of the new tiles to add more definition to the track layouts. Mainly USSR-1!

Track obstacles.

Just racing the opponents wasn’t enough for me after a while. So I’ve added more obstacle tiles that will blow your car off track should you run onto them. You will run onto them!

Boost Tiles.

Because, every racing game needs boost tiles of course! So far, only on USSR-1 but that’s fine. Revisiting older tracks, yeah!

Track Intros, last lap warnings, Variable Lap counts Per Track , an actual finish AAAND that vital feature. Pausing.

So, yeah, that’s a fair amount of stuff added to the game which has had a couple of important effects.

The games plays better and is getting closer to being an actual game now.

I’m seriously running out of spare ROM space for my main game loop – 270 bytes at last count tonight. I have sfx to add and music!

Whoa…MUSIC?

Yes, that’s right, MUSIC! I’ve been chatting to the fantastic gameboy chiptune composer NordLoef about in-game tracks and he’s agreed to help make some music, which is really great news, I can’t music for toffee, cake, biscuits, even the promise of coffee and a peanut butter wrap.

So, yeah, he’s going to be in the game credits and, hopefully getting a physical cartridge at some point! I’m really looking forward to importing the tracks into the game, that’ll really make it a more complete gameboy game and hopefully some people out there will enjoy it also?

A sudden Jolt, of Gameboy Goodness!

So, I noticed that Gamejolt now allow you to play gameboy ROMs directly from your browser, that’s pretty cool I thought, best upload some games I’ve made to see how it runs then.

And, lo and behold, 5 games uploaded and they all seem to be emulated rather well, they even included CGB (Gameboy Colour) Support on there also.

5games-ongamejolt-nowIt seems like a nice place to host the files, they’re not going to take up much space either way, but gamejolt serves as a handy place to put them all! View, Play & Download these lil Gameboy beasties here!

Why the long delay?

Because I’ve been busy beavering away in GBDK of course! Here’s a brief video with some nice details on progress with the game and, what needs to be done before I put it out in the wild.

It’s taken a long time but I’m over the 50% mark now, just need to cram the code into what space I have left (just over 2k in my main rom bank)

I think I’ve finally found a solution to my super gameboy problems, which I’ll be playing about with this week, it’s exciting stuff for me at least!

 

Could Undertale be made to run on a Nintendo Gameboy?

demake-largeSo I’ve just finished one of the most hectic weeks at work porting 10-13 year old code over to PHP7 and I decided to chill out with some Undertale pacifist mode playing about when my goddamned coders brain thinks to it’s self…

“Damn, I love Undertale and having a good time… but. I reckon this game could run on a Gameboy, which would be pretty cool, yeah, yeah?”

That’s not to slight the game, I love it, I doubt I’ll have the heart to do a genocide playthrough mind. But, looking at it objectively, could it be possible to port over to it? I mean, undoubtedly compromises would need to be made in terms of sprite sizes, and music downsampling but from the outset, you have a load / save system, background scrolling and fight sequences with conversation pop up boxes. Of course, there’s the over arching story with it’s many branches which would no-doubt push memory to it’s limits I’m sure and, whilst I doubt I’d attempt to port the game myself to GB, I think it could be done.

That and I had to see if the Undertale GUI would fit in the Gameboy’s tiny resolution, looks like it could. Apologies for my poor scaling of Napstablook btw 🙂

Right, back to finishing off Formula Racing ‘n’ stuff…

More Formula Racing Features Added!

Okay, it’s been a while but, yes life, is a thing and it isn’t always coding of course 🙂

Having said that over the weekend just gone I’ve managed to get more of the game ready, including part of the opening sequence which just needs some palette work for the gameboy colour so that’s all in motion.

I’ve set-up the ability to have multiple levels in the game and I reckon I can easily fit a decent number in there, possibly with each one having it’s own variants in both colours and some other elements to break things up a bit.

I’m tempted to learn how to add a border for the super gameboy also, although I’d need to learn some more ASM first in order to figure this out.

Sadly, it looks like I won’t be finished for the February #1gam but, that’s okay, I’ve got more of a workable engine to use across the year for any future gameboy games and that’s pretty neat.

Speaking of engines… Damage is now a factor with your race car. Taking damage impacts acceleration and once the limit is reached, you will explode, lose three places, then respawn. Crashing into the back of another car or off track obstacles is particularly painful!

Cars get tougher to pass the further up the rankings you go and I’m still enjoying playing and making the game so, that’s all good for the moment I think! Now, back to figuring this Super Gameboy out a bit perhaps….

[edit] I shouldn’t have made this border, now it’s a mission! [/edit]

sgb-border2x

Racing A.I. Squeezed In how much is left?

So, I’ve established some form of racing A.I. which will at least, keep them on the track a lot better and they still perform some homing in on the player, making them particularly tough to pass easily on the test track at least.

Lap counters, speedometers and damage counters are in place and ALL THE BASICS ARE THERE! Which is really nice, but. I’m pretty much maxing out the CPU on the Classic Gameboy, which means there’s not much more I can fit in before things get janky and framerate-y.

Essentially, I’m now really limited to what else I can add to the game without breaking the Gameboy version (the Gameboy colour version is a-okay though, faster CPU (~8MHz) so more time per frame)

Hopefully some power-ups are possible. I’m thinking either boost pads or boost fuel drops in odd places on the track would be pretty cool to force the player off-line.

I **could** drop the game down to 30fps instead of 60 but I don’t really wanna do that. That smells of just giving up on performance, there’s got to be another way around it.

I need to add some toughness to handling the cars also, make the controls a biut more analogue in the steering. That should make things a bit more interesting regarding mastery of the game.

Animated A.I. Cars (click for big)The Lap count is currently going up from 0 and taking up to much window space so It’s going to be changed over to a countdown instead with “L:XX”. With XX being the number of laps remaining.

There’s only a few days left until the end of the month now and #1gam is looming, I’m still hoping to add a few game modes in there though, including a championship mode, time attack, not to mention intro screens, car selector and results summary. Oh and a password system.

I think I’m going to need to cut-back a bit!

More Gameboy screens in Photoshop

Refresh Games Gameboy Title Screen Game Intro Screen with mode selectNot the most productive day for coding today but, thanks to my sleep pattern being slightly messed up this weekend, I managed to fit a couple of screens of pixel art in tonight / this morning.

The Refresh Games logo needed some Gameboy love and should fit easily into RAM, but, the main title, I’m not so sure about.

Some clever tile mapping will be needed no doubt, I guess that’ll be tomorrows gubbins!

Still, it looks pretty cool there, I used a 3d model of super deformed F1 car I’d made a couple of years ago which just seemed to fit in really nicely when posterized in Photoshop.

We’ll see tomorrow I guess then.

[P.S. most of my tutorial code for part 2 of my GBDK tutorial series is nearly ready also, it just takes a while to write all about it.]