Skip to content

KiyaKandar/GameEngine_2.0

Repository files navigation

Game Engine

Description

A c++ data driven game engine consisting of various subsystems including graphics, physics and multi-threading.

How To Use

IMPORTANT Please install OpenAL with Audio/OpenAL 1.1 SDK/redist/oalinst.exe.

Level Editor and Developer's Console

Current Limitations

  • Inputs are case sensitive.
  • Captials must be used with the CapsLock button, shift is not implemented.
  • Divide on numpad is used for a forward slash.

Commands

General Commands

  1. Toggle free camera movement debugcamera

  2. Create a game object

spawngameobject GameObjectName

  • gameobjectname is the resource identifier.
  1. Add a scene node to a game object

addscenenode GameObjectName MeshIdentifier colour=1,1,1,1

  • adds a scene node to an existing game object.
  • MeshIdentifier is the resource name of a mesh already loaded into the resource manager.
  • colour must have 4 components.
  1. Add a physics node to a game object

addphysicsnode GameObjectName shape=Box invMass=0.5 static=true

  • shape is the collision shape of the physics node. It must be either 'Box' or 'Sphere'.
  • static will dictate whether it is moveable or not. Static nodes will not collide with eachother. Must be either 'true' or 'false'.
  • IMPORTANT. A SCALE MUST BE SET FOR A GAMEOBJECT BEFORE ADDING A PHYSICS NODE
  1. Load a mesh into the resource manager

loadmesh NewMeshIdentifier mesh=.../Directory/Example/someMesh.obj loadmesh NewMeshIdentifier mesh=.../Directory/Example/someMesh.obj texture=../Directory/AnotherExample/someTexture.png

  • NewMeshIdentifier is the meshes identifier to be used for adding it to a game object.
  • A texture is optional.
  • WARNING MAY BE SLOW DEPENDING ON SIZE OF THE MESH
  1. Load a sound into the resource manager

loadsound NewSoundName sound=../Data/...

  • NewSoundName is the sounds identifier to be used for scripting and playing.
  1. Add a light to the scene

addlight NewLightName position=0,0,0 colour=1,1,1,1 radius=1 intensity=1 shadow=true

  • radius and intensity can be any values.
  • shadow dictates whether the light will cast a shadow on objects in the scene or not. Must be either 'true' or 'false'.
  1. Save the level to file

savelevel LevelName

  • writes all resources and current state of the game to XML files. Must ideally be used when the game is not being played.
  1. Stop playing the level

quit

  • stops level playback and resets to position of original save.
  • ENSURE LEVEL IS SAVED BEFORE QUITTING
  1. Start the level

start

  1. Others

removelight lightName

removescenenode gameObjectName

removephysicsnode gameObjectName

Messages

  1. Pausing/Resuming the game

text GameLoop deltatime disable text GameLoop deltatime enable

  1. Moving a game object

`movegameobject SubsystemToDeliverTo GameObjectName position=0,0,0

  • Will snap a game object to that position.
  • If the game object has a scene node only, SubsystemToDeliverTo must be RenderingSystem.
  • If the game object has a scene node and a physics node, SubsystemToDeliverTo must be Physics
  1. Scaling a game object

`scalegameobject SubsystemToDeliverTo GameObjectName scale=0,0,0

  • Will set the size of a game object to that scale.
  • If the game object has a scene node only, SubsystemToDeliverTo must be RenderingSystem.
  • If the game object has a scene node and a physics node, SubsystemToDeliverTo must be Physics
  1. Rotate a game object

`rotategameobject SubsystemToDeliverTo GameObjectName rotate=0,0,0,0

  • Will set the orientation of the gameobjec to that rotation.
  • the first 3 components of rotate are the axes on which to rotate. The 4th compoinent is how many degrees to rotate by.
  • For example, a rotation on the Y axis only by 45 degrees will be rotate=0,1,0,45.
  • If the game object has a scene node only, SubsystemToDeliverTo must be RenderingSystem.
  • If the game object has a scene node and a physics node, SubsystemToDeliverTo must be Physics

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published