Wednesday, April 28, 2010

Progress Tuesday 4/20

So now that I have the game doing what I want it to do for the most part, I'm trying to incorporate some AP Comp Sci ideas into my game. Most of this means inheritance and extensions and stuff in that nature. At the moment I'm trying to figure out a way to write a generic fireEnemyBullet() function. The problem I'm having is that I have 2 different types of bullets, regular bullets and a laser bullet (2 side by side longer bullets). As you could most likely guess, there are two separate files for the bullet code.
Some possible ideas I've figured from reasoning could be:
  • Put both different bullet classes in the same bullet file (enemyBulletFile) - I'm not sure if this could work or not. It's just an interesting idea that I might tinker with (probably mull over with Mr.Howe)
  • Put a variable in each enemyFile that says if they can fire lasers or just regular bullets (the one Mr.Howe and I have figured is the best way to go at it)

1 comment:

  1. I meant progress Tuesday 4/27, but I think you could probably figure that one out.

    ReplyDelete