The Project
The gEngine was built to study the technical fundamentals and the implementation of a 2D game engine from two important aspects: programmability and maintainability. Relevant concepts from software engineering, computer graphics, mathematics, physics, user interface, and game development will be presented in the context of game engine architecture, world coordinate system specification, object behaviors and interactions, camera manipulations, illumination, and game physics.
This project was the final group project for CSS452 where we needed to develop and API for a feature that gEngine lacked. My group chose to implement a user interface canvas.
The UI Canvas API provides centralized support for the game designer to access UI controls such as buttons, sliders, toggles, ect.
Currently in gEngine, ‘UI’ objects need to be created using renderables and would need new individual behaviors for each different type of object.
Our UI Canvas API allows for a modular and easy way to combine all UI into one simple package.
The API
A UI canvas is an overlay of the main document with objects that display information and allow the user to interact with objects in the scene with out explicitly referencing the object themselves. It requires no arguements.
Currently, the UI Canvas API supports four (4) elements: Buttob, Slider, Toggle, Dropwdown.
Aditionally, we needed to creating an event-listener system to create properly functioning UI elements.
UI Events are a special kind of multicast delegate that can only be invoked from within the class where they are declared (the publisher class). If other classes subscribe to the event, their event handler methods will be called when the publisher class raises the event.
Project Links
API Documentation: here.
Repository: here.
Demo of the API: here.