Sunday, June 30, 2013
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.
- 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".
- Clone lime git repo or download zip package from https://github.com/digitalfruit/limejs/zipball/master
- Extract the contents to suitable place on your hard drive. Next examples will use c:\ as the base path.
- If you don't have python download and install it from http://www.python.org/download/
- Launch Command Prompt (or PowerShell)
-
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:
- Open Control Panel -> System and Security -> System -> Advanced system settings
- Under Advanced tab select Environment Variables...
- Under system variables find variable named Path.
- Select it and click Edit.
- Append semicolon and path to the folder you installed python to the value. For example ";C:\Python27\"
- Press OK and OK
- Restart Command Prompt
- Try if it works now
- Move to lime base folder cd c:\lime
- python bin/lime.py --help
- 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
Subscribe to:
Comments (Atom)