Friday 12 February 2016

Our top 5 Project management tips for time starved developers

We've all been there. A great idea forms in our head and we just have to build it. This often means casting aside a previous great idea which grew to a gargantuan size. An idea which grew so large that there was no hope of completing it without significant effort...

Ideas are strange things. They come when they want to and creativity isn't always on tap.

They need to be managed to keep them under control.

Well, when the ideas come, you need a strategy to make sure you make the most of them.

Here are 5 tips to help you to develop your idea into something which you can build.

You'll also need a few things.
  • A note book.
  • A pen.
  • A sketch book (optional).
  • A pencil (optional).
  • A wall or whiteboard.
  • Post-it notes. (several colours if possible).
  • A marker pen.
  • A pack of sticky stars. (the kind used when marking kids homework; do teachers give gold stars anymore?).
  • ..and that guys leg. (just kidding)

Or,  you can use an online tool like Trello. 

We use Trello for all our projects; It's free and it lets you do everything I talk about here - with the possible exception of getting your fingers covered in glue from sticky stars)

Trello lets you create lists of tasks, move those tasks between lists and add labels. If there is more than one person in your team, don't even consider a whiteboard. Not unless you're always in the same room with them when you work.

1. Write down your idea. 

Use Google docs, word or something.

The longer it stays in your head, the more it will grow into something unworkable. Either that or it'll slip your mind completely or even morph into something else. Ideas are funny like that.

By writing down your idea, you make the first conscious step on the journey to make your dream a reality.

Perhaps draw some basic concept art to help you to form the idea,

Once you've written your idea down, read it back to yourself - out loud. This is important.

If you're not comfortable reading out loud, there's a great Text to speech Extension for Google Chrome called "SpeakIt!".

You'll be amazed how much more you'll learn about your idea by just reading back what you have written out loud.

Remember; An idea not written down is just a dream. A written idea can be reviewed and amended. Most importantly, a written idea is only one step away from the next most important step...

2. Make a plan.

Your written idea can broken into pieces to determine what tasks needs you need to do. It's at this point where you're looking to identify sections of work. Break your idea down into general sections.

Start out high level with big, high level sections, things like:

  • Menu System. 
  • Game play.
  • Music.
  • Sound effects. 
  • Art.
  • Levels. 
  • Weapons.
  • Characters.
  • Physics.
  • Controllers.
  • Achievements.

The list can be long.

Create lists using Trello or "post-it notes". You can use different colours to denote your expertise in that area or apply labels.

Make sure you create one called "Done"- This is the most important list to create.

Write as many of these high level sections as you can. At this stage it doesn't matter if you have too many or if they seem to overlap.

You can always merge similar sections together later on.

If you're having difficulty working out the high level sections, you should re-read your idea and consider...

"What will it take to do that?" 

You can always change your idea if you think you've missed something,

Be careful; ideas always spawn new ideas... in fact, one of the challenges of developing your own games is controlling this.

Remember to be honest about your skills in each area. You can mark the sections with a difficulty rating if it helps.

Once you have a list of all the high level sections, you can start to flesh it out.

3. Add tasks to each section.

This is where the fun begins. In a way, this is the first part of development.

When you create tasks, you're actively considering the problems you're likely to encounter. This helps you to solve them. List as many of the things you need to do for each section as possible.

For instance in the Music section, you may have tasks for Title, In game, Game Over and Intro. Each of these would be a task to complete by someone.

In the art section, you might have tasks to draw and animate the main player sprite. This might include player walk animation, player run animation, player jump animation etc.

Note that I'm not just generalising with a single task called "Player Animations". That's too big a task and could roll on for weeks without seeing any progress.

You see the trick to keeping a project alive is to always make progress...  The only way to do this is to always have tasks you can complete.

You'll start to see a lot of tasks appearing as you break the design down into workable units of work. You'll see sets of tasks for entire features.

