The goal of the engine is to determine a representation of the element described in the gameplay package.
## Functionality
The engine can create a window apply an aspect ratio, and dynamically as the window resize maintain the graphic environment as the selected aspect ratio.
Display 2d model on the screen apply texture/shader to them, every basic geometric transformation: translation, rotation, scaling.
Built-in HUD system, the engine is able to create an object and make it keep track of the position/scaling of the camera.
For this release three types of ui element exist: basic geometric shape, text and progress bar but this is a really easy system to expand on.
Sound is also managed by the engine, with the help of the OpenAl library we can recreate 3d sound, doppler effect and such in the game albeit these effects are unused by the game at the moment.
## Behaviour
At every call of the `engine.render()` method every Object added to the render queue is rendered in accordance with the shader chosen.
<divid="HDIK">
<h2>
How does it work?
</h2>
</div>
Because our engine uses the OpenGL API every object in the scene is represented by a vertex array object, this array keep track of every vertex, indices, color and textureUV information. All of these informations are encapsulated in the `VertexArray` class.
A vertex array work in tandem with a shader to show the object as our artist intended, shader are written in the glsl standard of the OpenGl library. Those small programs are sent to the gpu and are used in two phases, the vertex calculation and the fragment one, the first is used to calculate the position of the vertex in the game world and through the projection, the second one is used to calculate which color each pixel on the screen should be. These two part essential for the creation of an object are encapsulated in the `ObjectGl` class which is the most used class in the engine.
Through this class you can apply transformation to the object, modify shader, vertex array etc...
Now these objects are used by the engine class who store every one of them in a `arrayList`, at every call of the `render()` method these `ObjectGl` are draw on the screen according to the rule specified in their shader and vertex array.
Inputs are collected via the use of the `update()` method for every interaction a callback has been created in the `Input` package through these callbacks we can fetch for example which key has been pressed on a keyboard.
## Brief package presentation
### camera
A camera is represented by a 3D vector in the world space the main class in the package camera can be used to modify the position, zoom in or out.
Tracking class are used to control automatically the behavior of the camera.
`TrackingSF3ThirdStrick` is an imitation of the camera behavior in the game Street Fighter 3 Tracking is updated every frame in the `engine.update()` method