Module SypherEngine

Class SypherEngine

java.lang.Object
javafx.application.Application
dev.aurumbyte.sypherengine.core.SypherEngine

public class SypherEngine extends javafx.application.Application

The main class, the heart of the game engine, where everything is run

Since:
v0.3.0
Author:
AurumByte
  • Nested Class Summary

    Nested classes/interfaces inherited from class javafx.application.Application

    javafx.application.Application.Parameters
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static float
    The fixed number times the engine updates
    (package private) static float
    Frames Per Second
    (package private) static GameManager
    The Game, The only entrypoint into the engine's inner workings
    (package private) static int
    The width and height of the screen
    The KeyListener
    The MouseListener
    (package private) Renderer
    The Renderer
    (package private) javafx.scene.Scene
    The Scene
    (package private) static String
    The Game window title
    (package private) static int
    The width and height of the screen

    Fields inherited from class javafx.application.Application

    STYLESHEET_CASPIAN, STYLESHEET_MODENA
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the logger
    Gets the renderer
    javafx.scene.Scene
    Gets the scene
    int
    Gets the screen height
    int
    Gets the screen width
    static void
    Initializing the engine with a game
    static void
    init(GameManager game, EngineConfig config)
    Initializing the engine with a game and a config
    static void
    init(GameManager game, String title)
    Initializing the engine with a game and a game title
    static void
    run(String[] args)
    Runs the engine
    void
    start(javafx.stage.Stage stage)
    The main game loop

    Methods inherited from class javafx.application.Application

    getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet, stop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • keyListener

      public KeyListener keyListener
      The KeyListener
    • mouseListener

      public MouseListener mouseListener
      The MouseListener
    • renderer

      Renderer renderer
      The Renderer
    • scene

      javafx.scene.Scene scene
      The Scene
    • fps

      static float fps
      Frames Per Second
    • fixedUpdate

      static float fixedUpdate
      The fixed number times the engine updates
    • game

      static GameManager game
      The Game, The only entrypoint into the engine's inner workings
    • title

      static String title
      The Game window title
    • width

      static int width
      The width and height of the screen
    • height

      static int height
      The width and height of the screen
  • Constructor Details

    • SypherEngine

      public SypherEngine()
  • Method Details

    • start

      public void start(javafx.stage.Stage stage) throws IOException

      The main game loop

      Specified by:
      start in class javafx.application.Application
      Parameters:
      stage - The main stage
      Throws:
      IOException - IOException
      Since:
      v0.3.0
    • init

      public static void init(GameManager game)

      Initializing the engine with a game

      Parameters:
      game - the game to be run
      Since:
      v0.3.0
    • init

      public static void init(GameManager game, String title)

      Initializing the engine with a game and a game title

      Parameters:
      game - the game to be run
      title - the title of the game
      Since:
      v0.3.0
    • init

      public static void init(GameManager game, EngineConfig config)

      Initializing the engine with a game and a config

      Parameters:
      game - the game to be run
      config - the configuration by which the game should be run
      Since:
      v0.3.0
    • getRenderer

      public Renderer getRenderer()
      Gets the renderer
      Since:
      v0.3.0
    • getScreenHeight

      public int getScreenHeight()
      Gets the screen height
      Since:
      v0.3.0
    • getScreenWidth

      public int getScreenWidth()
      Gets the screen width
      Since:
      v0.3.0
    • getLogger

      public ByteLogger getLogger()
      Gets the logger
      Since:
      v0.3.0
    • getScene

      public javafx.scene.Scene getScene()
      Gets the scene
      Since:
      v0.3.0
    • run

      public static void run(String[] args)
      Runs the engine
      Parameters:
      args - The arguments by which to run the game
      Since:
      v0.3.0