Demonstration Tutorial on using the awesome LibGDX game platform with the Spriter Runtime. Produce a multi-platform game using powerful Spriter 2D animations, that run on Android, Desktop, HTML and iOS.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android
core
desktop
doc/img
gradle/wrapper
html
spriter
.gitignore
.gitmodules
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

LibGDX + Spriter Demonstration

Demonstration Tutorial on using the awesome LibGDX game platform with the Spriter Runtime.
Produce a multi-platform game using powerful Spriter 2D animations, that run on Android, Desktop, HTML and iOS.

Contents

Showcase

Spriter Pro Editor

Credits

For most of us, writing good software is about standing on the shoulders of giants. This demonstration is to showcase the work of others and allow programmers new to the wonders of LibGDX, Spriter, and 2D animation to get a running-start in writing cool 2D games of their own.

The code in this demonstration includes work from:

The knowledge to put this demonstration together includes work from:

To provide feedback or collaborate on this tutorial, contact me at: github1@blueacorn.co.uk

Requirements

List of the Applications / Frameworks used in this feature demonstration.

  • Android SDK Tools
    • SDK Tools is a downloadable component for the Android SDK. It includes the complete set of development and debugging tools for the Android SDK.
    • You only need the SDK, not the full Android Studio. Install the latest stable platforms via the SDK Manager.
    • Tested with installer_r24.4.1-windows.exe
  • Android Developer Tools for Eclipse (ADT Plugin)
    • Android Development Tools (ADT) is a plugin for the Eclipse IDE that extends the capabilities of Eclipse to develop Android projects ...
    • Eclipse update site: https://dl-ssl.google.com/android/eclipse/
    • Tested with ADT 23.0.7 (August 2015)
  • Android USB Device / ADB driver
    • Android USB / ADB Device driver from your device manufacturer.
  • Eclipse IDE for JAVA Developers
    • The essential tools for any Java developer, including a Java IDE, Git client, Gradle and Maven integration
    • Tested with Eclipse IDE for Java Developers - Juno SR2, Windows 32-bit.
  • Gradle Tooling for Eclipse
  • Java Development Kit (JDK) 7+
    • Tested with Java SE Development Kit 8u73
    • (JDK 6 will not work!)
  • LibGDX
    • Desktop/Android/BlackBerry/iOS/HTML5 Java game development framework
    • Gradle setup application, used to create the project gradle environment with LibGDX dependencies.
    • Tested with LibGDX gdx-setup.jar nightly\dist (17-Feb-2016)
  • Spriter
    • The Spriter IDE - create animations using key-frames constructed from small, re-useable images (such as body parts) and animating the body parts using bones and . This method of animating offers many benefits for several aspects of a game's development and for the finished product.
  • Spriter Runtime
    • A Generic Java runtime for importing and executing Spriter animation files in your game.
    • Tested with commit 74fe6fd (Nov 27, 2015)
  • Tortoise GIT Client
    • TortoiseGit is a Windows Shell Interface to Git and based on TortoiseSVN.

Getting Started

This is a 'clean-sheet' guide for getting you started from having zero applications installed to having a 2D animated game demonstration fully running on your Desktop and Android device.

Setup the Developer Environment

  1. See LibGDX Wiki - Setting up your Development Environment for full instructions
    1. Install JAVA SDK 7+
    2. Install Eclipse IDE for Java Developers
    3. Install Android SDK Tools
    4. Install Android Development Tools for Eclipse
    5. Install Gradle Tooling for Eclipse
    6. Optional: See LibGDX Wiki for setting up iOS (not tested)
  2. Configure Android SDK Packages (using Android SDK Manager)
    1. Add Android SDK Build Tools 23.0.1
    2. Add Android SDK Platform Tools
    3. Add Android SDK Platform (API 20)
    4. Optional: Add Android System Image (for Emulator)
  3. Install Android Device USB Drivers
    1. If you have a Google phone: Install Google USB Driver
    2. If you have a Samsung phone: Install Samsung USB Driver
    3. If you have a different Android device: install the Android USB / ADB driver from your device manufacturer.
  4. Install Tortoise GIT Client

Setup Game Project Workspace

LibGDX provides an executable gdx-setup.jar for creating an initial Eclipse workspace that includes Android, Desktop, Html, iOS and Core projects, with LibGDX dependencies. This setup uses Gradle build files to integrate the project workspace into Eclipse (or your IDE of choice).

For this demonstration, just clone the Git project to a folder on your computer.

  1. Clone libgdx-spriter-demo to your computer.
    1. Use Tortoise Git to clone https://github.com/blueacorn/libgdx-spriter-demo to your computer.
  2. Fetch libgdx-spriter-demo submodules
    1. Use Tortoise Git to perform Submodule Update on your cloned copy

When you come to create your own game project, you will want to create a new workspace; with your own package and game file names:

  1. Create LibGDX Project workspace - see LibGDX - Wiki - Project Setup Gradle for full instructions
  2. Run gdx-setup.jar to create a new game project workspace
  3. Create a 'spriter' project in the root workspace
  4. Use Tortoise Git to add Spriter Runtime submodule:
  5. Copy in 'spriter' project and src files:
  6. Edit workspace 'build.gradle' file to add 'spriter' project dependencies

Open Workspace in Eclipse

Now that you have your Workspace setup it's time to open it in Eclipse, and build!

  1. Import Workspace into Eclipse - See Eclipse and Grade - Importing for full details
    1. Choose File -> Import
    2. Select Gradle -> Gradle project, Next
    3. Browse to your-new-workspace, Click Build Model
    4. Select all Projects, click Finish
    5. Wait for Gradle for Eclipse plugin to download all other project dependencies

Run as Desktop Application

Game screenshot on Desktop

  1. In Eclipse, select the 'demo-desktop' project
  2. Choose Run > Run
  3. Choose Java Application
  4. Choose 'DesktopLauncher' as the main application, click 'OK' to run
  5. The Demo Game will now build and run as a Java application on your Desktop
  6. Click the 'X' button to close the game

###Run as Android Device Application

Game screenshot on Android

  1. Ensure you have installed the Android USB / ADB drivers for your device
    1. How to Install and Use ADB
  2. Enable your phone for USB Debugging, Unknown Sources
    1. Android Debug Bridge and Debugging
  3. Wait for the drivers to install and the phone to be recognised
  4. In Eclipse, select the 'demo-android' project
  5. Choose Run > Run
  6. Choose Android Application
  7. Eclipse should choose the default android application
  8. Click Yes to Auto-monitor LogCat (debugging console)
  9. Ensure your phone is unlocked
  10. The Demo Game will now build and run as an Android application on your Android Device.

Notes

This is a work-in-progress, please Fork, Edit and Push any improvements back to this project, or email me: github1@blueacorn.co.uk