-
Notifications
You must be signed in to change notification settings - Fork 2
Game
This class contains everything concerning your game. The only way to get a reference to it is by calling getGame().
Class Game
- quit
- setName
- getName
- setSize
- getSize
- setMaxFramesPerSecond
- setMainWindowPosition
- getMainWindowPosition
- reCenterMainWindow
- setGraphicsBackgroundColor
- getGraphicsBackgroundColor
- getResourceManager
- getInputManager
- getEntityManager
- getGraphicsManager
Quit the game. No cleanup is required.
Set the game's name (this name will be visible on the window's title bar). The default name of a game is SDL3D.
Get the game's name.
setSize(IVec2 size)
Set the game window's size in pixels. Consider calling reCenterMainWindow() after calling this. The default width is 800 and height, 600.
IVec2 getSize()
Get the game's window size.
Set the game's max frames per second. Normally, this is 60. Surpassing 120 can lead to weirdness right now since game movement is based on the fact that the frame rate will not surpass 120. If 120 is not enough, you can easily change it in Game.cpp, but make sure you don't have v-sync!
setMainWindowPosition(IVec2 position)
Set the upper left corner of the game's window based on the screen's upper left corner.
IVec2 getMainWindowPosition()
Get the game's window upper left corner position on the screen.
Re-center the game's window. Useful after changing the size.
ResourceManager& getResourceManager()
Get the game's resource manager object.
InputManager& getInputManager()
Get the game's input manager.
EntityManager getEntityManager()
Get the game's entity manager.
GraphicsManager getGraphicsManager()
Get the game's graphics manager.
- Understanding the Lua API reference
- Tutorial
- Units
- Notes
- Lua API reference
- Callbacks
- Global
- Game
- Engine
- ResourceManager
- Shader
- Texture
- TextureType
- ObjectGeometryGroup
- ObjectGeometry
- Sound
- SoundType
- GPUBuffer_uint
- GPUBuffer_vec2
- GPUBuffer_vec3
- InputManager
- KeyCode
- EntityManager
- Entity
- PhysicsBody
- PhysicsBodyType
- Camera
- Object
- TexturedObject
- ShadedObject
- Light
- GraphicsManager
- Utils
- IVec2
- Vec2
- Vec3
- Vec4