Jump to content
  • entries
    370
  • comments
    183
  • views
    9,450

Ugly code


Gamegearguy

77 views

While I was working on the game and watching it grow, it became apparent that the way I had it set up was not going to be the most efficient way I could do things. So I got some help from the Discord Game Boy programming and with their help, I think I have things ready to go good. The only thing I'd need to do is change the SWITCH_ROM() code, adding some more instances to make it point to the newly added code correctly as I put in some more levels.

I went through all 22 levels in the game so far, and it all works great now. With my only fear not being able to put in new code for new levels. Although I think I just thought up of something. I could just add in some more functions to point to the other functions. Sure it would be a giant web of functions, but that'd be better than a giant web of switch or if statements.

What I plan to do is, if I can think of that many, put in 100 levels. Right now I have 22, so I'm about 1/5 way there. So I'm thinking this will probably be a 256k game, my first. I don't expect to come into any additional problems with a game that large since most of that size will be used to store level data. Right now it's a 128k game and I'm using 4 out of the 8 banks, so it's half empty. But I think I'd use the rest of the 4 banks pretty quickly if I need to put in more level data in them.

0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...