Project status: Working In Progress
Celeste Engine is a simple game engine that allows you to write legible and realiable code for high quality 2D games.
- Simple game engine
- User input management system
- Multiple scenes management system
- Audio source management system
- Filesystem management system
- GLSL Shaders management system
This is a minimal Game Engine based on the Build your own 2d game engine.
Before you begin, ensure you have met the following requirements:
- To clone and run this repository you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:
To install Celeste Engine, follow these steps:
# Clone this repository
git clone https://github.com/ovalves/celeste-engine.git
# Go into the repository
cd celeste-engine
# Install dependencies
npm install
# Run the app
npm run start
A basic game made with the Celeste Engine needs just these files:
assets/fonts
- The game text fonts.assets/scenes
- The game scenesassets/scripts
- The game object scriptsassets/sounds
- The game source soundsassets/spritesheet
- The game spritesheet imagesassets/textures
- The game object textures
constructor(MonoBehaviour)
- Setup all assets of the gamestart()
- Called in the creation of the game objectdraw()
- Called once per frame, use this method to draw objects in the sceneupdate()
- Called once per frame, use this method to interact with user inputs
class FirstScript {
/**
* Setup all assets of the game
*
* @param MonoBehaviour
*/
constructor(MonoBehaviour) {
this.gameObject1 = null;
this.kBgClip = "../tests/Game/assets/sounds/BGClip.mp3";
this.kCue = "../tests/Game/assets/sounds/MyGame_cue.wav";
this.monoBehaviour = MonoBehaviour;
}
/**
* Called in the creation of the game object
*/
start() {
this.gameObject1 = this.monoBehaviour.getGameObject('OBJECT_NAME');
}
/**
* Called once per frame
*/
draw() {
// Pssando a camera principal da cena para desenhar o objeto
this.gameObject1.draw(this.monoBehaviour.getMainCamera().getVPMatrix());
}
/**
* Called once per frame
*/
update() {
// Game Logic
}
}
- getRenderable() : Renderable
* setColor(color: Array<number>) : Renderable
* getColor() : Array<number>
* createObject(shader : any) : Renderable
* draw(vpMatrix: Array<number>) : void
* getTransform() : Transform
* position()
* setPosition(xPos: number, yPos: number)
* getPosition()
* setXPos(xPos: number)
* getXPos()
* incXPosBy(delta: number)
* getYPos()
* setYPos(yPos: number)
* incYPosBy(delta: number)
* rotation()
* setRotationInRad(rotationInRadians: number)
* setRotationInDegree(rotationInDegree: number)
* incRotationByDegree(deltaDegree: number)
* incRotationByRad(deltaRad: number)
* getRotationInRad()
* getRotationInDegree()
* scale()
* setSize(width: number, height: number)
* getSize()
* incSizeBy(delta: number)
* getWidth()
* setWidth(width: number)
* incWidthBy(delta: number)
* getHeight()
* setHeight(height: number)
* incHeightBy(delta: number)
* getSimpleShader()
* getTextureShader()
* getGameObject(objectName: string)
* changeScene(sceneName: string)
* getAudio()
* playBackgroundAudio(audioName: string)
* playAudioTrack(audioName: string)
* getMainCamera()
* getCameras()
* getInput()
* isKeyPressed(keyCode: any)
* isKeyClicked(keyCode: any)
* getKey(searchedKey: string)
* key()
* getVector2()
* getVector3()
* getMatrix2()
* getMatrix2D()
* getMatrix3()
* getMatrix4()
* getQuaternion()
* getQuaternion2()
The Celeste Engine is licensed under the MIT license. See License File for more information.