Showing posts with label Android Game. Show all posts
Showing posts with label Android Game. Show all posts

Sunday, 9 February 2014

Back with a new game - Little Fish

I've been away from the world of Android Games for a little while, but I do have a couple of good excuses:

  1. My role has changed at work and I am now a developer - this is pretty awesome. Ok so it's dry databases and stuff, not games, but I'm getting paid to do what I enjoy, and am feeling pretty good about that! It does mean more of my spare time being spent on work related learning though, so a little less time for Android Game development.
  2. Even bigger news than career change... We're expecting our first baby!!! TheInvaderOne should be delivered by the stork at the end of next month :-o Preparing for the arrival of a human worm baby takes up a lot of time, though of course nowhere near as much time as once she has actually arrived. Spending time with her will be way higher up the list of priorities than playing with Android, so I either need to drop my hobby, or make it more efficient...

What I have been doing over the past few months (as and when I found a few spare hours here and there) is working on a sort of 'white label' app built on top of LibGdx. It includes a lot of the dull and boring to implement stuff that I end up doing over an over again, highscores, user preferences, ads, facebook integration, google play game services integration, splash screen, etc. In theory I will be able to use this as a quick start platform to speed up the game production process in future. I don't currently have plans to open source this as it's a bit too closely tied to my own stuff, and decoupling would take valuable time that could be better spent making games, but maybe sometime in the future it'll be an option.

I'm hoping that this quick start platform will allow me to continue making Android Games even after baby has arrived. The recent success of Flappy Bird proves that a game doesn't have to be sophisticated to become a runaway success. At its core it's a simple game (basically a reskinned helicopter game), with simple graphics. I'm sure the developer wouldn't mind me saying a similar game could be built in a single weekend, especially when leveraging a quick start platform. I've had some success in the past with my Racing Game and Quack Attack that proves the same point, simple/fun/addictive beats complicated/polished/boring. So, in future I can focus more on game mechanics and less on the surrounding app furniture, this can only be a good thing :)

I've just published my first game that makes use of the white label quick start sausage machine (catchy name) "Little Fish". The gameplay is pretty simple - you control a little fish that eats smaller fish. Bigger fish will eat your little fish, so avoid them! There's the added complication of poison fish that you must avoid at all costs (even if they're tiny). Once you've eaten enough little fishies (empty hunger meter), you progress to the next level where you'll be a bit bigger. Of course the screen is no bigger, so dodging the predators will get harder the more you progress! Simple game, but fun and addictive :)


I've added a couple of new features to Little Fish too. First there's a kids mode, there are no gameovers in this mode (unless you choose to quit) the tradeoff being no global leaderboard score submission. I've seen lots of little children want to play mobile and tablet games recently, but when they are very small it can be frustrating losing quickly, the kids mode will help keep them happy and occupied for longer. It can also double as a training mode, once the child has mastered the more forgiving kids mode, they can try the more challenging normal mode! The other new feature is extended controller support. Not only can you choose to control the Little Fish by touch or tilt, you can also use the dpad of an xperia play (and hopefully any other android device that has a control pad) or a HID compliant external controller. The guys over at Moga recently sent me some awesome free stuff, and it was an absolute breeze to get Little Fish working with the Moga in HID mode. When I've had time to play with the Moga SDK properly I expect I'll write a blog post dedicated to that.


I hope you'll check out Little Fish and of course all my other games. As always, I hope you have fun!

Saturday, 19 October 2013

LibGDX Google Play Game Services Tutorial


Google Play Game Services offers cross platform social leaderboards, achievements, and much more (realtime multiplayer, cloud saves, anti-piracy...). I've started implementing google play game services leaderboards and achievements in my LibGDX Android Games, and the purpose of this blog article is to walk through the process so you can do the same!

  • I've published an example project on Google Play check it out!
  • The example project is freely available on GitHub check that out too!
  • You can also get the complete (free) version of Super Jump a Doodle here!

Continue reading after the jump to find out how to add these features to your own games!


Monday, 10 June 2013

One million installs!


1,066,345+ users have installed my LibGDX Android games :)

