Tools Appendix

Important tools that aren’t necessarily the focus of the book have been placed here. The appendix is intended to be read like another chapter, but with the liberty to simply skip tools you have already seen.

Android Studio

Android Studio was announced in early 2013 as the next generation of development tools for Android development. As of this writing, it is currently in early access preview and has a few bugs, but it is still far enough along that it can be used. By the time you receive this book, it will probably be a lot more stable and should be your first download for native development. Unlike the old Android SDK that uses Eclipse, Android Studio is based on IntelliJ IDEA [105]. The feature list is very promising.

Audacity

Audacity is a free audio editing tool available on all major platforms. It has numerous features, including recording live audio, mixing, splicing, and audio format conversion (Wav, MP3, OGG, . . .).

Autodesk Maya

Maya is a commercial 3D computer graphics software used for animation and modeling. It is very feature rich and has been used for many high-budget films and computer games. For our purposes, it can be used to create 3D models that can be imported into the Turbulenz game engine.

AutoIt

AutoIt is a freeware scripting, automation, and GUI builder utility. It is notable in this book for its simple Basic-like syntax and compiling to a single executable with no dependencies.

Blender

Blender is free, open-source-3D modeling and texturing software. It has feature parity with some of the proprietary software packages. If you have looked at it in the past and got annoyed with the interface, take a look again. It has improved immensely in the past five years. The Turbulenz HTML5 engine can translate the .dae export format from Blender for use in 3D game development.

Bfxr

Bfxr is a handy utility for generating quick sound effects (such as jump, hit, open, etc.). It can be run online or as a standalone app. All sounds generated are yours to keep [23]. For those wanting to try to create a complete musical score, there is MuseScore available for all platforms.

Box2D

Box2D is a widely used, open source physics engine. If a game engine does not implement its own physics engine (such as Impact and Turbulenz), there is a good chance that Box2D will be available as a plugin or module.

CocoonJS

CocoonJS is a compiler and launcher developed by Ludei that allows packaging an HTML5-based app to be played and distributed on iOS and Android [69].

Cygwin

Cygwin is the first choice for Linux admins and enthusiasts for getting an encapsulated command prompt with access to their familiar Linux commands (grep, ls, tar, cat, and others) on a Windows-based machine. The installer has many packages available. Cygwin is free and maintained by Red Hat, Inc. [61].

Eclipse

Eclipse is the current IDE for writing native Android apps. The Android Development Toolkit (ADT) now comes with Eclipse bundled with it [29]. Some developers prefer Netbeans for Java development, but the official and most supported tools use Eclipse. Eclipse runs on both Windows and Mac.

Note that while ADT may be the tool of choice, the next generation of Android development will be Android Studio, which is currently in limited release. By the time you receive this book, Android Studio may have already superseded the Eclipse version.

Enigma Virtual Box

Enigma Virtual Box is freeware utility that can be used to consolidate an app with dependencies into a single-file portable executable app [85].

FileZilla

FileZilla is a widely used and frequently updated file transfer client. It is available on all platforms. It is most commonly used for FTP, but a less-often and more useful feature is SFTP, which is a secure file transfer protocol provided by OpenSSH. If you have Secure Shell (SSH) access to your server (fairly common), you can probably use SFTP to access your files and not need to bother with FTP accounts.

Git

Git is a free and open source software version control system developed by Linus Torvalds (creator of Linux) [24]. There are dozens of version control systems out there. All are good. Git is simply the most prevalent as it solves many of the problems with previous version control tools, and it is free and runs well on all platforms. Many IDEs have git support built in. Even if they don’t, the Git Bash shell for Windows is excellent.

HTML5 Boilerplate

HTML5 Boilerplate is an all-in-one starting template to build a modern HTML5-based website. It includes many of the common libraries (jQuery, Modernizr, Normalize, etc.) and configurations (.htaccess) to build a site that leverages known best practices to support a wide range of browsers. It is intended to be downloaded and then adapted to suit your needs.

Inno Setup Studio

Inno Setup is my recommended tool for building Windows installers. It is very powerful (on parity with paid solutions), easy to use, and free for commercial use. You will want the “Studio” version when you download [26].

Instant Eyedropper/DigitalColor Meter.app

Instant Eyedropper for Windows will look at any pixel on your screen and copy the HEX, RGB, or HTML color code to your clip board. It sits in your system tray. Click and drag the magnifier to the point of interest. It is very handy. Mac comes with an equivalent utility called DigitalColor Meter. It is located in: /Applications/Utilities/.

jQuery, jQuery UI, jQuery Mobile

