Gameboy GBDK Tutorial ROM Code!

Yes, it’s finally here, with comments and everything! Below is the code for the C file and I’ve included all the files with a readme.txt file for your perusal here. I hope this helps you to get started on your gameboy development journeys!

gbdkdemo .zip file, 6kb



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!


The doubts of homebrew development

I really love Gameboy development. It’s been the only game platform I’ve made things for since November 2015. But there’s that niggling part in me that reminds me occasionally that I could be working on finishing a more commercial game off when I’m coding up something very niche indeed.

There were different niggles going on with me when regarding indie development though. Mainly focusing around hopes that this game would appeal to people enough to purchase it or play a free version which could generate some revenue in another way. Kinda like a really long approach to purchasing a lottery ticket, particularly with the mobile market nowadays it would appear.

That’s not to say I’m not going to make another game with intentions of selling it though, but despite the differing niggles with Gameboy homebrew. I think I prefer them to the ones which seem more saturated than ever before.

Maybe that’s partly due to the different challenges involved between languages / IDEs. Unity is great fun to play around with and you can easily do a lot with it quickly. You’re a lot more limited with the Gameboy in every which way but those limitations, much like the time limitations in game jams, tend to make me produce something I wouldn’t otherwise.

I dunno. I kinda like it here in Gameboy Development land, just not to the exclusion of modern game dev. At least, not yet.

A couple more screens done and more bug fixes.

A bit more code tidied up tonight. Along with plans to get some more screens set-up for save/ continue functionality.

18 Courses should be enough, each course area will have it’s own theme and colour scheme for colour gameboy players. We’ll see how it goes from here but I’m hoping to fit this into 64kb total. Well, maybe 128kb, depending on any extras I add to it.

Grand Prix and Select CoursePasswords will just store your current course and total points. Maybe with different endings for different points totals at the end of the season…I dunno.

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]


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.]

Background collisions, SFX and TURBO!

Well, today went really well, I fixed up my collision routines with the scrolling background, yup, it was using a simple offset, with a case for looping every 32 row increments, seems to work well. Possibly un-optimised but good enough so far.

There’s some rudimentary noises from both cars on screen based on their speed and distance from each other, also collision noises are in there now.

The fuel-o-meter has turned into a working turbo bar to help catch-up or overtake other racers. It’s getting there, but I’m down to 4kb of ROM remaining now and the racer A.I. needs improving on the sly. I’d like to get some BGM in there also somehow.

CPU Usage is getting pretty high now though, so I may need to inestigate into other ways to load my level up. Setting colours for each tile through a switch is probably slower than referencing another variable directly I imagine but, well, a balance needs to be struck.

Tomorrow I’ll most likely be sorting out the code into banks to save space and going from there with more advanced A.I. (Not simple homing, falling of the track A.I.) those cars need to fall foul to going off track also and that’s going to be inetresting to set-up correctly!

Screenshot tonight is from the gameboy classic mode where, yes. Identical cars. I’m not too fussed about that. I am fussed about adding some steering animation though!

Getting There