Skip to content

Compiling framework

seanpaultaylor edited this page Jan 17, 2013 · 16 revisions

To build the gameplay library, tools, and samples as well as write your own games, you will have to install and use the platform specific tools listed below. These are the supported development environments for each specific operating system as a target platform.

Desktop OS Tool Development environment
Microsoft Windows 7 Visual Studio 2010 Windows 7
Apple Mac OS X Xcode 4.3.2 Mac OS X
Mobile OS Tool Development environment
BlackBerry PlayBook OS 2.0 BlackBerry Native SDK 2.0 Windows 7, MacOSX
Android 2.3 Android NDK 7 Windows 7, MacOSX
iOS 5.1 Xcode 4.3.2 MacOSX

Project repository

Included in the project repository are the following notable folder and files:

Folder/Files Description
/bin Precompiled binary tools
/external-deps External dependency libraries
/gameplay The gameplay library
/gameplay-api Doxygen API Reference
/gameplay-encoder Game asset/content encoding tool
/gameplay-luagen Lua script bindings generator tool
/gameplay-template Game samples template project files
/gameplay-samples Game samples
gameplay.xcworkspace Xcode workspace
gameplay.sln Microsoft Visual Studio solution
gameplay-newproject.bat/.sh New cross-platform project script

Getting started on desktop

The quickest way to get started using the gameplay framework and tools is to simply start working in one of the desktop environments.

You could use:

  • Microsoft Visual Studio 2010 Express (or Professional) on a Windows
  • Xcode on Apple Mac OS X

Just open either gameplay.sln or gameplay.xcworkspace.These solutions/workspaces are set up by default to build all the projects needed and to run the samples you have selected as active.

Game samples

The gameplay-docs folder contains additional tutorial documentation for our gameplay-samples. These are intended to go into more detail for designing and coding games written using the framework. They all have a good starting point but have intentionally been left incomplete. This gives you the opportunity to change the samples, and complete them to make them more fun to interact and play with. They provide good building blocks and are a basis for you to explore various features in the framework. You can utilize code snippets from the samples to help speed up the development cycle in your own games.

API reference

We firmly believe in making a very intuitive set of APIs that are as straight-forward and as consistent as possible. However, all of the classes in the framework have been well documented with Doxygen formatting. The classes will be updated and improved iteratively throughout each release. This is to help you learn about what classes or sets of functions can be used and the recommended practices in using them.

You should consider reading the latest versions of the API reference from the pre-generated HTML Doxygen API documentation in the gameplay-api folder. This will give you a deeper understanding of the C++ gameplay framework.

Getting started on mobile

Now that you are up and running on one of the desktop environments, we recommend you take this seriously and go mobile! In today's mobile game market, cross-platform development is a reality. It is quite simple and easy to use the gameplay framework to target a wider device audience. Start by downloading the native development kit for one of the various supported mobile operating system targets or set them all up.

Setup instructions

Listed below are the basic setup instructions for downloading and installing the supported platform and development environments for gameplay.

Mobile platform considerations

Ensure that you test early on the physical devices. Depending on the type of game you want to write and on your design ideas, you'll want to get some idea of what type of performance you'll get with the game plan and prototypes you are working towards. Be careful and do not to rely on desktop and mobile simulators as an indicator of performance or mobile device capabilities.

Creating new projects

To create a new cross-platform game project, run the gameplay-newproject.bat/.sh script. The following is an example of running the gameplay-newproject.bat script:

1. Enter a name for the new project.
 
   This name will be given to the project
   executable and a folder with this name
   will be created to store all project files.
 
Project name: test
 
 
2. Enter a game title.
 
   On some platforms, this title is used to
   identify the game during installation and
   on shortcuts/icons.
 
Title: Test
 
 
3. Enter a short game description.
 
Description: Test Game
 
 
4. Enter a unique identifier for your project.
 
   This should be a human readable package name,
   containing at least two words separated by a
   period (eg. com.surname.gamename).
 
Unique ID: org.gameplay3d.test
 
 
5. Enter author name.
 
   On BlackBerry targets, this is used for
   signing and must match the developer name
   of your development certificate.
 
Author: My Company
 
 
6. Enter your game's main class name.
 
   Your initial game header and source file
   will be given this name and a class with
   this name will be created in these files.
 
Class name: TestGame
 
 
7. Enter the project path.
 
   This can be a relative path, absolute path,
   or empty for the current folder. Note that
   a project folder named test will also
   be created inside this folder.
 
Path: gameplay-samples
 
    1 file copied.
    ...

The simplest way to run the project on Windows is to add the Visual Studio project to the existing gameplay.sln solution, set the "gameplay" project as a dependency (right-click on the new project, click "Project Dependencies…", and select the "gameplay" project), and then build and run.

Similarly, the easiest way to run the project on BlackBerry is import the new project into a QNX Momentics IDE workspace that already contains the gameplay project, set the "gameplay" project as a dependency (right-click the new project, click "Properties", go to "Project References", and select the "gameplay" project), and then build and run. (Note: make sure that both projects are set to the same Build Configuration.)

To run the project on Mac, simply open the Xcode project and build and run.

To run the project on Android from Windows, use the steps described above for running the samples.

Clone this wiki locally