top of page

C++ Game Engine

Overview

This is my personal game engine built from the ground up using C++, OpenGL, QT, and GLM. This was a solo project to learn C++ programming and game engine development.

 

The engine handles various functions, such as physics, A.I., rendering and lighting with OpenGL, and uses an Entity-Component system to create game object via composition. 

 

Models in OBJ files can also be converted to binary files so that the engine can quickly load in models and render them to the screen.

Date: January 2014 - December, 2014

Computer Graphics

Rendering With OpenGL

Using OpenGL and GLSL, I created a rendering system, wrote various shaders to render scenes with different effects and lighting, and made an OBJ-to-Binary file converter in C# so that assets can be loaded in and rendered by my engine.

 

I've programmed shaders that can apply different types of lighting, normal maps, transperancy, height maps, tangent-normals, and more. This video highlights the work I've done related to computer graphics.

AO, Normal, and Diffuse maps with Tangent-based Lighting

Disintegration and Height Maps using Perlin Noise

Reflections and Transperancy

Basic Artificial Intelligence

A.I. Through A* Pathing

For my game engine, I implemented an A* (A-star) pathfinding system. I began by creating a level editor, that lets me place and connect nodes as waypoints. Once the points are set, I save the data into a binary file.

 

Whenever I want to use the data in a game, I can read the binary file and use the data to give non-playable characters basic movement throughout the level. The video here demonstrates me creating, testing, and using the A.I. system.

Adding waypoints and connections in the level editor

Testing and Debugging the waypoints and connections

One-Man Capture-the-Flag

(If that's a thing)

Particle-Based Physics

2D Bounce Physics

Game Physics Implementation

The physics for the game engine is based on the particle-based physics engine that is taught in Ian Millinton's Game Physics Engine Development book. 

The physics range from common calculations such as gravity and forces on an object, to more complicated calculations like collision, spring joints, and rotations.

I started out with 2D physics so that I could test out new concepts. I then moved on to 3D physics to create mass aggregate objects like the cube in the images.

Forces action on a single particle

(Red: Drag | Blue: Launch Force | Yellow: Gravity)

Forces on Particle

Using points connected to each other to create physics for a box

Spring Joints 3D

Spring Joints in 2D space

[Square is the starting point of the spring]

© Portfolio by Luis Andrade. Proudly created with Wix.com

bottom of page