Wednesday, June 26, 2013

HTML5 Game Development With LimeJS

Why HTML5 ?

HTML5 has become the face of the Open Web Platform.  It represents a single standard that can be applied across all computers and mobile devices. With HTML5, there is no need to download proprietary plugins such as Flash, which is constantly criticized for its bugs, errors, and security vulnerabilities. Instead of being forced to learn a separate programming language in order to create applications and games for a particular device, you can instead use a browser and HTML5. The end result is a larger pool of high quality games that can be played anywhere.

The “Mobile” category contains games that are specifically optimized for a mobile device.  However, even games that are not specifically designed for mobile use may still be playable in your phone’s browser.  There are so many different phones and mobile browsers that we can’t test them out for you at the moment.  

We’ll be building this simple Short Term Memory game using a JS framework called LimeJS. You can download this framework and install it following the official guide at www.limejs.com.

Getting started with LimeJS:

 

Mac OS X and Linux users:

  • Requirements: Python 2.6+, Git, SVN
  • Clone the git repo (you have probably already done that): git clone git://github.com/digitalfruit/limejs.git
  • bin/lime.py --help
  • bin/lime.py init
  • bin/lime.py create helloworld
  • open ./helloworld/helloworld.html in the browser
  • study/tweak the source
  • programming guide is at lime/guide/ or http://www.limejs.com/
  • demos are available at lime/demos/
  • unit tests are at lime/tests/
  • documentation is at http://limejs.digitalfruit.ee/docs/

Windows users:

If you consider yourself advanced user and know how to use Git/Python you are probably better off reading through Mac/Linux guide and choosing your best alternative tools/methods yourself. If not then follow this step-by-step route.
  1. Download and install Git client from http://code.google.com/p/msysgit/downloads/list (if not already installed). While installing select "Run Git from the Windows Command Prompt".
  2. Clone lime git repo or download zip package from https://github.com/digitalfruit/limejs/zipball/master
  3. Extract the contents to suitable place on your hard drive. Next examples will use c:\ as the base path.
  4. If you don't have python download and install it from http://www.python.org/download/
  5. Launch Command Prompt (or PowerShell)
  6. Check if you have python installed on your global path by running: python --version
    If this returned error you have to add it to your global path or use full path to binaries in next steps.
    To add python to your global path:
    1. Open Control Panel -> System and Security -> System -> Advanced system settings
    2. Under Advanced tab select Environment Variables...
    3. Under system variables find variable named Path.
    4. Select it and click Edit.
    5. Append semicolon and path to the folder you installed python to the value. For example ";C:\Python27\"
    6. Press OK and OK
    7. Restart Command Prompt
    8. Try if it works now
  7. Move to lime base folder cd c:\lime
  8. python bin/lime.py --help
  9. In similar pattern continue from Mac/Linux tutorial from step 3

After installing LimeJS as per the official guide , our next step will be to create the project. We are gonna open our terminal, cd to the limejs folder any type:

bin/lime.py create game
This will create a folder called "game" inside our limejs folder with some startup files

Thats all to install and create project in LimeJS. Follow my next post for the short term memory game


 


Sunday, May 12, 2013

Different Game Engines for Android

For creating games in android, there are some supporting open source android game engines which are listed below.



and many other game engines

Sunday, April 14, 2013

Targeting Android Platform

Before you can start writing applications for Android, you need to download the SDK platforms for the Android devices for which you want to develop apps. Each platform has a different version of the Android SDK that may be installed on users’ devices. For versions of Android 1.5 and above, there are two platforms available: Android Open Source Projectand Google.
The Android Open Source Project platforms are open source, but do not include Google’s proprietary extensions such as Google Maps. If you choose not to use the Google APIs, Google’s mapping functionality won’t be available to your application. Unless you have a specific reason not to, I’d recommended you to target one of the Google platforms, as this will allow you to take advantage of Google’s proprietary extensions.
  • Choose Window->Android SDK and AVD Manager.
  • Click Available Packages in the left column and check the repository to show a list of the available Android platforms.
  • You can choose which platforms to download from the list, or leave everything checked to download all the available platforms. When you’re done, click Install Selected and follow the installation instructions.

Once everything has been successfully downloaded, you’re ready to start developing for Android.

Saturday, March 2, 2013

Installing Eclipse and the Android SDK


The recommended environment for developing Android applications is Eclipse with the Android Development Toolkit (ADT) plugin installed. I’ll summarize the process here. If you need more detail, Google’s own developer pages do a good job of explaining the installation and configuration process.
  • Download the Android SDK for your platform (Windows, Mac OS X, or Linux).
  • Extract the downloaded file to somewhere memorable on your hard drive (on Linux, I use /opt/local/).
  • If you don’t already have Eclipse installed, download and install the Eclipse IDE for Java Developers package. For programming, Google recommends using Eclipse 3.5 (Galileo).
  • Run Eclipse and choose Help->Install New Software.
  • Click Add in the Available Software window.
  • Enter Android Development Tools in the Name field, and https://dl-ssl.google.com/android/eclipse/ in the Location field.
  • Click OK and check Developer Tools in the list of available software. This will install the Android Development Tools and DDMS, Android’s debugging tool.

  • Click Next and Finish to install the plugin. You’ll need to restart Eclipse once everything is installed.
  • When Eclipse restarts, choose Window->Preferences and you should see Androidlisted in the categories.
  • You now need to tell Eclipse where you’ve installed the Android SDK. Click Androidand then Browse to select the location where you extracted the SDK files. For example, /opt/local/android-sdk.


  • Click OK to have Eclipse save the location of your SDK.

Why Develop for Android?


Android is an open-source platform based on the Linux kernel, and is installed onthousands of devices from a wide range of manufacturers. Android exposes your application to all sorts of hardware that you’ll find in modern mobile devices — digital compasses, video cameras, GPS, orientation sensors, and more.
Android’s free development tools make it possible for you to start writing software at little or no cost. When you’re ready to show off your application to the world, you can publish it to Google’s Android Market. Publishing to Android Market incurs a one-off registration fee (US $25 at the time of writing) and, unlike Apple’s App Store which famously reviews each submission, makes your application available for customers to download and buy after a quick review process — unless the application is blatantly illegal.
Here are a few other advantages Android offers you as a developer:
  • The Android SDK is available for Windows, Mac and Linux, so you don’t need to pay for new hardware to start writing applications.
  • An SDK built on Java. If you’re familiar with the Java programming language, you’re already halfway there.
  • By distributing your application on Android Market, it’s available to hundreds of thousands of users instantly. You’re not just limited to one store, because there are alternatives, too. For instance, you can release your application on your own blog. Amazon have recently been rumoured to be preparing their own Android app store also.
  • As well as the technical SDK documentation, new resources are being published for Android developers as the platform gains popularity among both users and developers.
Enough with the talk — let’s get started developing for Android!