In some cases some tasks will be more important than others so you'll need to prioritise them as such. This is where our marking stars come in.

You see, you're trying to isolate the "MVP".  Minimum Viable Product.

It is the set of tasks you need to make the basic playable version of the game. You should focus the most on tasks which will get you to MVP.

Consider your tasks. Which of them are "absolutely essential" to get the most basic version of your game written and playable?

Put Trello labels or gold stars on each of them. They're the important ones.

As you create your tasks, you should think about breaking them down further. Can you complete each of your tasks within a reasonable amount of time or will each of them be a long slog?

To this end, you should...

4. Be honest with your time. 

and make each task something you can complete in a single sitting.

The amount of time you have will depend on several factors. Spouse,  children,  study time, day job, pets, hobbies. These all have demands on your time to some extent,  reducing your available time to spend on your game.

If you start the project believing you'll have your full allocation of time to spend then I've got news for you. Life happens.

Unless you're in a locked room without any contact with the outside world, you'll have distractions.

There is no point over estimating the amount of time you have available per sitting.  You will only be deceiving yourself and this will make you fail.

Be honest, place a post it next to your tasks with the number of hours per sitting you can spend written clearly on it. It doesn't matter if this number seems low, that you only have a few hours per sitting. At least you know, and this can change over time.

Note: I said per sitting,  not per day. If you can't work everyday that's fine. But when you do work, you should be sure you have the time  available to work on your tasks. Without too many distractions anyway.

Once you have calculated out how much time you have per sitting, you should use that as your guide. Use this value for estimating your tasks.

5. Create tasks sized to one sitting at a maximum. 

For instance, if you know that you can draw one character per evening, then have one task per character. Then every day, you 'll have something to put into the magical Complete column.

Maybe it takes one sitting to draw and one sitting to animate. It's entirely sensible then to make two tasks for that.

If you have a task which seems difficult to break down, you can break it down based on classes or drawings if you need to.

E.g. If you need a terrain renderer: This is only one part of your game but it's a large coding challenge.  Luckily this is something you can break down. I wrote a 2d random terrain generator and renderer. I needed a fractal height algorithm. I also needed a camera system with view frustrum. I needed  a polygonal renderer and terrain detail sprites. The terrain should be generated on the fly and destroyed when off the screen. I also needed Farseer collision detection.  

All these tasks fit under the generic task of "Terrain".

So I broke it down into achievable tasks and hit them one at a time per sitting.

There is no point in trying to fit too much into a task. If it can't be completed in a normal sitting,  it should be broken down further. You must have something to complete!

If you're not sure how to do something,  create a task solely for research.

Spend your entire allocated time on learning if you need to. You'll be better for it.

Researching is a task just as much as coding or drawing is.

Write it on a note, add it to the board.

6. Nothing is cast in stone.

Everything can change. Review your plan regularly. Update it, it will keep you on track. You should aim to do this either at the end of each sitting or at the beginning before you get to work.

It's OK to make changes too, sometimes we uncover things about the design we had no idea about. You can add new tasks, remove tasks or update them to cater for the new information.

Did you make an assumption which turned out to be incorrect?  No problem. Have a think about it, review your design and alter your plan. Follow the basic principles discussed above and you'll be fine.

If an idea turns out to be too difficult,  again no problem.  Simplify your design and review the plan. This is a good thing to do anyway.

You can do this review at any point in the process.  Just make sure any team members are aware of the changes to the design as it could affect their work.

It could be that the design is fine. But after looking at the sheer number of tasks it becomes obvious that the idea will take too much time to build. Don't worry, if your design seems to be too large, Simplify it. Remove features which aren't required or replace them with a simpler alternative.

You can always tackle the full idea later. Remember : before Halo, there was doom. Doom was once the pinnacle of 3D shooters. Yes its design was constrained by the limitations of the available hardware and skills of the developers at the time. It's OK for ideas to evolve and to make more advanced version of your game later once you've proven the concept.

