Conduit API
Case Study
Mini-Games -> Developing the game
 
As you may already know, developing a mini-game for the Conduit App Engine requires no special or extra skills that you wouldn’t already need for any other flash game.

You have an old version of Adobe's Flash Player. Get the latest Flash player.

Check out “SampleGame.swf” in the tutorial files. It is a very simple example for a flash piece with dynamic animation and sound. Click and drag the ball and throw it around – that’s our sample game for this tutorial.

Before we go on and turn that sample game into an App, let’s go over some of the guidelines to follow when creating or adjusting our game for the Conduit App Engine:
 
Conduit App Engine Apps must not exceed a height of 26 pixels, and although width is not technically limited, it should be kept to the minimum, leaving some space for other Apps on the engine bar.

When creating the art for such a small space, consider using special techniques such as pixel art instead of vector art, and pixel fonts instead of regular fonts. Make sure your elements are sharp and readable.

Keep your text short both in the instructions and on the UI. Try using icons instead of text wherever possible.

Camera movement in the game can let you create worlds that are bigger than the App dimensions, and multi-page UI can let you keep all the functionality you need.
 
Remember that the game will run continuously on the engine bar as long as the browser window is open. This could mean longer periods of time than your usual Flash content would run.

Take extra care of CPU load and memory usage. Use analysis and optimization tools such as the Profiler tool in Adobe Flash Builder. Later in this tutorial, we will learn how to create Show and Hide buttons for our game, as well as how to use JavaScript to unload and stop the game, and free up its space on the engine bar. This will give users the option to close and open the game as they wish.
 
As in any other game, consider saving states of the users’ game on their local machine to enable game continuation. Remember that users may often want to close the game to focus on some other task, and might expect the game to start off from its last position when they open it back again.

You may choose one of several ways to store local data – save to the Flash SharedObject, save a JavaScript cookie, use a database on you server, or use Conduit API with the StoreKey and RetrieveKey methods. Later in this tutorial we will learn about the Conduit API and how to access it.
 
Prepare an opening screen that is static and silent. Sudden music can be alarming and annoying for users who just opened a browser window, and few of them will guess it is coming from a tiny game in the toolbar. During the gameplay make both mute and pause buttons visible and quickly accessible.