Creating a New Scorpio 3D Game - GravityGames/scorpio3d GitHub Wiki

Hello. This is the quick start guide to creating a new Scorpio 3D project.

Prerequisites

Java JDK v1.8 or newer (older versions may or may not work)
Scorpio 3D
LWJGL version 2

Optional

A Java IDE (this guide will assume you have one)

Initial Setup

Assuming you've already imported the Scorpio 3D project into your IDE of choice, start by creating a new project. Make sure that your project has Scorpio 3D set as a required project. You now should be able to start using Scorpio 3D.

Creating a window

Let's start by creating a window. Creating a window in Scorpio 3D is as simple as calling two functions: Scorpio.init() and Scorpio.start(). First, let's looks at the parameters for Scorpio.init().

Scorpio.init(screenWidth, screenHeight, gameName, root);

The first two values, screenWidth and screenHeight, determine the size in pixels of the window. The gameName value is a string containing the name of the game. The root object is the GameObject that the rendering engine will render first. Here is an example of how these values can be filled in:

Scorpio.init(800, 600, "My Game", new GameObject());

Once Scorpio 3D has been initialized, you can start the game loop by calling the Scorpio.start function. This function has no parameters, and automatically starts running the game loop.

Creating a Custom GameObject

Now we have a window in our Scorpio game, but it's currently not drawing anything but a grey background. Now we'll change this by creating our own GameObject. For now, we're just going to draw a square filled in with a black and white checkerboard pattern. Start by creating a new class in your project. You can name it whatever you like. Once created, you're going to need to make your object extend the GameObject class.