Wednesday, 15 May 2013

4 Games 1 Screen - Musings on mobile game control



So often I hear that players hate onscreen controls on touch devices. No physical button means no tactile feedback to let you know you are 'touching but not pressing' a button. This fundamentally different interface means the traditional joystick / d-pad control scheme can no longer be the de facto standard for gaming controls across all platforms - replicating "up down left right a b start" on a phone or tablet is far from ideal (but an ouya or gamestick is another matter entirely ;)).

In my latest game, 4 Games 1 Screen, I try to make the most of a tricky situation. I've embraced the android mobile platform and the control options it offers. Our phones and tablets have accelerometers and touchscreens, the old nintendo and sega machines did not, it's time to think outside the box and make the most of these features.

4 Games 1 Screen is a challenging brain training game, the aim is to multitask by playing four games at one time, and avoid making too many mistakes. Make too many mistakes and it's game over. Each game is kept relatively simple for two reasons - first the game has to have a single objective and control method, second you have to be able to play four of these things at once so too much complexity would be too distracting for the player.



The mini games are:

  • Asteroid Attack - Tilt to steer your ship, asteroid collisions damage the shields, and when the shields are gone - gameover man, gameover!
  • Tap Jump Cowboy - Classic infinite scroll platform game (like canabalt, and gemserk's excellent vampire runner) tap the screen to jump, save the cowboy from running into the campfires!
  • Speedy Sums Math Master - Fully engage the left side of the brain, evaluate the math problem and mark it as correct or incorrect... You not only lose a life when you get it wrong, but also when you run out of time - so think fast!
  • Street Race Swipe - Swipe up or down to change lanes in this fast and furious racing game, avoid crashing into the other sports cars, too many bumps and your car will explode!


Each game can be played independently (full screen) in practice mode, but the real aim of the game is to play them all at once - the game is called "4 Games 1 Screen" afterall :) I find it fun, addictive, frustrating and challenging. The frustration is what makes it so addictive haha, I see gameover and immediately try again to "do it right this time" :)

No onscreen controls, and a game that would not really be possible on traditional gaming platforms, this is truly a mobile game designed for mobile devices. I hope you go on to check it out (it's FREE, so why not!) and if you also like making your own mobile games that you might consider some of the thought behind the concept - don't lament the lack of physical controls, instead make the most of what is available!



Finally, does this mean that I won't ever release a mobile game with onscreen controls? No. Definitely not. A future project will be a traditional platformer, with android enabled consoles like the ouya and gamestick firmly in mind. I will no doubt make a mobile version of this game with onscreen controls (it would be silly not to). I'm not against onscreen controls, I'm against not thinking up interesting ways to make the most of what the mobile platform offers. I believe a platformer will only work well with traditional controls, but we don't always have to make traditional games :)

Happy gaming boys and girls!

Thursday, 11 April 2013

Try before you buy (or in this case, try before you download for free!)

How awesome is this!? You can now try playing Quack Attack in your browser :)

The game plays a lot faster and smoother on a real android device (I think the slower your internet connection, the worse the appsurfer gadget performs), but I still thought this cool idea was worth sharing here.

Something tells me I'll be using AppSurfer to help promote my next game, the fact that tilt is simulated is especially cool :)

Preview sessions are limited to a maximum of 10 minutes before the virtual device is wiped, but that should be plenty of time to get a feel for the game, realise it's totes amazeballs, and install for real to play properly on your phone or tablet.

I find the interactive app to be far more engaging than a preview video, my only concern is that some players might be put off by the poor/choppy performance of the virtual device. I guess it should be used in conjunction with a youtube video, and not as a replacement for one.

It's no replacement for downloading the real free game app and playing it on your phone or tablet, but it's still a pretty cool toy to play with :D

Sunday, 10 March 2013

Scene2D Investigation... Result: Quack Attack Free Duck Hunt Game!


I started looking into LibGDX Scene2D recently. No real reason, other than it looked like it could be something interesting to learn, so why not! :) Best way for me to learn is to just get stuck in, so I got to work on a Duck Hunt tribute, and learned as I went along...

It's clear that Scene2D UI is the way to go for menus and the like, so much cleaner than my past approach. Scene2D UI combined with table-layout makes setting up menus and HUDs a breeze. Even better, tweaking layouts becomes pain free, a real bonus! I'll certainly be using it again in future games.

As for making use of Scene2D in the game itself (over and above the HUD), it was tricky to start with... All the tutorials I've read so far have advocated the MVC approach, and it seems that MVC is not really possible when using Scene2D (the model and view are tightly coupled). Still, I've not been doing this long enough to be stuck in my ways, so I figured I could just ignore some of what I'd learned in my earlier projects and just go with the Scene2D flow.

I was surprised that there aren't more tutorials available on the subject to be honest, but I muddled through with various bits and pieces I could find. The most valuable resource when getting started was the LibGDX suite of tests, they are always a good starting point when looking at something new. The official wiki was helpful too. It's a bit presumptuous to think that I'm in a position to write tutorials on the subject (due to me being a newbie myself), but I think I'll post a few code snippets in the coming weeks to share some getting started tips, maybe even an open source step-by-step mini game "how to" if I have the time.

