Scene System

In the Kakara Engine everything consists of scenes. Scenes are like levels, they contain information about a section of the game.

All scenes implement the Scene interface. The Kakara engine then has two abstract scenes to extend from: Abstract Scene and Abstract Menu Scene. Finally, The Kakara Engine has AbstractGameScene to extend from (AbstractGameScene extends AbstractScene).

Scenes contain the following information:

  • Game Items*

  • Lights*

  • The UI (HUD)

  • The Skybox*

  • Fog*

  • The Camera

  • Events

  • Collisions* *AbstractMenuScene does not have this information. When you try to retrieve this information AbstractMenuScene will return null and log an warning.

AbstractScene

The abstract scene is a basic scene that has an implementation of every method except the render, work, update, and loadGraphics method. It is important to note that AbstractScene does not take care of any rendering. If you extend this class, you must handle it yourself.

By default the Scene is set to have no fog. This scene contains methods to easily add and remove GameItems, UIObjects, Lights, and Particles.

AbstractGameScene

Abstract Game Scene handles the rendering and provides functionality for RenderChunks. It is recommended to extend this scene for actual game play.

AbstractMenuScene

Abstract Menu Scene is a scene that is optimized for menus. It will not handle any 3D rendering including lighting.* *It is important to note that 3D objects rendered on the HUD using the ObjectCanvas will still be rendered.

The AbstractMenuScene also has a nice method that allows a background to be set for the menu.

Last updated