Pinky Engine Pinky

PinkyEngine - Download GitHub

About Pinky Engine

Pinky Engine is a Game Engine made by Andreu Nosàs Soler and Sara Qiao Martínez Mauri, as part of a college assignment from CITM (UPC) University, Terrassa, for the 3D engines subject during 3rd year of Game Design and Game Development degree.

image

Team Members

Sara Qiao Martínez Mauri Andreu Nosàs Soler
lSara-MM - ✧
- GameObjects
- Custom File Format
- Resource Manager
- Scene Serialization
- Engine Windows
- Component Mesh
- Component Material
- UI component pattern
- UI Components
AndyCubico - ✻
- Frustum & Frustum Culling
- Mouse Picking
- Component Camera
- Component Transform
- Guizmos
- Viewports
- UI Components
- UI logic
- Play/Stop mode

Core Sub-Systems

↦ GameObject & Component System

Every entity is a _GameObject _ which can contain different type of components (Transform, Mesh, Material, UI, Camera).

When a model is imported to the scene, GameObjects are created recursively for each mesh with Transform, Mesh and Material in case they have embedded textures. An empy GameObject only has Transform but other components can be added afterwards.

↦ Resource Manager

Once a file is imported to the scene for the first time, save and load it from memory if needed again. Delete the resource once it’s not used anymore. This way it’s not used more memory than needed and the usage of the game is drastically reduced.

↦ Custom File Format

Save and load in an encrypted files to protect and optimize the process of importing and loading files such as textures and 3D models.

↦ Scene Serialization & Time management

Scene’s GameObject’s structure is saved and loaded as .json using parson library. This method is used in the time management as well. On Play, it saves a temporary file of the current scene and when Stop it loads it back so the changes made during Play time are not saved like in Unity.

↦ Camera

Scene rendering time was reduced with camera culling, camera frustum, and AABB boxes to discard all the meshes outside the camera view.

High-level System: User Interface

System to render a variety of widgets on screen. It follows a component patern like the normal game objects, with each component inthereting from the base class C_UI.

UI Game Objects/Widgets:

↦ Canvas

Surface that represents the game window. What is inside of it will be rendered to game. It is automatically created when any UI Game Object is created and there is no canvas on scene.

↦ Image

Displays an image. Options to change its colour and the texture attached to it

↦ Text

Widget that renders the desired text (“Hello World” by default). Option to change the font colour and size.

↦ Button

It is formed by two Games Objects:

  • Text: if the user desires to input a text
  • Button: holds the logic of the button with the following states: Normal, Focusd, Pressed, Selected and Release
    • Option to change the colours of each state
    • Option to change the colour of the texture
    • Option to change the texture
    • It can call custom functions (like the fade in the demo)

buttonShow

↦ Input Box

Allows player to input any text when selected :

  • Input box Game Object holds the logic and has the same states as button
  • Text Game Object to store the input text (and be able to move it around)
  • It has the option to put a character limit

↦ Checkbox

Composed of multiple Game Objects: * Checkbox as the parent of the rest holds the logic to disable the checkmark and execute a desired function * Text if user wants to put a label to the widget * Background behind the checkmark * Checkmark, changes when the Checkbox parent is changed * As with button, option to change the colours of the states and of the textures

  • All of the UI Game Objects can be navigated through with tab (change the selected one)
  • Logic of all the UI works only in play mode
  • Buttons allow input from the keyboard (spacebar)
  • There is a demo that shows the functionality of all the Widgets:
    • Main menu with a fullscreen background, with an imput box and a button to start, when pressed fades away to the next scene
    • Next scene has the town of the second assignment and a crosshair in the middle of the screen
    • Pressing F1 in this scene opens up a menu, with a checkbox to drag the window and to toggle Vsync

engineGif1

License

MIT License

Copyright (c) 2023 lSara-MM

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.