jQuery is an excellent free JavaScript library. It abstracts all the odd idiosyncrasies of IE, Firefox, Chrome, etc. to a standard function. By favoring jQuerys functions over the normal standard JavaScript, your site will behave the same cross-platform as jQuery performs the cross-platform translations for you. As a bonus, you get a very nice selector engine and other very useful library functions. If this was a general-purpose web development book, then there would be anywhere from a dozen pages to an entire chapter dedicated just to jQuery. Over half of all websites use it [20]. This book is only really interested in HTML5 Canvas, which does not use DOM. However, you will probably want to build a normal DOM-based website to support your Canvas-based game, and to help you do this, you will probably want to use jQuery. There are numerous books and tutorials. The best resources are the jQuery websites themselves (http://jquery.com/ and http://jqueryui.com).

jQuery UI is jQuery plus bundled CSS libraries and images for added effects and other UI widgets, such as draggable, droppable, date picker, sliders, tabs, etc. There is a theme framework with lots of nice default themes, or you can roll your own [21].

jQuery Mobile is an extension of jQuery UI optimized for mobile devices. The usual events for desktop dont necessarily work for mobile devices. For example, “orientationchange” has been added. The design guidelines also have been reworked to be more responsive to tablets and phone sizes [22].

Legacy Browsers

Legacy Browsers are a must for testing. Portable Apps (http://PortableApps.com/) has old versions of Chrome (few) and Firefox (many) available as portable downloads and can run standalone in its own separate directory. This is very useful for testing previous versions as well as versions with no add-ons or some add-ons enabled. Opera Error! Hyperlink reference not valid.

For Internet Explorer, one tool is IETester (http://www.my-debugbar.com/wiki/IETester). It is an all-in-one tester for IE 6 through 9 (plus 10 if you are running Windows 8) though it has mediocre performance.

These Legacy Browser tools are Windows-only. Mac users can install these tools on their Windows Virtual Machine that they use for IE testing. Unfortunately, OS X is not allowed to be virtualized (outside of some special cases for OS X Server) [30]. Windows users will simply need to find a Mac to test Safari because as of version 6, Safari is no longer available on Windows [31].

MediaWiki

The software that powers Wikipedia is called MediaWiki [16]. It is free to download and install. Often, hosting providers have an auto-installer that can install it for you (though making it private is up to you). If you don’t have a web server and don’t wish to pay for one, there are many free private wiki sites. A wiki allows other designers to edit, upload files and graphics, roll back changes, be alerted on changes, link internally/externally to other pages, provide comments, and dozens of other very useful features. It is my recommend format for game design rather than just a static document.

Microsoft Visual Studio

Microsoft Visual Studio is the official IDE from Microsoft for developing applications for Windows. It is a nice IDE with numerous features that can fill an entire book itself. For our purposes, we are only concerned about Visual Studio’s compiler. Turbulenz requires it as part of its build setup. Microsoft offers free (with registration) express editions that have access to the compiler.

Modernizr

Modernizr is a library that helps detect HTML5 compatibility and lets you degrade gracefully. It is covered in more detail on page 28.

Node.js

The easiest way to describe Node.js is “Server-side JavaScript.” Whereas normal JavaScript runs on the client’s browser, Node.js allows JavaScript to be written to web servers. It contains a package manager, a built-in web server, and more. Due to the nature of its design, it is highly scalable. Though not directly, node.js is used as part of Node-webkit, covered on page 160.

Open Game Art

Open Game Art http://opengameart.org/ is a site with lots of free game-related media with liberal licenses that can be used for your game project. Note that even though some media say it can be used for commercial purposes, I urge you not to do so unless you perform due diligence to verify the origin of the art for yourself. For open source and noncommercial purposes or tech demos, this site is probably a safe resource.

Paint.Net/Pixelmator

Paint.Net is similar to Photoshop except that it is free and has been reduced to the bare essentials. Sometimes less is more. I often find myself launching it more often than normal Photoshop. For Mac users, the equivalent is Pinta, though the Mac version requires Mono (.NET translation layer). A better low-cost commercial offering for Mac users is Pixelmator.

PhoneGap/Apache Cordova

Apache Cordova, the engine that powers PhoneGap by Adobe Systems, gets an extended section simply because it is so popular. It is a painless way to get HTML, CSS, and JavaScript apps to run standalone on an Android/iOS device, but unlike Ejecta and CocoonJS (the two recommended ways discussed in Part 3 of this book), it is not optimized for games and canvas, and it shows. App performance, particularly games, in general, is not very good with Apache Cordova. However, not every app requires game-engine level performance. If your app just uses DOM and is light on visuals, PhoneGap can get you pretty far.

To get your app running with PhoneGap, you need to download and install the Android SDK or use the recently released cloud-compiler. Apache Cordova is a library package that gets compiled with the native developer kit, which for Android is Eclipse bundled in with the Android SDK. Once Eclipse is running, import the PhoneGap sample Android project:

  1. File → New → Project. . . (not “Android Project”)
  2. Android → Android Project from Existing Code
  3. Set root to where you unzipped PhoneGap and import all the Android projects. Tell Eclipse to copy to your workspace.
  4. Close the “_ACTIVITY_” project so Eclipse will stop complaining about errors.
  5. Eclipse should now look like Figure 12.1.

Figure 12.1.

Figure showing Apache Cordova Eclipse.

Apache Cordova Eclipse.

Now, compile and run “cordovaExample” as-is. Your Android device should show something similar to Figure 12.2. If it does, your build environment is complete.

Figure 12.2.

Figure showing Apache Cordova Hello World.

Apache Cordova Hello World.

As of this writing, Apache Cordova cannot handle an HTML5-based game. It will load, but the performance will be bad. It will be bad even on a recent, well-powered Android tablet. To give Cordova the best chance, use a lighter weight engine, such as the Crafty Pong project, and configure it to use DOM instead of Canvas. For a simple web app, Cordova works well. For an HTML5 game, at least for now, it does not.

Putty/SSH

Putty is a free SSH client for Windows. Mac users have SSH built in with Terminal. If you are developing a website, SSH is very useful for the tasks that are inefficient with web-based managers.

Python

Python is free, widely used, general purpose programming language. A version of it is included by default on Mac OS X and most Linux distributions. It is a very nice programming language with numerous uses, but for our purposes here, it is often used as part of a command-line build system, particularly Turbulenz and Heroku (for Facebook). Windows does not include Python by default, so it will need to be installed. Python is also available through Cygwin.

Resource Hacker

Resource Hacker is a freeware Windows utility for directly editing DLLs and executables. It supports functionality such as changing icons and sounds. This utility has been discontinued, but is still widely used [84].

Three.js

Three.js is an open source (MIT licensed) JavaScript library used to speed 3D graphics development with WebGL. It contains numerous features, such as scenes, animation, lighting, materials, shaders, cameras, etc. Three.js is not covered in this book because Turbulenz provides these features for us. However, if you wish to develop 3D closer to the metal than what Turbulenz provides, you should consider using three.js to help your development.

UglifyJS

UglifyJS is a JavaScript processor utility that can minify, obfuscate, or beautify JavaScript files. Turublenz uses it for compaction. It is often included through node.js packages.

VLC Media Player

VLC has nearly all audio and video codecs that you could want built in so it can play essentially everything thrown at it with no fuss. It is free and loads fast. It is necessary for building media-driven sites.

VMware Player/VMware Fusion/Parallels/Virtual Box

VMware Player is useful for testing your app on operating systems other than your development station. It is far easier to keep a virtual machine to test your various use-cases than a regular machine. Create a snapshot of the scenario you want to test and rollback when you need to test again. Parallels and Fusion are Mac virtualization tools. VMware Player is for Windows, and Virtual Box is available on both.

VMware Player does not support snapshots, but you can get around this deficiency by simply making a copy of the directory where your virtual machine resides (vmdk, vmx, etc.). Note that as of version 5, VMware Player (Windows) is no longer free for noncommercial use unless you purchase a copy of Fusion Pro [25]. Virtual Box is still free [28].

If you are running a Mac, then some form of virtualization is a must if you wish to test IE (or use Boot Camp). Even if you use portable editions of legacy browsers, a virtual machine can still be useful for capturing complex development environments.

Web Servers

WAMP is an easy way to get a development web server with Apache, MySQL, and PHP on Windows. MAMP is an equivalent package for Mac. XAMPP is available for both Windows and Mac with a lot more features than just Apache+MySQL+PHP, but it isn’t as easy to use. This book recommends WAMP for Windows and MAMP for Mac.

There is a $20 Apple-supported Mac App Store app for Mountain Lion and later, called “OS X Server,” that will get a web server running. It is not really suitable for quick development as it is oriented more toward a Mac monoculture enterprise setup: A local intranet, iCal management, user accounts, a group Wiki, etc. If you do wish to go that route, note that your server root files will be located at: /Library/WebServer/Documents

Internet Information Services (IIS) is the Microsoft-supported web server built in to Windows (but not enabled). PHP (required for Impact development) does not come by default, but it can be installed for free as a plugin from http://php.iis.net/. IIS’s default server root is C:Inetpubwwwroot . The rather complex setup to get PHP working is presented on page 35.

Also, note that if all you need is a simple HTTP server to serve files, Python has one built in. Any directory can be made in a web directory listing. Navigate to the directory and run this command:

python -m SimpleHTTPServer

You will then have a very simple HTTP server running for that location on port 8000. Go to http://127.0.0.1:8000 to view it. All Macs and most Linux distributions ship with a version of Python.

Xcode

Xcode is provided by Apple for writing iOS or Mac apps. There are lots of third-party tools that often can bypass Xcode for Mac desktop development, but it will be needed when you are ready to distribute iOS apps.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset