Sunday, February 24, 2013

Bullets and Power ups

I've added a decent amount of functionality to the scrolling shooter. First of all, there is a player "character" that is controlled by dragging your finger around the screen. The player sprite shoots a bullet every 1.5 seconds, so there is no need to tap a fire button or anything messy like that. The enemy sprites also shoot back now, and as a result there is a health meter depicting the player's current status. The first "level" currently in the game consists of waves that alternate between two minion types. The different types have different path patterns that they fly around in. As you get past waves, subsequent waves start having more minions in them. After something like 12 waves, the level is completed. Right now nothing happens at this point, minions just stop spawning. In the future, a boss character will appear. I'll be working on that soon.

I've also added power ups into the game. Currently there are only two types: health and bullet increase. There is a chance that either type will be spawned when an enemy minion is destroyed. As you might expect, collecting the health power up heals the player for one hit. Collecting the bullet increase power up increments the number of bullets the player shoots. By default the player shoots a single bullet straight forward. Collecting the power up will cause them to shoot two bullets away from them in a diagonal line. If the power up is collected a third time, they will shoot the two bullets at a diagonal as well as the straight forward bullet for a total of three bullets. The "3 Bullets" level is where it is capped. Picking up the power up after that won't do anything. However, taking a hit from an enemy minion will cause the bullet level to drop down one tier, with the default being the minimum. The health power up spawns less frequently than the bullet power up, but both of their drop rates will need some tweaking as it is too easy to stay at bullet level 3 and close to full health.

My next priorities are adding explosion animations when an enemy minion is killed, making some of the minion paths a little better, and then adding in a level boss when all the waves are cleared. Tia and I talked about putting a meter vertically along one side of the screen to show how close to the boss fight the player is, so I'm going to try to get working on that as well. Overall things are going good and the game is actually playable. Its easy to see that this game has a lot of potential, provided I can make the levels varied enough to keep it from going stale.

Friday, February 15, 2013

Enemy Minions

Been doing a little more work on the scrolling shooter lately. I cleaned up a little bit of the scrolling background code and it is now working fantastic. It was pretty good before, but if you changed the background enough times, the animation started to get choppy because the previous backgrounds weren't getting detached. That's all fixed up and its running smoothly.

In addition, I've started adding enemy sprites to the game. There is no player character yet, so the enemies, which I have dubbed "minions", go unopposed, but they fly around a bit while the background scrolls beneath them and it looks pretty cool. I read in the minion type and number for the wave from an xml file and then spawn the number of minions and send them out on a specific path to move along. Currently there is only one minion type, but that will change and the minions will have different paths depending on their designated type.

After I play around with the pathing a bit, I need to add a player ship so that you can actually fight the minions. I might make the minions shoot (at nothing) first. I'm not sure yet. So many options.

Saturday, February 9, 2013

Puzzle Game and Scrolling Backgrounds

Been a while since I posted but I've got a little bit going on. Nearly a year after starting work on my puzzle game (and my first taste of AndEngine) I finally feel like it is ready for release. It still needs good graphics (the ones I made are terrible MS Paint things) and some sound effects to go with the new graphics. Other than that, all the functionality is there, Scoreloop leaderboards for the 5 game modes, a cool power-up I added, and some pretty cool achievements to earn by doing specific things and playing the additional game modes. I'm pretty excited about how far the game has come. It is somewhat similar to games like Bejeweled so fans of that type of game will enjoy it, but at the same time has elements that make it unlike any puzzle game I've personally seen. I'm pretty happy with how original of a concept it is.

The other project I've just started recently is a top down, vertical scrolling shooter. I haven't done much work on the actual code yet, but Tia and I have spent quite a bit of time hashing out things like characters, a little bit of the storyline, bosses, power-ups, and some of the general look of the game. Going only off of the notes I have in my notebook and the images I have in my head, its looking pretty great.

With this game I'm trying to do a significantly better job of encapsulating code, and I'm off to a pretty good start with the very little I've done so far. I'm starting with the aspects of AndEngine I'm unfamiliar with in an attempt to figure them out before there is a lot of other pieces fit in. So far I've just scratched the surface with some Parallax Background work. Basically a parallax background is set up so you have a main background that slowly scrolls, and then another background layer composed of background objects like clouds, that move at a slightly faster rate, giving a "realistic" appearance to the background. Since the player in this new game will be flying at what is presumably a great height, the ground should appear to be moving underneath them at a slower rate than the closer objects, like the clouds, and then both backgrounds continuously scroll on repeat. AndEngine has a nice Parallax Background class, but for some reason the official stuff only supports horizontal scrolling (not good for a vertical scrolling shooter). Luckily, a quick search of the AndEngine forums turned up some modified code some community members had worked on that fix the issue.

So, I started out by just having a light blue background with a big black X on it so I could tell if it was moving. For the foreground I put some oddly colored triangles pointing out. I don't know why I went with that decision, but it worked out all right. This is what it looks like:
Then, partially to test out my encapsulated background code but more to have a better example of the reasoning behind the parallax background, I made a second set of background that are clouds over a grassy area with a lake, some streams, and what I guess is a road leading up to the lake, again in MS Paint. It turned out surprisingly good for the time I put in:
This second background really illustrates what I'm going for here. The clouds scroll downward at a little over twice the speed of the "ground" under them. I'm really happy with how it turned out and I'm excited with the possibilities for additional "levels". Canyons, cities, some sort of volcano. All good options. I just need to keep myself motivated with this new game. The amount of stuff I have to work on to bring it to where I want it to be is a little daunting to be doing solo, especially given the fact that my most complicated game took a year to finish and probably wont see release for quite some time. We'll see how it all goes.