Sunday, February 20, 2011

Android Project - Train Game Design

I've had a slight pause in my game project due to coming up against my first major design decision namely what is my game actually going to be about. 

I've ruled out porting Brick of Destiny and on closer inspection I'm not convinced either of the ideas I mentioned in my initial post are going to work out.

I still stick by my initial assessment that there is absolutely no point in rewriting a classic unless I'm convinced I can do it better than Zynga, Glu or any of the hundreds of well funded casual game devs out there.

I've played and downloaded a lot of Android games and I've come to the conclusion that I don't really like tilt controls. or on screen joysticks for controlling action games which pretty much rules our classic shmups, platformers, or racing games. 
I want something that's a natural fit for touch controls, but I still want something that has a proper game loop and gets the heart beating a bit faster.

There's an awful lot of games out there and it's easy to think that all the good games have been done. I've literally kept my self up at night trying to think of an original game idea. 
I very nearly considered a remake of a PC game I was a huge fan of called Sheep, but a quick look at the Android market showed that several people have had the same idea. 

I had my eureka moment this morning. I've always loved the scene in Wallace & Gromit where Gromit has to lay the tracks out in front of the model train. I briefly thought about making a game where you have to lay tracks in front of a train but I realised this would be nothing more than a remake of Pipe Mania and there are dozens of those out there. I also briefly considered a remake of an old Amstrad game called Locomotion which is a similar concept with a sliding block puzzle twist.

My moment of revelation was thinking about the on rails sections of Mario games where you have to ride along on a moving platform hitting switches to change course and avoid obstacles. This reminded me of the mine cart mini game in the Indiana Jones arcade game (skip to 1:30). 

I've had a bit of a rummage around on the Android store and I can't find any decent mine cart, or train based games. I also spent a bit of time searching for flash games (including a site dedicated to train based flash games!?!) and though there are a few games that have a train points mechanic they are usually focussed on managing a station rather than guiding a single train. 

