Showing posts with label Google Play. Show all posts
Showing posts with label Google Play. Show all posts

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!

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!

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



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, 21 July 2012

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!