struct Input
Input state for keyboard and mouse.
Fields
Methods
struct Font
Fields
struct Text
struct Sound
A sound effect.
Fields
struct Music
Background music.
Fields
struct Sprite
A sprite component for rendering textures.
Fields
struct Animation
An animation sequence.
Fields
struct Animator
Component for handling animations.
Fields
Methods
struct Transform
A transformation between two 2D vectors.
struct RigidBody
Some rigid body in the physics world.
struct GameObject
An object in the physics world.
Fields
Methods
Add a component to the game object.
struct Camera
Camera system for controlling the view.
Fields
Methods
interface ISystem
Interface for systems.
Methods
class AnimationSystem
System for updating animations.
Fields
Methods
class ParticleTrailSystem
System for updating particle trails.
Fields
Methods
class Scene
A scene containing game objects and systems.
Fields
Methods
struct Renderer
The main renderer of the game.
This is the heart of any game built with Nova.
Fields
Methods
Initialize the renderer, this must be called prior to the usage of the renderer
at all.
Draw some circle via the renderer.
| t | The transform |
| c | The colour of the circle in ARGB format |
Draw some rectangle via the renderer.
| t | The transform |
| c | The colour of the rectangle in ARGB format |
Draw a sprite with optional spritesheet frame.
| t | The transform |
| sprite | The sprite to render |
| c | The color tint |
Draw particles from an emitter.
| emitter | The particle emitter |
struct Particle
A single particle.
struct ParticleEmitter
A particle emitter system.
Fields
Methods
struct Physics
The physics engine.
Fields
Methods
Add some object to the physics world.
| obj | The object to add |
Update the physics loop.
| dt | Delta time |
Check for collisions in the physics world.
Determine whether two game objects are colliding.
| a | Object A |
| b | Object B |
Resolve a collision between two game objects.
| a | Object A |
| b | Object B |
struct Nova
The engine instance.
Fields
Methods
Load a new scene.
Load a music track.
Create a spritesheet frame.
| x | X position in pixels |
| y | Y position in pixels |
| width | Frame width in pixels |
| height | Frame height in pixels |
| texWidth | Total texture width |
| texHeight | Total texture height |
Initialize the game engine.
| title | The window title |
Add a game object to the world as a rigid body.
| obj | The object |
| mass | The mass of the object |
| isStatic | Whether or not it is static, defaults to false |
Add a collider to the world.
| obj | Source object |
| type | Type of collider |
| size | Size of object as a 2D vector |
Add a sprite to a game object.
| obj | The game object |
| texture | The texture to use |
| frame | Optional sprite frame (defaults to full texture) |
Toggle the FPS counter.
| pos | The position of the FPS counter |
Run the game.
Get the input state for this frame.
Convert screen coordinates to world coordinates.
| screenPos | Position in screen coordinates (pixels) |
Convert world coordinates to screen coordinates.
| worldPos | Position in world coordinates |
Destroy the window and clean up the underlying GLFW resources.
ENUM KeyEvent
Common key events.
Members
ENUM Key
Common key constants.
Members
ENUM Mouse
Mouse button constants.
Members
ENUM FPSCounterPosition
FPS Counter position.
Members
ENUM BufferBit
OpenGL bitmask constant.
Members
Poll for events.
Should the game window close?
| gw | The game window. |
Get the current game time.
Get some keypress.
| gw | The game window. |
| keyCode | The current key. |
Get some mouse button press.
| gw | The game window. |
| mbCode | The current mouse button. |
Get the position of the mouse cursor.
| window | The game window. |
| x | X position to read the value into |
| y | Y position to read the value into |
Set background to some color.
| r | Red |
| b | Blue |
| g | Green |
| a | Alpha |
Clear buffers to preset values.
| bb | Bitfield mask |
Swap the front and back buffers of the specified window.
| gw | The game engine window |
Key callback.
| window | The game engine window |
| key | The key |
| scancode | The scan code |
| action | The action |
| mods | The modifiers |
Mouse button callback function.
| window | The game engine window. |
| button | The button |
| action | The action |
| mods | The modifiers |
The cursor position callback function.
| window | The game window |
| xpos | X position of the cursor |
| ypos | Y position of the cursor |
The scroll callback function.
| window | The game window |
| xoffset | X offset for scroll |
| yoffset | Y offset for scroll |