| Heli Merc: Shooting enemies and menus |
|
| Thursday, 06 January 2011 12:17 |
|
As mentioned in a previous post, I figured out how to use the same weapon AI code to register both enemy and player weapon hits. I've since implemented the code necessary to have the enemies fire at the player, and additionally, the turrets now track the player as they move past. Weapons aren't exactly coming out of barrels though, they're being emitted from the center of the object, so there's still a bit of work to. I've also added in a property for all weapons called "target" which is simply an object handle. It's now theoretically possible for the enemies to track other objects besides the player and shoot at them. I'm thinking of including missions such as "protect the convoy", so the player will have allied units that can help or be shot at by enemies. With this in mind, and the fact that the game is written to play using an accelerometer on a phone, I'm also investigating ways to make it easier to hit enemies since it's actually pretty hard having to tilt and twist the phone to line them up. One idea I had was to shoot weapons in the style of games such as Silkworm, basically firing two shots each time fire is pressed, one in the direction the helicopter is heading, and one towards the ground to make it easier to hit ground targets.
I've also removed the fire button. Simply tapping the screen fires the weapons, it doesn't matter where you tap. I figured since I can't support multi-touch, there's no real point forcing the player to hit a button to shoot. The last thing I did in this area was to move the control panel to the top of the screen since the action takes place at the bottom and the last thing I want to do is hide what's going on down there... DrudgeryFinally, it's time for a bit of drudgery - the menu system. I really needed to get something better as I'm up to the stage where I need to work out how levels will be designed. I'm planning on doing some sort of drag'n'drop system, so I can try levels as I develop them without having to go back and forth editing a level file, then importing the file into Shiva and restarting the engine. The menu system is pretty complete, though not all options are functional. PerformanceI'm also pleased to say that so far, performance is still pretty good. Even with tonnes of weapons, explosions and enemies flying around the screen, the game has yet to drop below 25 frames per second on my Desire, so long as I disable the flash explosion effect. This bodes well for performance on more powerful phones such as the dual core beauties being revealed at CES as I write this... Heli Merc Demo 5: Shooting enemies and menus Return to the Heli Merc section! blog comments powered by Disqus |