I like how Scene2D lets you encapsulate Actor behaviour in its own act() method, it's pretty cool just instantiating an Actor and then just leaving it to its own devices. My first Scene2D game (Quack Attack) has the game logic class spawn a Duck object at various intervals, the Duck class itself keeps track of how it should behave (overridden act() method sets various actions for the duck to perform dependent on its current state), and it also takes care of drawing itself via the overridden draw() method. It's really nice to be able to look at that single Duck class and immediately "get" exactly what a duck will do in the game, without having to look at various other classes. I guess this is one of the main Scene2D strengths, but on the flipside it's what makes MVC impossible...

I'm sure the coupled view and controller will make things difficult on larger more complex games, but for simpler games I don't think it's a big problem. I guess if I were ever to try porting a Scene2D heavy game to a different platform it'd be a problem too, I am pretty sure porting Racing Game or Evil Monkey Touch Defense or Zombie Game to XNA would be pretty straightforward (if we ignore the tilt/touch control issue), but porting Quack Attack to a library without a similar scene graph implementation would not be so straightforward (would probably have to port the whole of Scene2D too!). Again I don't really care about that right now as I'm focusing on Android only, so I think it's quite likely that I'll be using in-game Scene2D in the future.

I've just published my first Scene2D game on Google Play, it's totally free (ad supported), so feel free to install and check it out. If you like it, I always appreciate a nice rating/review :) Check it out here: https://play.google.com/store/apps/details?id=com.theinvader360.duckhunt.quackattackfree




I think it turned out quite well, and am pleased with what was achieved in a relatively short amount of time. Keep an eye out for future blog posts featuring mini Scene2D tutorials if you're interested in that kind of thing :)

Until next time - happy gaming, and happy game developing!


Sunday, 27 January 2013

Monkey Magic!

UPDATE - As a result of a request from Fox, this game has been removed from the Google Play market. I may create a new version at some point using all original graphics (i.e. not the Family Guy monkey), but in the meantime why not check out one of my other games?

I released a new free game recently - Evil Monkey Touch Defence. You control a "good" Evil Monkey / King Kong type character, his job is to try and protect the tower from incoming missiles!


This was an experiment in creating the simplest possible control scheme for a casual game, while still making a game that's good fun to play. When you touch the screen the monkey starts dropping his aim, when you release the screen he fires. No buttons, no tilt, no nothing, just touch and release anywhere on the screen to control the game - it couldn't get any simpler! The longer you survive the faster the missiles get, and the more missiles you destroy the higher your score, simple and addictive fun...

You can check out Evil Monkey Touch Defence here. I'd love it if you would leave a nice rating or review if you like the game :)


On the subject of free monkey based casual games for android... A friend of mine recently released his first game, you can check out his Monkey Game here - it's a fun casual physics game that uses Box2D behind the scenes. There's nothing in the least bit evil about this monkey, he just wants to eat his fruit (and not get eaten by a croc!)



Monday, 17 December 2012

Tower Defence - Slacker's Diary


I've been slacking recently. Between work, Christmas preparations, and home improvements, there's not been a whole lot of time left over to work on Android games. Anyway, that's enough of the excuses, question is - what am I going to do about it?

I've made a little progress on Tower Defence, but the plan is to put it on the back burner for now, keep working on it whenever I have a nice block of time to dedicate to it, but if I only have an hour or so available at a time to work on more trivial projects instead. I love the momentum that builds up when working on really small simple games, and I'm hoping to get a few of these little games started and finished in the next few months, and just keep chipping away at TD as a longer term project.

Here's a video of the tower defence game as it stands:


Most of the basics are there really, but getting the game finished involves quite a few tasks, not all of them trivial - adding enemy waves, turret upgrades, multiple enemy types, multiple turret types, lots of level maps, level unlocking, graphical improvements, game balancing, etc. I might put an early unfinished version of the game up on the market at some point, maybe with rough graphics, just a handful of levels, and not the best balancing, but I worry that if I do that I might never finish the game properly!

On a positive note, keep your eyes peeled for a new project starting soon! :)

Tuesday, 20 November 2012

Tower Defence - First Progress Report


My last post was very wordy. This one should make up for that...

Here's what I've got so far:



It's starting to look a little like a TD game :)

Next up - I think it's time to get them turrets a'shootin!


Tuesday, 13 November 2012

Kicking off a new project - Tower Defence!


I've started working on a new game... Yayness!

This game will be a little more involved than my previous offerings, and to get it right could easily take weeks or even months of spare time. That said it won't be super advanced in any way, the slow progress will have more to do with the fact that I'm an amateur developer learning as I go than anything else!

The plan is to make a tower defence style game for android. I've got a few themes floating around my head at the moment (swords and sorcery, space sci-fi, WWII battlefield, cute zombies, scary zombies, etc) but to start with I'll just work with abstract shapes and get the mechanic up an running, theming can wait!

So, what do I have in mind for this game?

The world won't be confined to the screen, levels can be any size (within reason) and the player will be given the ability to pan around the world at will. I'm thinking swipes of the touchscreen to scroll around, and maybe even pinch/stretch gestures to zoom in and out.

