Wiki

Clone wiki

SpecGine / Home

Tutorial

Welcome to tutorial on using SpecGine. Here you will learn how to create your own game called "Ping", a clone of famous Pong, using SpecGine engine. Your game will work on all supported platforms, including Windows, MacOS X, Linux, Android and iOS (At time of writing iOS is not available in default project template, even though engine should work with it. You should consult SBT-RoboVM project and enable it manually, or track project template iOS support.)

The development cycle in most cases include modifying and running your application on same desktop platform you develop with. This tutorial will concentrate on making the desktop version running first, and then we will tell you how to adjust configuration for other platforms.

Tutorial is grouped into following topics:

  1. Setting up and testing a new project
  2. Adding main menu
  3. Adding intro
  4. Adding game state with rendering system
  5. Adding movement and collisions systems
  6. Adding configuration support and input handling
  7. Adding pause menu
  8. Adding score and win state
  9. Configuring other platforms
  10. Building final application

We recommend you to read them one by one. If you are having troubles with some part, at the end of each chapter there is a zip file containing all previous parts. Finally, if you have some suggestions for improvements, we would be happy to hear them! Check our project overview page to find out about different ways to contact us.

Screenshots

Below you can see screenshots of cross-platform game created in above tutorial.

Intro, created in tutorial part 3

Intro

Main menu, created in tutorial part 2

Main menu

Gameplay, state after parts 4, 5, 6, 8

Gameplay

Pause menu, made in part 7

Pause menu

Win menu, made in part 8

Win menu

Download finished game

In part 10 you create game that can be distributed in single file. If you want to play before you implement your own version of game, you can download one that we made.

Here you can download compiled desktop version of Ping game, and here is Android version straight from above commands!

Unfortunately we do not have MacOS X nor iOS device to build version of ping, during development process we were only ensuring everything works by asking fellow developers with Apple hardware for help. If you want to play on your iPad or iPhone, try to compile it as an exercise.

Updated