Showing posts with label platformer. Show all posts
Showing posts with label platformer. Show all posts

Tuesday, December 31, 2013

Lava and Spaceship Thrusters

I've been working on my platformer game a tiny bit. It has been bugging me how the lava works. It just ramps up in speed until it overtakes the player and they lose. Even if the player does everything right, the lava will eventually flow over them. I want the player to be able stay ahead of the lava wave if they are playing well. Now, the lava has a steady speed that moves slower than the player can run. However, the lava now has a maximum distance that it can get from the player so the threat of the lava catching up is always there if the player messes up a little bit. The problem with this is that the player doesn't have much of a bubble if they come upon a room where they are required to backtrack a little bit. To solve this problem, I made the lava move slightly slower when the player is facing to the left, so when the player has to go up zigzagging platforms or run backwards, they don't get punished so much for it.

I've also been working on a space themed game that I did as a concept a while back. I didn't do much work on it, but it was playable. Original, you controlled the player's "spaceship" with the accelerometers, but I didn't like those controls much, so I recently changed it to just thrust towards the locations of the player's touch. The game has some physics involved so you have to overcome the momentum in the direction you're already moving to change directions. The power of the thrust is directly related to the distance between the player's touch location and the spaceship. The more distance between the two points, the more power behind the thrust. I wanted to illustrate this in game, so I put a thruster flame that comes out of the ship and points in the opposite direction that the player is thrusting, as you would expect. To display to the player the power of the thrust, the flame changes size based on the thrust force.

Here are a couple pictures of the game. In the first picture, the touch point is close to the player and in the second picture the player's touch is farther away, so the flame is much bigger.


Sunday, November 10, 2013

Fire Geysers

I've been a little bugged with my platformer game recently because the lava pits are generally too easy to jump over, and the lava wave is far too easy to avoid. To make things a little harder, I started the lava at a slightly faster speed and additionally I have its speed ramp up faster.

I also have added a new obstacle to the game: the Fire Geyser. This obstacle is a little mound on the ground that spits flames that will kill the player if they touch them. As a warning, the geyser shoots out a puff of smoke twice, then the flames shoot out. The smoke doesn't hurt you, but simply serves as an indicator that the flames are coming. It repeats on this cycle in a loop. Some times you need to run back and forth to wait out the flames, and since you cant actually stop running the closest thing to standing still is switching direction fast enough that you don't really go anywhere. Here are some pictures of the Fire Geyser in action:




Wednesday, October 16, 2013

Refactoring and New Tweaks

Not a whole lot to report lately. I did a significant amount of refactoring over the past weekend however. Refactoring, by definition results in no real change in the way the client interacts with the code base. As such, the game seems to work in the same way it did before the refactoring, except behind the scenes it is now much more encapsulated after I pulled out a lot of the minion functionality out of the EnemyMinion class and into minion specific classes like Sprayer and and Exploder.

Though it isn't really significant, I made a minor tweak to the way the Boomerang class minion shoots. Previously it would shoot a bullet down that would make a U-Turn to the right side of the screen and then would proceed back up and off the screen. After my little change, there is now a 50/50 chance that the bullet will either U-Turn towards the left side of the screen rather than the right. Very minor tweak but it make the boomerang bullets a little less predictable as before you could just dodge to the left and not have to worry about the return hit.

That's all for now, but I've determined that in the platformer game, the levels need to be significantly more dangerous. At this point it seems far too easy to outrun the lava for long periods of time, and the lava pits aren't all that hard to avoid. It needs to be more of a challenge, but I'm still not sure what obstacles I could add to make it harder. Maybe something like a counterpart of the lava pit but on the ceiling so you can't jump too high. I'll have to keep thinking about that one.

Friday, September 27, 2013

Minion Mixing and Results Popup

I haven't been working on too many projects recently, but I've made a couple improvements to some of my games. First off, in the scrolling shooter, I switched up some of the minion waves. Each level has two types of minions, and previously waves of minions would alternate between the first type and then the second type. Now, every once in a while there will be a wave that is a mix of the two minion types. Also, my cousin Mitch has been testing the shooter for me. I fixed one bug with the reset button he found and he's helping me get the difficulty of the levels more in line with what they should be sequentially. Here is a screenshot of the ghost level with both minion types in the same wave:

Additionally, I've been working on the platformer game and I've put in a results popup window when the level is over. It show how many points you got from collecting gems, how many you got from just surviving in the level, your total score, and what caused your death. It also shows how much distance you've traveled horizontally through the level. That doesn't really factor into your score but I'll probably use it for an achievement of some sort eventually. The popup box also has a "done" button that will close the window and set you up for the next game. Here are a couple screenshots of the results popups:

Tuesday, September 3, 2013

Platformer Start Screen and Menu

I haven't added a whole lot to any of my projects recently, but just prior to leaving for the beach over Labor Day weekend, I managed to add some simple (but significant) additions to my platforming game.

First off, I added an actual start screen so you no longer just start running the second that you enter the game, but can now get a little set up and ready, then tap the screen to start running. It isn't anything major, but I think it has a large benefit on the game. Here is a screenshot of my little start screen text graphic:

Additionally, I added a pause menu so the player can now pause, resume, reset, and quit the game. Pausing, resuming, and quitting are basically all taken care of for you, but getting the reset to work actually took more time than I was expecting, mostly because I needed to do some garbage collection on my physics world objects and then set them up again. That is all figured out and working though, so it is quite nice to be able to play a new game without having to quit out first. Here is a screenshot of my super basic pause menu:

Readers of my last post might also notice a slight change to the thermometer gauge. I added a semi transparent background behind the meter to make it a little more visible. Near the top of the gauge there is an orange section of the background. This indicates the real "Danger Zone" because when the thermometer level gets to the orange part, it means that the lava wave chasing you is now on the screen and you are in trouble at this point. I like the way everything is going at this point, but I still want to add a few more UI things.

I would like to have a player report box pop up after the level over that shows how long you lasted on the level, how many gems you collected, and maybe a distance traveled type thing. If you got taken down by the lava wave it could indicate that or show a different icon if you fell in lava pit. Those are the only two things that can kill the player at the moment, but there is likely to be more hazards and traps in the future, so those could all be shown on a results popup.

Saturday, August 24, 2013

Game Syncing and Thermometers

I've been working with the Google Play Game Services some more trying to get a player's unlocked levels to sync for accounts across different devices in the scrolling shooter. The Game Services have some cloud saving abilities, but after spending a lot of time trying (and failing) to get it working, I decided to go a different route. Google's documentation of the cloud saving services leaves a lot to be desired, and I found their one example of how to implement it to be a bit of a complicated mess. For my solution, I tried something else, and it is not what Google would ever intend for someone to do and it probably isn't very good practice, but it's working well for me. What I'm doing is when the player starts up a game, I use the Game Services API to get a buffer filled with all the available achievements for the account. Then I step through the buffer and record how many of the achievements are unlocked. Since in the scrolling shooter game, the only achievements will be for completing a level, the number of achievements that are unlocked for the account is the same number of levels completed. Obviously this method wouldn't work if I had achievements for other things like reaching a certain score or beating a level in a certain time, but I have no intention of adding any such achievements so this works out pretty well. The game has a saved preference of how many levels are unlocked, so after I get how many achievements the player has, I compare that to the saved value of unlocked levels. If the number of unlocked levels is less than the number of achievements, I update the unlocked levels to be correct for the account. If the max number of unlocked levels is already saved in the preferences then I don't have to check for this level syncing in the first place and I just avoid any unnecessary calls to the Game Services. It's not how Google intends for people to do things and it's a bit of a hack job, but it's also pretty solid and it seems to be working well, so I'm going to stick with it on this particular app.

In addition to working on the Game Services for my scrolling shooter, I've been adding a bit to my platformer as well. Just recently I added my "danger meter" to the HUD. Its a thermometer and it shows how close the lava wave chasing the player is. As the lava wave gets closer, the level of the thermometer rises, filling the gauge when the lava actually reaches the player. It's really nice because you now have a way of telling when the lava is getting close before it actually appears on the screen. For the most part, its easy to keep the lava far enough away that the thermometer is empty, but since the lava speed ramps up over time, it will eventually catch up and the level of the meter rising lets you know its coming.

Here are a couple screenshots of the thermometer in action:


Monday, August 19, 2013

Gem Collecting and Game Services

I've recently updated a little bit of my platforming game. It is entirely cosmetic but I've made it so when the player collects a gem, the gem shoots up into the top left corner where their score is. It isn't that big of a change, but I think I pulled it off pretty well and it definitely looks cool, especial when you collect a couple gems right in a row. I don't think any players will need the confirmation that they did, in fact, collect the particular gem, but I suppose that is an added benefit of having the gem in question slide up to their score text.

I've also been playing around with some of the new Google Play Game Services on the scrolling shooter. I've added a leaderboard and achievement for each level and a Google+ login button on the main screen. Things seem to be going pretty well. I also made it so you now start only with the first level and to unlock each level, you have to first beat the previous level. I might try to get some cloud saving going on since its a part of the Google Plus Game Services package, but the documentation isn't all that great so I might have to scrap it. Conceptually though it would be pretty cool to be able to beat a level on your phone and have it unlocked on say a tablet as well. I'm also going to look into some in-app purchases stuff. All my previous projects have just had a lite version and a full version but I want to start just releasing a single version with limited access and then you can make an in-app purchase to remove ads and unlock all content. So I'm going to be checking that out really soon.

Monday, August 12, 2013

Breakable Platforms and Ramps

I've added a couple things to the platform game that I think are pretty cool. First, there is a new platform type that the player has to break through to advance. They can do this by jumping (swiping up on the screen) and then swiping downwards to perform a "Ground Pound" move that shatters the platform allowing the player to fall through. In the screenshot below, you can see the player breaking through a platform.

Also noticeable in the screenshot above is a ramp section in the tunnel. I've added a few new sectors or rooms to the game that have these ramp sections. They go up or down and provide a different type of area that the player can run through, especially in sections like the one in the screenshot below with a lava pit at the top or bottom of a lava pit.