If it's successful, you may even have a bigger team to work on the next iteration of the game idea.

But you must complete your initial version first.

Hang on, wasn't this supposed to be 5 tips?

Well, nothing in Project Management ever goes according to the initial plan. You'll always have something which comes out of the blue. The key part of project management is actually managing and controlling change. Customers may tell you they want something only to change their minds later. Ideas may start out as one thing only to become something else later.

If we stick to the initial ideas, we'll never complete our ideas.

Accept the change.

Understand the change.

But most of all, Manage the Change.

Best of luck.

Thursday 28 January 2016

Porting Pixels

2016 GameJam #1 - PortCrunch

So on the weekend of the 15th of January 2015 - Dean and I worked on another game with a target of getting it working on Android, iOS, Windows, MacOS in one weekend.

Anyone who follows our antics will know that typically we try to create a game or at least a prototype in a weekend. Sometimes we attend organized game jams but always, we create something new ourselves.

Apart from this time.

This time it wasn't one of ours.

Introducing Pixel-Blocked! A sweet puzzle game by Daniel Truong (of Daniel Makes Games) which oozes innocence until you realize that underneath those cute and colorful pixels beats a sinister heart.

It's one of those game which has a novel concept, well thought out controls and a nice difficulty curve - easy enough to lure you in and difficult enough to keep you coming back.

It also has a set of awards and unlockables for those who relish mastering a game instead of simply playing it.

He's also made bunch of other games which can be found on iTunes.

We figured it would take us a weekend, so we made a GameJam out of it.  We wanted to do a good job which did the original game justice and have fun with it. We'd have our work cut out for ourselves for sure.

This wouldn't be a gamejam, it would be a ...


First steps

On Friday evening we created the project structure to get us going and played the Windows Phone version to see how much work would be ahead of us.

The game was originally built using XNA with C#, which meant a port to MonoGame would be pretty straight forward.

Because Xamarin and MonoGame work really well with shared code projects, it's reasonably easy to get a cross platform game up and running.

This meant that the majority of the porting work would be dealing with the differences in hardware, not operating system.

Obviously there are a few gotchas when porting, however for the most part, it's plain sailing.

Shared Code FTW

You have a common code project which contains the bulk of the game code and individual platform specific projects which contain the platform specific stuff - usually, this is very little, just the launcher and icon sets but it also has a content pipeline file.

Building the content pipeline.

The MonoGame content pipeline allows you to compile your content for specific platform and place them into the project. They allow for platform specific conversion to be done automatically so there's less to worry about as you add content to your game and make changes. It handles audio, graphics, shaders, fonts... and a lot more, making sure the content is properly compiled and put into the right place.


Pixel-Blocked! uses shaders for some things, so it was important to get these compiled for the correct platform. Once again, the content pipeline to the rescue. By making a few changes to the base shader code, they could be compiled for any of the supported GPUs.

There are some gotchas with shaders which  you may need to be aware of. More on that later.

Nothing is perfect...

While porting the shaders, we found a bug in most recent Stable MonoGame - Dean has since fixed it so it should be available in a short time for everyone. It's handy having someone who's really hands on with the MonoGame code-base.

Screen Resolutions.

The game was written to support a fixed resolution. After-all, the graphics are intentionally blocky so scaling is not going to be a problem, however getting the game to look good on different screen resolutions is always painful. Coupled with the fact that the came adjusts itself for Portrait of Landscape depending on how you're holding the phone... multiply those problems.

Render Target or Scaled co-ordinates?

The initial desktop version of the game drew its graphics to a render target which could be scaled. A sensible approach and one used by many developers.

This is a great way to achieve a constant look to your game - also an approach we've taken with one of our unreleased games; unfortunately we encountered problems with the Amazon Fire device with Pixel-Blocked! so we had to change it and adopt a more traditional maths based co-ordinate scaling technique.

