Giter Club home page Giter Club logo

sporkengine's Introduction

Class Design Details -

The component system was designed to be as abstract as possible, the components all inherit from a base component class and each individual component simply handles the setting of its variables, the game object class was designed to then add any type of component through the use of templates.

The camera system was designed in a conceptually similar fashion, the base camera class handles the setting and control of common variables along with providing methods to translate and rotate the cameras. The individual camera types then handle the input in their own fashion according to the movement type of their design.

Implementation Details -

The initial engine design was based around the concept of having a minimal amount of external dependencies by incorporating all necessary functionality as a part of the core engine. This led to the creation of my own maths library which was developed as the functionality was required. This includes simple vector functions, matrix functions and quaternion functions for rotation.

Model loading had to be handled externally(Assimp) after my own implementation of an OBJ loader fell short when trying to load certain models, this also had a knock on effect of the mesh component becoming a vector of meshes due to the way that Assimp loaded in a model. Rather than loading a single mesh it would create a new mesh for each segment of the model specified in the material file and simultaneously assign the texture to it. Another external dependency I relied upon for texture loading was stb image, fortunately the code for this dependency is contained in a single header file which aligned nicely with my initial design ethic.

Once the models were loaded, I was able to implement normal & specular maps, greatly improving the quality of the rendered model. Another feature the advanced the detail within the scene was the implementation of directional and point lights using the Blinn-Phong lighting model, along with gamma correction to create the right level of light ambience.

User Guide -

Find the 'SporkEngine.exe' file within the 'Demo' folder using either the Release or debug mode. Debug will provide more console output.

--- Controls ---
Model Camera:
To rotate around the scene hold the alt key and click the left mouse button.
To pan around the scene hold the alt key and click the middle mouse button.
To control the zoom hold the alt key then click the right mouse button.

First person camera (View camera):
To enable the first person camera select the camera mode drop down under the Main tab of the GUI and select ‘View’.
Once enabled look around the scene using the mouse and navigate the scene with the WASD keys.
The camera position and direction can be seen from within the Camera tab of the GUI.
To re-enable the model camera press the V key.

Model Settings:
To change the model find the Model Settings sub-section of the Main tab in the GUI and select the chosen model from the Model drop down menu.
To control the model the scale, position, rotation mode and shininess variables can be adjusted from within the GUI.
The camera position, direction and orientation values can be seen from within the Camera tab of the GUI.

Light Settings:
The Lights tab of the GUI controls the lighting elements within the scene, the editable variables of the directional light are its direction, its specular value and its ambience value.  
There are two controllable point lights in the scene with variable values for their positions, diffuse colours and ambience values.

Post processing:
The post processing tab of the GUI contains two different effects, wireframe mode which lets you view the scenes models as wireframes, along with a pixilation effect that adapts the scene to be rendered through the framebuffer whilst producing skewed values for the UV’s over time.

sporkengine's People

Contributors

kanesaccount avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.