The personal engine, based on C++, D3D11 and Windows platform, has since improved significantly, and making small games while evolving the engine was really fun! Until now, this engine has many features including 2D and 3D rendering framework, input system, audio system, UI system, networking system and simple multi-threading job system.
The engine code base is in GitHub.
When initially starting to develop the engine and small games, like Asteroids and Incursion, I was using OpenGL 1 for rendering, and alpha blending and triangle textured drawing were the only functions I used. Thus, many helper functions were implemented to quickly draw commonly used shapes: ring, circle, polygon, and rectangles.
The image reading function is based on STB_image.
Then I switched to D3D11, and started to build the orthographical camera and the perspective camera, so that the engine could support 3D games as well.
I used the Blinn-Phong lighting model, and implemented ambient light, directional light, point light and spotlight in HLSL, as well as other shader effects, like fog, bloom, tone map, dissolve and tri-planar. Also, to actually test the lighting result, textures beside diffuse textures were supported: normal, specular, emissive texture. Later, I concluded and added a Material class, to reduce redundant code.
And to better test and perceive the 3D render quality, I added in OBJ file reading, with functions of smoothing normals, generating normals and tangents by mikkTSpace library.
Lighting & OBJ file support
Parallel shader & height map
Moving light
The 2D physics was written on the game side at the start, as games only needed simple physics: disc VS disc, disc VS tile, like Asteroids and Incursion.
Later, a physics 2D system became essential when I wanted to support complex physics, like polygon VS polygon collision.
Two types of colliders were supported: disc and polygon collider. The polygon versus polygon collision detection and manifold generation is based on GJK. The collision resolving is based on sequential impulse, with a smooth pushing out process. Also, physics material, bounciness and friction, was supported, so the resolving collision process felt more natural.
For the rigid body, it supported drag, mass, angular rotation and different kinds of locks: rotation lock, axis lock.
For the physics system, it updates at a fixed rate separated from the game, supports 32 layers of physics layers, and manages all rigid bodies and colliders internally. The most interesting feature is the usage of delegates. So every rigid body could register calling functions at collision begin, end, or going-on at game's startup, and the functions would be triggered automatically under the correct condition. This feature was used in Devour.
Physics 2D sandbox
Collisions
XML support by TinyXML2
Audio system based on FMod
UI System based on ImGui
Developer Console
Event System
Random Number Generator
Input system for Windows keyboard & mouse & Xbox controller
Sprite sheet and animation
Base 2D particle system
Network system with TCP & UDP
Developer console for Doomenstein server side