Another addition that I've made is one that I think is pretty cool, but it is also purely cosmetic. When the tunnel background tiles (the pink squares with the blue star in them) are spawned for a sector, there is now about a 10% chance that the background tile will be spawned as a different image. Currently it is just a different color star in the circle, but eventually it can be something cool and related to the theme that will break up the background a little bit. In the screenshot below you can see an instance of two of the "rare" green star tunnel background tiles among the more common blue star tunnel backgrounds.

The game is really coming together now, and besides the addition of some more sector types, I've basically added all the functionality I was wanting. I am hoping to add a couple more HUD things though. One, a meter (possibly in the form of a thermometer to go with the lava theme) on the left side of the screen that acts as a gauge to show the player how close the lava is to reaching them. Second, I would really like to add in something for the gems the player collects where, instead of having them just disappear, the move from the place they are collected up to top left corner of the screen where the score text is located.

Friday, August 9, 2013

Scrolling Backgrounds and Lava Pits

I've been doing some more work on my platforming game. I'm up to 12 regular sectors now plus a bonus sector. The bonus sector is a really easy hallway with no real obstacles and a lot of easy to collect gems, but the odds of getting one are also much lower relative to the other sectors. I also have a scrolling background going behind the level now that moves at a different rate than the player. I think it gives it a cool look to have the scrolling going on whenever you run or change directions.

After play testing the game quite a bit, I decided that it was too easy to simply outrun the lava wave for long periods of time. Eventually it will catch up to you because it slowly revs up in speed, but you can still go pretty long stretches before it hits you. To up the difficulty a little without making the lava wave just impossible to outrun, I added some lava pit type obstacles to some of the new rooms I've made. These are just little animated pools of lava that the player has to jump over because touching one is an instant game over. They are pretty cool and I'm happy with how they turned out, but in some places I was having trouble with the jumping and making it over the lava pits. The jumping was a little unforgiving so I tweaked it a little to be a bit more accommodating and now players won't have quite so hard a time jumping from platform to platform.

Below we have a screenshot with one of the new lava pits and the background. Its just a dark brown background with some lighter brown spots. I'm thinking this game might eventually looks like its taking place under ground, so I made a "dirt-like" background, but it still looks weird with all my brightly colored platforms and such. Plus it's just a bad background in general. Anyway, here it is:

Monday, July 29, 2013

Platfomer Tweaks and Collectables

I've been continuing my work on my platformer game. I'm using some basic Box2D physics and my player object, which was a rectangle shape, kept getting caught on some tiny edges where my floor pieces were connecting. They were at the same height so really there shouldn't have even been anything to get hung up on, but apparently its something that other people have been having trouble with as well. I fixed it by making my character object a hexagon instead, with a point at the bottom so that now instead of getting hung up on those little pieces, the angled surface at the bottom causes the player to just bump over it. So, that's fixed up pretty good now and the game is playing like I want it to.

I've also been adding in some coins type objects for the player to collect. They are actually like diamond/gem type things that are scattered about the sectors and some are worth more than others. The value of the gem is randomly assigned when they are spawned, with the odds of being a low value gem being much higher than the other ones.

I've also added in a threat in the way of a wave of lava that is "chasing" the player. I'm not sure if I'll stick with the lava thing (although it does tend to freak me out in video games) but right now it serves as a reason for the player to be quick about navigating the various rooms and collecting gems.

The gems are pretty easy to collect, but since there is the constant threat of a lava wall that will make grabbing them harder to deal with. There are 3 type of gems: Green, Blue, and Red, which are worth 1, 3, and 7 points respectively. So, maybe the red gem is worth going out of your way for as you leave the green ones behind.

Here is a screenshot with some crazy place holder graphics. The player sprite I'm using is the character from Androidan Summer Games, and all the platform/wall/floor types are different colors so I can tell which piece is which type of object. There is a repeating star background within the "tunnel" the player is running through, and I plan on making the blue background behind the tunnel some sort of scrolling background. The gems are actually pretty good for programmer art, but they don't stand out super well against my carnival colors backgrounds.

Tuesday, July 23, 2013

Platforming

I've been trying to think of things I want to add to the scrolling shooter, but with the addition of the story type slides to the beginning and end of the levels I think its almost finished up. So, in the last couple day I've started playing around with a new game concept. This time, I'm working on a platformer. I'm going for a dynamic/psuedo-random level design. To do this, I'm making different level sections, which I call "Sectors" that have the same entrance and exit space size. Then I can chain several sectors together to make levels that are different every time. The sectors will remain the same, and the player will see them multiple times, but with enough different sector types the levels should be unique every time. I need some sort of monster or enemy chasing the player through the level, but I'm not sure what to go with yet. Initially I was thinking something like lava flooding the level, and then I was thinking some sort of giant spider, but really I need to focus on some additional level things first. I only have 2 sectors that are being randomly placed right now but that seems to be working pretty well. It still needs a few tweaks but it's definitely good enough to show this game idea has potential.