There are pros and cons with any scaling technique when dealing with different screen sizes.
You see the problem is of aspect ratio. You can't simply fill the screen or things start to look weird.

Aspect Ratio?

For those who don't know what that is, it's the ratio between the width and the height of the screen.
Most computer screens are based on a 4:3 ratio, so 640x480, 800x600, 1024x768. This ratio has been used by PC games for a very long time. Then came the wider screen formats 16:9 which are used for most TVs 845x480, 1280x720, 1920x1080. These have started to gain a lot of popularity with PC games as people opt for the wider screen.

That's simple right?

Well, not so much - you see the phone and tablet ecosystem provides a rich and varied set of resolutions which are great for the customer giving them a lot of choice; however it's a nightmare for the developer where you have to make sure your game or app looks nice on all of them.

So you have 2 choices. Use a render target and scale to fit but keep the aspect ratio and letterbox any gaps, or manually position your elements based on some scaling factors.

It's a minefield without an easy route through. But with persistence, you'll make it. Just choose which will work best for your game.

The Windows phone version we ported used a scaled co-ordinate system, so we continued along the same lines.

As the day progressed, 

things were coming together nicely. The game ran on Android albeit with controls too small on the larger resolution devices and with a couple of issues with screen rotation. However for the most part, things were working.

Dean had a little trouble on iOS and made a change which broke the renderer... so I killed him.

Just kidding.. we've been friends for 20 years, he's not that easy to kill.

We worked through the day and most of the evening to get the game in a working state and to make sure the input systems were working correctly.

We also had some issues with screen rotation. For some reason when the orientation was switched from Landscape to Portrait and vice versa, the viewport dimensions were not reflected.

It appears that at the time of writing, this is a bug in MonoGame.
Given that MonoGame is open source, we'll probably fix it and submit a patch.

The next day

Dean re-broke the iOS build, then fixed it, the broke it again and then fixed it for good.

We had an issue which only manifested on iOS where the render state was being corrupted. So Dean went bug hunting.

Found it.

Squashed it.

Apparently calling GetData on a texture is a bad idea. Reading data back from texture memory is slow and we found that it caused corruption of the render state. Dean has promised to write an article about this shortly. When he does, I'll put a link in here.

I spent the majority of the day slogging through the screens to scale each element..
Making sure that text was scaled properly and that things lined up no matter what the resolution was.
Some screens were harder than others, a couple were quite tricky given the complexity of the UI they provided. But in the end, the screens looked good on pretty much everything.

Dean spent a little time speeding up the loading time on Android devices.
Sometimes it's OK to load everything up front however when there are lots of graphics, some of which require additional processing - not all devices were able to handle this in a timely manner.


Introducing our glamorous testing team.

Seulki, Jenny and Katrina - Our glamorous testers.

The girls were given all of the tools they needed:

Galaxy Tabs
and various Phones...
more wine...

They were tasked with playing the game on all of the devices to make sure everything worked. They should pay attention to the closest details and report any crashes.
Everything was going fine until things started getting competitive. It seems that they were determined to beat each other's score.

So following 2 days of solid porting, it was really good to see the game being enjoyed by the testing team.

The wine probably helped a little, but the game is a lot of fun.

There are a ridiculous amount of Android devices in existence. One of our tasks was to test the game on as many devices as we could. Although we don't have access to the entire spectrum of devices, we do have a set which covers most bases.

One of the great things about developing for the iPad and iPhone is that you're sure that the game will run on all devices (until they change the OS, but that's a post for another day)

Incidentally, Xamarin offers a service called Xamarin Test Cloud to run your app or game on a large array of devices and monitor the results. It's certainly worth considering.

Finishing up

It took a little bit longer than we anticipated - these were mostly down to strange glitches in MonoGame which we had to address, as well as strange differences in behaviour (Amazon Kindle handles rotation differently to any other devices)

But in the end, we have a working game which runs really nicely on all the platforms we've thrown at it.