public final class Engine extends Object
Standard engine initialization:
public final class AppMinimal { public static void main(String[] args) { // Start engine (name = "First Code", version = "1.0.0", resources directory = "resources") // The engine is initialized with our parameters: // - The name of our program: "First Code" // - The program version: "1.0.0" // - The main resources directory, relative to the execution directory: ./resources/ // This mean that any resources loaded with Media.get(...) will have this directory as prefix. Engine.start("Minimal", Version.create(1, 0, 0), "resources"); // Resolution configuration (output = 640*480 at 60Hz). This is corresponding to the output configuration. // As our native is in 320*240 (described in the Scene), the output will be scaled by 2. // If the current frame rate is lower than the required in the native, // the extrapolation value will allow to compensate any data calculation. final Resolution output = new Resolution(640, 480, 60); // Final configuration (rendering will be scaled by 2 considering source and output resolution). // This is the final configuration container, including color depth and window mode. final Config config = new Config(output, 16, true); // Program starter, setup with our configuration. It just needs one sequence reference to start. final Loader loader = new Loader(config); loader.start(new Scene(loader)); } }
Modifier and Type | Field and Description |
---|---|
static String |
AUTHOR |
static String |
BEGIN_DATE |
static String |
LAST_RELEASE_DATE |
static String |
NAME |
static String |
VERSION |
static String |
WEBSITE |
Modifier and Type | Method and Description |
---|---|
static String |
getProgramName() |
static String |
getProgramVersion() |
protected static void |
init(String arg0,
Version arg1,
Verbose arg2) |
static void |
start(String name,
Version version,
String resourcesDir)
Start engine.
|
static void |
start(String name,
Version version,
String resourcesDir,
Verbose level)
Start engine.
|
protected static void |
start(String arg0,
Version arg1,
Verbose arg2) |
static void |
terminate()
Terminate the engine.
|
public static final String NAME
public static final String VERSION
public static final String BEGIN_DATE
public static final String LAST_RELEASE_DATE
public static final String AUTHOR
public static final String WEBSITE
public static void start(String name, Version version, String resourcesDir)
name
- The program name (must not be null
).version
- The program version (must not be null
).resourcesDir
- The main resources directory (must not be null
).public static void start(String name, Version version, String resourcesDir, Verbose level)
name
- The program name (must not be null
).version
- The program version (must not be null
).resourcesDir
- The main resources directory (must not be null
).level
- The verbose level (must not be null
).public static void terminate()
public static String getProgramName()
public static String getProgramVersion()
Copyright © 2014 Byron 3D Games Studio. All rights reserved.