Levels will be tiled and read in from map files (nothing new here), and will be multi-layered (this is something new to me) allowing me to create a visual layer (grass, path, river, tree, base, etc), and an invisible layer (controller objects like enemy spawn points and directors that push the enemies along the path, etc).

Levels will support multiple spawn points, some levels will have just the one spawner, others maybe three or four. So far I'm planning on protecting just a single base per level, but I guess I could handle multiple bases too. Spawn points will spit out enemies periodically, and each spawn point could have a different spawn rate, in fact the rate could potentially be modified mid-level, either at the end of each wave, or even during a wave.

I think it would be cool to have different enemy classes with different strengths and weaknesses. Rather than having turrets that deal X amount of hp damage per hit to enemies, I think enemies having for example a strong fire defence and a weak ice defence and having fire/ice turrets would add a lot more depth to the game. A level could start out spewing fire elementals that a smart player would build ice turrets to deal with, and in a later wave turn the tables on the player by spouting ice elementals (meaning you'd want to replace your ice turrets with fire turrets). I could get particularly evil and have fire attacks restore the health of fire elemental enemies (a la final fantasy). There could even be mixed waves of various elementals spawned from the same point to really shake things up! I'll need to ensure as the complexity increases the game doesn't become more frustrating than fun - balancing the difficulty will be key. I'll just start with the basic X amount of hp damage per hit approach for the prototype, the added depth can wait, but I do think it would be cool to do eventually...

I'm considering an experience based purchasing system, not just resource based. In game you'll receive bounty for killing enemies, this money can be spent on turrets (or wizards or tanks or whatever). Completing a wave or level could award you with XP, these points could be spent on weapon unlocks, allowing bigger and better attack units to be built next time you play (a nice side effect of this is that if you are a bit rubbish at the game you still get XP for the few waves you do complete, this allows you to use upgraded weapons next time you play, meaning you will eventually progress through the levels if you keep at it, natural difficulty smoothing sounds great and will make the game accessible to all types of player).

A lot of developers allow the shortcut of in app purchases to prematurely unlock beefier weapons. I *might* consider going this route, but to be honest I think it would result in game-breaking builds so probably won't go for it, I'd rather make a free version available with a limited number of levels and a full version with extra content for £1 or something rather than use in app purchases. Often the in app purchases can feel like a bit of a swizz, you wonder if the developers artificially increase difficulty to force you down the purchase route etc, that's not really my style.

I will want to go for an achievement based level rating I think. Maybe one star for surviving all the enemy waves in a level (next level unlocked), two stars for surviving all waves and base still at 50% or more hp, and three stars for a perfect game without any damage at all to the base. I'm a sucker for 100% completing games, and I know I'm not the only one. This approach would keep me coming back for more over and over again, but it also caters to the less OCD players out there that would be happy to survive a level and just progress on to the next.

The players attack units will be upgradeable. I'm thinking increases in range, rate of fire, and damage would all be good. Maybe it would be fun to have a points based system where at upgrade level 1 you have 10 points that can be allocated to these three stats, at upgrade level 2 you have 15 points to allocate as you wish, etc. This sounds interesting, BUT I don't really want players bogged down in menus for most of the game, it should be a fast and furious frantic game experience, not a highly strategic puzzler. I think it would probably be better to go for a simple "upgrade adds 10% to all stats" approach to be honest.

Finally, it seems most tower defence games choose from one of two pathing options for enemy AI, either waypoint based (enemies stay on the path) or algorithmic pathfinding (enemies follow the most efficient path, avoiding obstacles). The A* pathfinding approach looked a little daunting on first glance, but to be honest I don't think it would be impossible for me to implement. Having played my share of tower defence games though I must say I prefer playing the waypoint path based style, so that's what I'm going to be using in this game. I could always do an A* version in the future if I want :)

I will be deviating from the standard waypoints approach in my game in one respect - instead of having a set path through a level from start to finish, I'll use director objects to add an element of randomness to the levels. When an enemy occupies the same space as a director, the director object will force the enemy to change direction. By weighting potential direction changes and making use of a random numbers I can set forks in the road that add an additional level of chance/strategy to the game. One fork might split enemies along two potential paths at a 50/50 split, another might have a 90% chance of sending the enemy left, and a 10% chance of sending the enemy right - the player might opt for less defences on the less traveled path, which seems sensible, but they'll have to react quickly if their luck is running low and a boss enemy ends up travelling along the poorly defended route! This should mean that repeated playthroughs aren't going to be too predicable.

So that's it, that's the plan. There's a lot to do. So far my prototype consists of a single level map loaded in from file, rendered to screen (using horrific placeholder graphics), and consisting a single spawn point, a single base, and a number of director objects that push the enemies along the one and only possible path between spawnpoint and base. As for player experience, the keyboard controls allow the player to pan around the level and zoom in and out, and that's it. No turrets exist or can be placed, so all you can do is helplessly watch the enemy hordes destroy your precious base, and then on game over the level restarts, repeat ad infinitum in one endless nightmarish infinite loop. Plenty left to be getting on with then!!