__ __.__ .___ / \ / \__|____________ _______ __| _/ \ \/\/ / \___ /\__ \\_ __ \/ __ | \ /| |/ / / __ \| | \/ /_/ | \__/\ / |__/_____ \(____ /__|__\____ | \/ \/ \/\_ _____/\/__ .:. | __)| | \ `-+s+- | \ | | / od++sh- \___ / |____/ ` `-::::. \/ `-.:`oos. `/.ssy- `sys. osy/` ./osyy/-` -/--`./y.`
Hi. :) Welcome. This is the readme for Wizard Fu’s cross-platform platformer game engine.
One way to get started with the engine is to open a particular platform’s project file and run the demo game. From there you can move on to renaming the project, swapping in new art assets, tweaking the engine and creating worlds.
When you’re ready to dig into the code, check out the Table of Contents at the bottom of any page for the complete documentation on each of the objects. The documentation also includes a list of tmx object properties you can use when making levels in Tiled.
What follows is a description of how to get started on the main platforms.
You’ll need Xcode (it’s free).
Projects/Platformer.xcodeproj with Xcode, select the
Mac scheme, then build and run.
iOS scheme produces an app playable in the iOS Simulator or an actual iPad, iPhone or iPod Touch, depending on choice of destination.
An archive build (menu command Product > Archive) will produce an archive that can be distributed to an app store, ad-hoc via an IPA file or through services like Testflight.
Mac scheme produces a playable Mac app.
The default build configuration is
Debug, which logs information to the console and uses as much of the screen as it can in windowed mode.
Set the scheme to
Mac Release to use build configuration
Release, which disables the debugger (to prevent hanging on a crash) and runs in fullscreen mode.
Get started customizing your game by renaming the project. Click once on the project name in the Project Navigator (by default, this is the leftmost pane). Click again on the project name to edit it. Confirm your choice and Xcode will rename the project, files and targets.
You’ll need Visual Studio.
Projects/win32/Platformer.sln with Visual Studio, then build & run.
The build produces a folder with an exe file, dlls and assets needed to play the game.
This folder will be
Release-win32 depending on current configuration.
The release build will run in full screen mode. The debug build runs in a windowed mode.
You’ll need to set up an Android development environment.
Open Eclipse, do Help > Check for Updates, then go Window > Android SDK Manager and install the following:
NDK_ROOT and add a few places to your path:
On Linux, make sure you’ve installed ANT:
sudo apt-get install ant
To build for Android with Eclipse, you’ll need to create an Eclipse project. Open up Eclipse, do File > New > Other… and choose Android > “Android Project from Existing Code”. Then browse and set the Root folder to
Projects/android and click Finish.
Next, repeat the same process for cocos2d-x. File > New > Other… > Android Project from Existing Code and choose
lib/cocos2d/x/java/cocos2d-x. Now Eclipse is ready to go. See
Projects/android/README.md for details.
Android builds produce apk files that can be installed on Android devices or simulators using Eclipse or the build tools.
To build via the commandline with ANT:
To run the apk file on a device:
To run the Android emulator you’re going to need to create an Android virtual device:
make && make run-emulator
We’ve organized the code into a table of contents (found at the bottom of each page of documentation) with four columns:
We’ve created this class hierarchy diagram to help visualize the objects. The names in red are abstract base classes. The names in gray are instantiatable.
We’ve included a makefile which will copy the icons files in
Raw/Icons to all the appropriate projects.
To change your game’s icon, simply execute
cd Raw/Icons and then
We recommend using these app icon templates by Michael Flarup.
The platformer game engine uses prebuilt cocos2dx static libraries. They can increase the speed at which developers write games with cocos2d-x, as the library does not have to be rebuilt so often.
This download includes a few prebuilt cocos2dx libraries in the
You may want to build your own static libraries. Here’s how:
sudo npm install rapidgame -g
cd MyGameDir && rapidgame init .
Thanks for your purchase! Feel free to write me (Nat Weiss) at email@example.com with questions or even just to say hello. If you think of something that can be better about this platformer game engine, please share.
Follow your excitement.