Due to reporting lag that number is a few days out of date, and it doesn't include installs from third party scraper style stores, so the real number will be a little higher, but I can safely say I have over a million installs in total. Awesome :)

So, how do the various markets stack up?

Sunday, 26 May 2013

Street Race Swipe LibGDX Scene2D Tutorial



I have been meaning to write a LibGDX Scene2D tutorial for some time now (ever since my Quack Attack FREE Duck Hunt Game got ridiculously popular). The problem has been finding the time, instead of writing blog entries I've been making games!

I had a great idea for a multitasking game, play four independent games at one time to train your brain and test your ability to multitask. The result was my 4 Games 1 Screen FREE Brain Training Game. I built this game as four separate games from the outset, with the intention of possibly building further on each minigame and releasing as standalone apps. The first of these standalone apps is Street Race Swipe Racing Game, which brings us neatly to the point of this article...


Street Race Swipe Racing Game is such a simple game at its heart that it seems like an excellent candidate for a tutorial article :) I remember being massively impressed by the example SimpleApp on the LibGDX wiki when first starting out, there was so little to it but it touched on all the basics of what is needed to make a game. I'm hoping this mini project will be almost as simple and just as helpful to others!

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 :)


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!


Saturday, 10 November 2012

Enabling the "Move to SD card" option on your android apps


Here's a quick and easy tip that your android app users will love, especially those with older/cheaper devices that don't have a huge amount of internal memory!

Take your existing android application, and add android:installLocation="auto" to the manifest tag in AndroidManifest.xml.

Example:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   package="com.mrdt.zombiesurvivalgame"
   android:versionCode="2"
   android:versionName="1.0.1"
   android:installLocation="auto">


  • Setting installLocation to "auto" means the user can choose where to install the application.
  • Setting installLocation to "internalOnly" means the app will install on internal memory only (not ideal in most cases, especially if your app is quite big).
  • Setting installLocation to "preferExternal" means the app will automatically try to install itself of the SD card if it is present and is not full.


You'll also need to ensure that your build target (targetSdkVersion in uses-sdk tag in AndroidManifest.xml) is set to API Level 8 or greater.

Example:
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="15" />

Save your updated AndroidManifest.xml file, rebuild your app, and deploy to a device or virtual device running Android 2.2 or above. Now if you open Settings > Applications, and select your app, you should be offered the option to "Move to SD card" :)

I've just updated my android games to offer users this option, and it'll be something I'll be doing as standard in all my future apps. If you're an app developer you should consider doing the same... As a user I appreciate being given the option to choose where to install my apps - and I'm sure others do too!


Sunday, 21 October 2012

Making a game in a weekend… Can it be done?


UPDATE - Download the finished game for free here!

I’d like to enter a Ludum Dare 48 hour competition one day, but I don’t think I’m ready yet. Create a finished game in a single weekend, sounds like a monster task!
This weekend I decided to give it a test run, see how far I can get in a couple of days. The answer is – further than I’d have guessed! Here’s a runthrough of the process…


Saturday, 25 August 2012

First 3D project

As expected, I ended up starting a new project... It's quite a leap up from what was achieved in Race Game.

Laptop video (shows 2D and 3D rendering plus raw map files):


Android video (shows smooth 3D rendering on android device):


Next steps will include:
  • Control scheme to suit android devices
  • Nice 3D models for keys, treasures, etc
  • Animated opening doors (quite how is a mystery!)
  • Cartoony / cutesy graphics and sound
  • Level select screen
  • Level complete screen
  • Game complete screen
  • Efficiency improvements
  • Lots more level maps
I think I'm going to drop the 'score' aspect, instead an achievement based level rating sounds good... Finish level for one star and ability to progress to next level, finish level having collected all treasure awards additional star, finish level in under X seconds awards additional star. Quite easy to progress through the levels, but replays required to get 100% perfect three star level rating.

Interestingly, Race Game has a fair number of android 1.6 users. Considering how few 1.6 devices exist, it's clear that there are people out there with low spec devices that want to play casual fun games. With this in mind, I'm going to keep striving for as near global compatibility as possible.

This game will be an arcade/maze/puzzler/adventure mashup. I'm going to leave out enemies, make it more about getting to the exit quickly, exploring, etc. This simplifies things for me, and should result in a game that appeals to quite a wide market.

A separate game that introduces first person shooter elements (zombies, weapons, and a darker art style) could be built on top of this base later on.

The code is freely available here, and there's a demo up on google play - check it out!


          

Saturday, 21 July 2012

Focus on “Fun” and “Finished”…


Last week I installed the Java JDK, Eclipse, Andoid SDK, and the ADT Eclipse Plugin. I then followed the LibGDX starter project walkthrough.

That single class project weighing in at just 150 lines of code (including whitespace and proper formatting) does a lot. It uses an OpenGL camera, loads image files, draws them to screen, responds to user input, plays soundfx and music, and has a simple game mechanic that makes it a basic game. Not only that, the game could be played on my dev laptop, and on my Xperia Play with no code changes. I was impressed.

Instead of going on to create LibGDX pong and slowly working up from there (as was my original intention) I decided to play around with the example project a little. The bucket became a spaceship and the raindrops enemy UFOs (each had their own class), nobody had any weapons, the UFOs were kamikaze maniacs and moved at varying speeds, aim of the game – avoid being hit. I added the concept of score and health, for each successful evasion you earned 10 points, for each impact you lost 25 hp. Four hits and it’s game over. Still very simple, and kinda fun.

Next steps would have been to introduce weapons, after that more enemy types, then a highscore table, then animated sprites, then maybe an end of level boss, then lots of levels to work your way through. Before you know it I’d have my very own r-type clone on the marketplace! But that’s not what happened. I started worrying that I was doing it wrong, not following the ‘correct’ path, not making the right design decisions. I read a couple of great tutorials (obviam.net and steigert.blogspot.co.uk) and immediately tried to implement those best practices in my simple app. At this stage, as a beginner, it was overkill. I ended up with a confused mess of files, and when extending I was often unsure if I was putting code in the right place. It was so much more fun when I was freestyling, making it up as I went along. Sure it could end up biting me on the ass later, but maybe I should just deal with it later and focus on making a fun little app for now. That’s when I stumbled across this excellent blog post. Here are a couple of choice excerpts that resounded with me:


  1. Don’t Obsess – your code is your code and I know you love it but how beautifully shaped and how wonderful the architecture is doesn’t matter one bit to the end player, especially if the game doesn’t ever get to be playable. Do not obsess about your code. Make it work. Make it quick enough. Make it pretty. In that order.
  2. More than one way to skin a cat – there are many ways of approaching any problem in software. There are normally a set of “right” ways that are well explained in long tutorials on the web. You go off and read the tutorials and you start implementing… You’re not entirely sure you understand what you’re doing, but you just keep going. WAIT! STOP! How about you just code it the “wrong” way for now, just make it work and if it doesn’t feel right later replace it.

Wise words indeed.

Grand arcade games can wait. I’m going to follow my original plan – I’ll write a LibGDX pong game. Then I could take what I’ve learned and write a breakout game. Baby steps that result in regular releases of small working games. I’ll likely end up using really bad practices, but I’m doing this primarily for fun and the joy of creating a working game others can play, learning is a secondary concern. If and when bad design leaves me in a fix I will learn a first hand lesson and better understand the benefits of a rigid design pattern, but to start with I’m just gonna be jammin – I’m going to let myself make my own mistakes!

Android, a modern day Spectrum for amateur game devs


Way back in the 80's I received an Atari 2600 for Christmas. It was awesome. Let’s forgive and forget the crappy graphics, the dodgy one button joystick, the awful sound processor… None of that mattered. This was a machine that transformed my tv into a damn arcade machine – how could it be anything other than awesome!?

I loved my Atari. I spent hours playing classic games like space invaders, pacman, and centipede. But the following year Santa brought me a Sinclair Spectrum +2A… The Atari’s reign as toy-king was cut short. What can I say, I was a fickle child and this new machine could not only play games – it came with the promise of me creating my own games too!

The Spectrum holds a very special place in my heart. I know many of my generation can say the same. I still have it, it has survived numerous house moves and clearouts, I will probably still have it the day I die. Why? Was it the perfect machine? Blisteringly powerful and immune from Moore’s law? No. But just like the Atari, it was awesome all the same. My time was spent playing Dizzy, Manic Miner, Chaos, Arkanoid, Klax, The Great Escape, Deathchase, Potsworth and Co, Wonderboy, New Zealand Story, Blob the Cop, Wizball, numerous text adventures, and so many other great games that I can’t quite remember right now. There was also the bundle of games that came with the machine, pretty basic games but fun nonetheless, Treasure Island, Oh Mummy, Crazy Golf, Punchy, Disco Dan, etc – poor graphics and sound, but solid game mechanics that made them fun to play regardless. I’ve played worse playstation / wii / 360 games than some of these ugly spectrum games. Sure the modern platforms have the aesthetic upper hand and bags of processing power, but if the game itself is no fun, all it boils down to is an exercise in turd polishing. A fun ugly game beats a rubbish pretty game hands down.

Sinclair did all they could to make writing your own programs pain free. The +2A had a basic parser built in, and a tape deck for saving/loading your work. The manual was mostly dedicated to the basic language, and there were loads of third party books and magazines available that included sample code for you try out. In a pre-internet era I spent a lot of time with that manual, my Your Sinclair and Sinclair User magazines, and anything relevant I could find in the library. As a result I wrote some ugly fun games of my own. Pong, breakout, space invaders, that kind of thing. They didn’t really look much worse than some of the commercially available games, and played just as well, so it was quite a rewarding process! Of course distribution was limited to a very small number of my friends who were still in the least bit interested. The Sega Master System and Nintendo Entertainment System were out by this time, the Spectrum was decidedly uncool to those who were only interested in playing games, not making them. My audience was basically me, my family, and a couple of friends from school. It was a lot of fun creating though, I didn’t really care that the resulting game was pretty much just for me to play!

After the spectrum came the closed platform years. NES, Megadrive, PSX, GBA, PS2, PSP, Wii, Xbox360. Buy a consumer unit, play games on it, nothing more. Well, that’s not completely true, I did hack the wii and write a very simple target shooting demo a couple of years ago, but I felt way out of my depth and didn’t get very far at all. Similarly I started messing about with the kinect and unity, but felt like I was spending my time configuring someone else’s tool and not actually doing anything too interesting myself, so didn’t progress too far with those either. I’d say the nearest I got to writing games since the Spectrum days was either using the Game Maker engine to make some fun platformers, or writing basic Java apps for university assignments. Game Maker is a nice tool if you just want to create something fun to play, but I’d prefer to learn a language and more transferable skills than tying myself to an existing engine. The java assignments taught me some transferable skills (mostly forgotten by now), but weren’t all that fun. There’s another problem with writing desktop games too – trying to get people to play your basic puzzler with graphics the Atari/Spectrum could have achieved when they’re used to playing CoD and Battlefield is going to be an uphill struggle.

Enter Android, the saviour. It ticks all the boxes:

  • Open and free SDK
  • A thriving dev community
  • Chance to learn some transferable skills (java programming, game design, graphics and music creation)
  • Relatively mature LibGDX library – helps developers without reducing the whole process to a game engine config exercise
  • Loads of devices, lots of people already have a ‘console’ capable of playing any game you create
  • Marketplace to easily distribute end product (free after one-time setup fee of about £15)
  • A natural leaning towards casual games – people are more likely to play your basic 2D fun game

So for a grand total of £15 I can create some simple games in my spare time and anyone in the world can download and play them? All the while I’m learning new skills and having fun? I’m in!

I’m going to be approaching this as a complete beginner, I will make mistakes, I will be inefficient, my games will likely look like crap, and I’m certain nobody will want to pay for anything I produce. My games will be open source, and I’m hoping to get them to a “finished enough” state that I can make them available for free on the Google Play marketplace. All the while I’ll be re-learning what little Java I once knew, maybe picking up a few tips on pixel art, and hopefully learning a little about making music. Eventually, I’d like to get to the point where I could enter a game development challenge like Ludum Dare and actually end up with a working game at the end of it. I’ll post what I learn here, but please be aware that any tutorials will probably be as far from best practices as you can get – I’m just gonna be doing things my own way and posting the results!