So the concept I'm going for is keeping a train running on the tracks. 
The screen will contain four parallel tracks the train can be switched from one track to the next by touching junctions on the track thus avoiding various obstacles. I'm a big fan of trying to keep something in a playable build at all times (especially due to my short attention span) so I'll probably knock something out as quickly as possible using horizontally blocks and lines and then add additional game play elements one by one getting rid of them if they don't work. Ideas so far are:

  • A cutesy cartoon type look possibly with isometric pixel art (I might also try some fixed perspective 3D if I'm feeling brave) 
  • Trains containing bad guys that you have to dispatch by forcing them to run into traps 
  • Obstacles that can't be avoided but have to be fixed for the train to pass by using touch gestures.
  • Depending on how I end up doing the graphics I may try my hand at a chip tune type sound track with some 8 bit synth action
  • Rather than have instadeath and multiple lives I'm planning on having train passengers acting as lives who fall out when the train gets hit and can be picked up by driving past stations
  • It would be really fun to be able to define rules for track layouts that provide a challenge, but are guaranteed completable so I could have the levels procedurally generated rather than defining them by hand
  •  The game should progressively speed up throughout the level possibly with some power ups which allow you to speed up or slow down the train. 

I'm glad I've finally got an idea I can start implementing. The next step is throwing some code together and seeing what works. 

Saturday, February 19, 2011

Review - Blur PS3

I received Blur today from Love Film. I had high hopes, but unfortunately it was one of those games that was in the console for about half an hour before it was back in the envelope ready to be posted back.

The concept of the game can be summed up very simply, it's Burnout crossed with Mario Kart (or if you prefer Wipeout with cars). You race around stylised tracks in real cars with arcadey physics whilst picking up various power ups that fling balls of glowing energy into your opponents. The graphics and presentation are very impressive, but ultimately the game just isn't fun. 

Combining the two genres of cartoony Kart game and arcade adrenaline racer must have seemed like a winner on paper, but they are fundamentally incompatible genres. In Mario Kart the unrealistic physics of the tiny nimble cars allows you to dodge your opponents shells and makes targeting tricky, but a game like Burnout is all about the feeling of weight. A great arcade racer gives you the impression you are hauling tonnes of protesting steel teetering on the limits of traction moments from disaster. The upshot of this dysfunctional marriage of genres is that in Pure with it's large unwieldy muscle cars it is trivial to hit and virtually impossible to avoid being hit. When 20 cars are participating in a race armed with a near limitless supply of homing missiles and leader zapping lightning you might as well call it blue shell the game.

As is par for the course in such games you start at the back of the pack and have the benefit of being slightly faster than your opponents. Making your way to the front requires little more than not crashing for a couple of laps and once you are there it's simply a matter of luck if you will get zapped on the last corner and end up finishing in 10th place. It's not just that when you fail it feels like a cheap loss you also start to feel that victory is equally random and thus hollow. 

Checking Metacritic it looks like Blur got some pretty solid reviews, but I wonder how much that was a result of Activision leaning on the press as by all accounts the game tanked at retail leading to the Bizarre Creations eventual demise last month. My heart goes out to all the guys facing redundancy as you can tell a lot of love went into the making of a game which ultimately doesn't really work. Bizarre will always have a special place in my heart as quite apart from their stand out hits Project Gotham and Geometry Wars the studio's first ever game was The Killing Game Show an Amiga classic which I loved as a kid. 

I'll leave you with Bizarre's farewell video montage as a reminder of the great work they've done over the years.

Thursday, February 17, 2011

Playstation Plus - A Good Deal?

I've not been doing my usual amount of gaming recently. First I got Metroid Other M from Love Film which didn't work because apparently older Wii's stop playing double layer disks. 
Then Bioshock 2 arrived, but though I think it's a decent game it didn't really work for me so I took a trip to the Playstation store to see if there was anything worth buying. I've been wondering about the Playstation Plus service for a while, but I've been resisting. There were about half a dozen games I liked the look of and for £11.99 for a 90 day subscription it seemed like a pretty reasonable deal.

The small print is that you don't get to keep the games if you cancel the service, but then there are virtually no games that I'm still playing 90 days down the line so I'm not going to worry about it and I don't let it stop me subscribing to Spotify. I used to sign up for the view that you can resell physical products but having looked into selling my old games on Amazon, most of them seem to only be worth about £5 which isn't much return if you bought a new release for £50. 

I'm planning on making a few notes about it over the next few weeks so I can decide if it's worth it when the subscription renewal is due.

 
One of the things I was most looking forward to playing from the first batch of games was Magician Lord. When I was a kid there was nothing I coveted more than a Neo Geo with Magician Lord, but at £600 for the console and £200 a go for the games it was never going to happen. Having played it I'm glad I didn't part with my hard earned cash back in the day because it turns out it's unreasonably hard and not all that much fun. Lets hope they put King of Monsters, Bust a Move, or King of Fighters on there soon as they are the pick of SNK bunch.

Of the games I've played so far Shattered is the game that I most enjoyed. It's a superb HD remake of Breakout (you know I have a soft spot for these types of games as I wrote one ).
As well as really well balanced game play it has a great electronic soundtrack and some nifty features like the ability to move things with force waves. If you like bat and ball games you really have to play it. 

It really does validate my requirement that I try to make something with a twist for my Android project as you really can't compete with big studios if you are making a straight retro remake. 

Tuesday, February 15, 2011

Android Project - LibGDX

After a bit of research on Android frameworks I've decided to go with LibGDX. It looks like an excellent framework and has the advantage that Android is just one back end to the framework. It can also build for JOGL to produce a desktop app. As well as the obvious advantage of having two platforms for the price of one it also means you can play with the desktop version while you are tweaking gameplay without having to continually go through the rigmarole of building for the emulator. 
LibGDX is an OpenGL library and unlike some of the more beginner focussed libraries it doesn't sugar coat anything, it expects you to deal with it's eccentricities.

I noticed that many of the other Android libraries seem to be using the libraries from LibGDX so I thought I might as well go straight to the source. 

For those who are not au fait with such things OpenGL is a library that provides a standard way to talk to graphics accelerators. Before it existed people writing PC games had to write their own drivers for every single graphics card they wanted to support. OpenGL compliant hardware supports a standard set of features if you write code using an OpenGL library it will work any compliant hardware. 
You might wonder why graphics hardware is important if you have a device with a speedy processor. CPUs are what's called a Turing machine which means they can do pretty much anything you can dream of while graphics accelerators can only perform a very limited set of instructions tuned for moving shapes around, but because they are so specialised and perform actions in parallel they can increase graphics performance, by a factor of tens or hundreds.  

Previous Java games I have written have used the Java2D library which allows you to draw graphical primitives on a canvas without graphics acceleration and while this might be fine for a simple game running on a desktop PC if I have any aspiration for writing more advanced game on heavily resource constrained devices I'm going to need to learn how to use hardware accelerated graphics (That said I developed my desktop game on an 800MHz PIII and will be developing my mobile game on a 1GHz Galaxy S)

I'm definitely going to use the Box2D library in the future, but I think in order to get on with writing a game without having to spend to much time learning stuff I'll make OpenGL the new thing for my first project and introduce Box2D on the follow up. 

I've been toying with the idea of updating Brick of Destiny to use OpenGL, but having reviewed the source I used the collision detection from Java2D quite extensively and the game also has a fixed frame rate which would mean tinkering with the rendering and simulation quite a bit so much so that it wouldn't speed things up that much. Last but not least I made a few school boy errors in the code as a gaming noob and so I would either have to waste time fixing them, be forever annoyed by bad decisions.

Next time hopefully I'll write up some concrete game design for my project. 

SQL Hell

Today I needed to install MS SQL Server on a PC.
My usual experience with installing a database engine is MySQL on Ubuntu where you open a terminal and type:
"sudo apt-get install mysql-server"
That's it job done. 10 minutes later and you have a working DB on your server. If there are dependencies or things it needs to change it works it out for you and sorts it.

Here is the process for MS SQL Server 2008 on my XP PC

  • 9:20AM Decide to install MS SQL Server
  • Search google, go to the SQL Express 2008 site
  • Run somekind of Java downloader which crashes firefox
  • Installer application reuiqres a hot fix and will not run
  • Manually download and run hotfix
  • Reboots computer without asking work lost
  • Run graphical installer agree to EULA
  • Will not install because power shell is not installed (No information provided as to what this is or how to get it)
  • Back to google
  • Can't install powershell because it can't validate Windows is genuine
  • Download validator tool
  • Run tool manually copy validation code into website
  • Download and install powershell agree to EULA
  • Installer won't run because the machine has Visual studio 2008 but this is not patched to SP1
  • Visual studio will not update because I am not using Internet explorer
  • Back to google
  • Download visual studio 2008 SP1
  • Run graphical installer
  • Agree to licence terms
  • Visual studio 2008 Installer takes half an hour to run
  • Go through pages of incomprehensible set up dialogues
  • SQL Server 2008 installer takes half an hour to run
  • 12:07 Installer completed
And people say administering Linux is hard......

Saturday, February 12, 2011

Nokia and I (A cautionary tale)

So today the long heralded rumour was confirmed and Nokia announced that over the next year or so it would be euthanising its ailing Symbian mobile platform. 
I've been following the ongoing saga of Nokia's slow fall from grace for some time, partially because I work for a company that develops mobile phone software (amongst other things) and partially because of my own experiences with Nokia over the years.

When I think back it seems like an impossibly long time ago that people marvelled at Nokia as kings of the user interface. I realised that looking through the history of my experiences with Nokia shows problems that started before the iPhone hit the market and are rooted in taking your consumers for granted.
 
Love At First Ring

My first Nokia was also my first ever mobile phone. I had just arrived at university and the phones in the halls of residence were painfully expensive as was the norm in the pre-ubiquitous mobile ownership days of the late 90's. 
I could barely afford the contract as it was, but when I saw the sleek and sexy lines of the 3210 I knew I had to have it. It stood out like a beacon amongst the lumpy grey boxes with external aerials that filled the shop. I never regretted the extra I had to pay for it. It served me for years running through several batteries and cases. The user interface was perfect; snappy and everything where you expected it to be. 
When it finally died I replaced it with a 3310 which was the same only better. I kept it until it died shunning such decadence as colour screens and polyphonic ringtones as the frivolous distractions they so clearly were.

The Finnish Rebellion

Some years down the line the company I worked for were bought by German engineering behemoth Siemens. As a result everyone had to hand in their corporate issue Nokia mobile phones and get a shiny new Siemens mobile phone. The backlash was huge. People flat out refused to to return their Nokias others went out and bought replacement Nokias with their own money. The clunky Teutonic user interface of the Siemens phones seemed stone age by comparison and besides every desk in the building featured the ubiquitous Nokia charger.

Smartphone Hell

Tempted by the prospect of a 2 (count 'em) megapixel camera I defected to a Sony Ericsson K750i for my personal phone. It had plenty of snazzy features, and it was a good phone, but it didn't have the battery life and snappy streamlined interface of my old 3310, or my corporate low end Nok. 

When I went with the good lady wife two replace her ailing phone I happened upon such a thing as a Nokia N73. This the man in the shop explained was a "smartphone". It could play video, retrieve my e-mails and even browse the internet and more than that it was made by Nokia the Finnish masters of user experience. I bought the phone and upgraded my subscription to take into account all the data I would soon be using.
The first thing I did when I got it home was try to listen to an MP3 except it didn't have a headphone jack. I had to buy an adapter which I promptly lost then gave up. The e-mail client flat out refused to pick up my GMail, It was too much bother to get video into a format it would play and the browser was a bad joke that I never managed to do anything useful with (I remind you I'm an engineer not an average punter).

As a professional geek I decided I would write some apps for it, but a quick look at the development environment told me it would be a nightmare.
To cap it all the phone would randomly crash, or switch its self off. I couldn't believe how one of my favourite tech companies Nokia could produce something so defective.
To give you an impression of how much I hated this phone, my wife banned the subject in our house so frequent were my tirades on its deficiencies. 
Maybe it was just a duff model. I asked around. A friend who shelled out for the even more expensive flagship N95 told me that when his contract expired he was planning to hit it with a hammer and then burn it in the garden. 

Running to Standstill 

When the iPhone was released in 2007 the world changed. I was surprised to discover that the iPhone 2G specs weren't a patch on my year old N73 (no 3G, worse camera, no flash, no SD card, no front facing camera), but the difference was that suddenly everything worked, e-mail and web browsing were a pleasure. 

A year down the line in 2008 and the press were full of tales of the forthcoming Nokia 5800 the new touchscreen device that would level the playing field. 
A perk of my current job is that I generally get to play with every high end phone on the market. When the 5800 arrived I decided to use it as my work phone. I lasted half an hour. The clunky resistive touch screen interface was so broken that I couldn't even make phone calls or write text messages effectively. 
Though each successive generation was heralded as the iPhone killer, four years after the release of the iPhone the current £430 N8 flagship is still years behind even the first gen Apple product in the UI stakes. 

How were these things even selling? I asked myself.

Backlash Begins
I started to understand what the answer might be when I went into town to look at the brand new Android phone the G1. I asked if I could try it and the guy in the shop said no. I asked how he expected to sell any. He said "Most people either know what they want from TV advertising, or else they buy what the sales assistant tells them to buy". When you couple this with the fact that most newspaper phone reviewers don't bother to test phones (they essentially republish bits of the press release and rate it according to the specs) and you can see how these pieces of junk get into the hands of a lot of people. 

The thing that seems to have passed Nokia by is that these phones are being sold to people not statistics. A two year contract is a very long time to be stuck with a device that you hate and by the end of that period you are going to be pretty pissed. When I traded my n73 for an Android phone I made a promise to myself that I wouldn't buy another Nokia mobile phone without very good reason and I don't doubt that there are millions of people who feel the same way. Perhaps this is what Strephen Elop means when he talks about Nokia loosing mindshare in the mobile market. 

When I have some time I'll give my thoughts on the Nokia / MS tie up, but now I need to go to bed.

Thursday, February 10, 2011

Android Project - Game Engines


In the comments to my previous post iPhone developer extraordinaire Chris suggested using a third party physics engine for my game. I don't know why I hadn't thought of this in the first place. For web development I wouldn't dream of starting a project without using a framework. After all the longer you spend writing loads of boilerplate code the less time you have to spend on the good stuff.

Chris suggested using the Box2D library which looks very good. As Android is a Java platform a Java library would be ideal and luckily some helpful chaps have ported the library and called it JBox2D. There are some very nice looking demos on the website and a helpful tutorial about getting it up and running on Android. I was slightly concerted when playing with the applets that there were a few freezes and stutters (My laptop is only a year old) and a quick search on the internets revealed that most  people were having problems with the Java garbage collector causing problems. 
Luckily all is not lost. Android is not a Java only environment thanks to something called the NDK (Which as far as I can gather is just Android's version of JNI) which allows you do drop meaty chunks of speedy C++ into your Java stew. This requires you to do a bit of work to wrap any C++ classes you want to use with a bit of Java.
AndEngine Logo

Luckily a bit more Googling revealed the AndEngine and libgdx a pair of free Android game frameworks. Both use OpenGL for graphics and rather conveniently integrate the Box2D library saving me the job of getting my hands dirty with NDK. Opinion seems to be that libgdx is faster and better documented while AndEngine is higher level and easier to get to grips with. I quite like the fact that libgdx offers the ability to compile into JOGL for desktop apps rather than having to continually build apks and test on the emulator. 

I'm still undecided between the number puzzle and the jumping frog game but either way I'm going to give a framework a go and see what it offers. 

Wednesday, February 09, 2011

Planning an Android Game Project

BOD.png
Back in 2008 when I wasn't feeling particularly engaged with my day job I wrote a Java game called Brick of Destiny. It was one of the most rewarding projects I've worked on and it inspired me to get a job where I could spend more time coding. Two and a bit years down the line and it occurred to me that since I've been a software developer for a living I haven't really done much in the way of coding outside of work, something which I intend to remedy by writing a game. 

I have a few objectives for the project:
  • Simple and self contained as I have a short attention span
  • This isn't an intellectual exercise I wan't to write something people will play
  • I don't want to write something there are a thousand versions of as someone with greater resources will probably have done it better so Pac Man or Space Invaders is out of the question unless I can give it a twist
  • I'm going to document the development process on my blog 
I have an Android phone and my Java is getting a little rusty so I'm going to write the game for Android as it's interesting to work within the constraints of a limited device. The Android Market also gives me the opportunity to get the game out to lots of people rather than the handful who played my last game.

I have the platform and the language so now all I need is an idea. I think a simple puzzle type game would be the easiest thing to implement as it can take place within a single screen and shouldn't require too much effort. 

I've tried to think back to games I enjoyed from the 8 bit and 16 bit eras for inspiration and so far I've had a few Ideas, but I don't have my heart set on any one thing yet.
So far my ideas include:

Stress
An implementation of the card game Stress. It's an interesting card game because it's real time so you don't play in turns which makes it more of an action title compared to your average card game. I was all set to get started with this until I realised that there is already a version of it on the Android market (This surprised me because it's an obscure enough game that Wikipedia doesn't know about it ). Having installed the existing game on my phone it's not the most impressive implementation so I'm pretty sure I could create something better. 

Jumping Based Platform Puzzle
My first computer was an Amstrad CPC 464 which came with a game called Roland In The Caves.
It was a really original if somewhat frustrating game in which you played as a flea trying to escape from a cave with the twist being that you could only move by jumping. I love physics based games and I think there is something very satisfying about games that involve objects moving with parabolic motion (For example Worms) 
The game I have in mind would be a series of puzzle rooms filled with obstacles that can only be overcome with precision jumping. I would also probably include some elements from Bill's Tomato Game which was an Amiga game I really enjoyed in which you had to place objects (springs, fans, etc)  to ensure the safe passage of a particularly squashy tomato through a level filled with hazards. 
I am quite taken with this idea, but it is definitely the most challenging game idea I have thought of and the Android Market is awash with high quality physics based puzzle games. 

Number Game 
Number based puzzles are always popular and it should be fairly easy to implement a single screen game. 
So far the best idea I have had is for a bejewelled style clear the balls from a grid type game using numbers rather than colours.
The objective would be to find lines of numbers within the grid which fulfilled certain criterion for example where the first two add up to the third, or where they are in ascending order. When these were found the numbers would explode and more numbers would fall into the grid. 
This is the front runner so far, but I need to think about the game mechanics a little more to make sure that it won't be trivial or impossible to play!

If anyone out there has a genius idea for a game but lacks the coding skills to bring it to life give me a shout also anyone who fancies doing some graphics for a game get in touch if you want to collaborate.

Hopefully I will have chosen an idea for my next post so there should be some more detailed design for the selected idea.