A downloadable engine for Windows

This is an in-development custom 2D and basic 3D game engine written in C/C++ and OpenGL for my own personal use. 

I started to create this engine as a learning experience, and have been working on it ever since as a passion project. It contains a rendering backend programmed using OpenGL with self-written matrix and Quaternion math, window creation using the Windows API, audio output (with sources and listeners) using OpenAL Soft, tinydir for easy directory navigation and file exploration, my own take on an internally managed Entity Component System for the game code, and a custom Axis Aligned Bounding Box physics engine. I keep adding and improving it over time, and use it for any games I work on independently.

As a side-note, the editor for the engine is completely outdated and is essentially deprecated at this point. While I was happy with how it looked while it was a work in progress, I felt like the way I was writing it was not good enough to keep extending and supporting it. Thus, I axed it for now as the current game I'm working on (the rogue-lite platformer with strung together rooms) wouldn't get much use out of it. At some point, I am still planning on making a full suite of engine tools, including the editor, but for now it is not a priority for me. Change of plans based on what I am currently working on, the editor is actively being worked on and has a brand new-from scratch interface! It's also written in GL and is in really early stages, but I'm very happy with how it looks and how it's being written.

ENGINE DEMO NOTES:

The current games here built with the engine are both side scrolling, but one is more of a atmospheric environment test while the other is work in progress rogue-lite platformer. These demos are running on an older version of the engine. There is now also a download for a 3D test scene with models and textures loaded on startup within the engine where you can fly around to check out the really early 3D rendering. This early 3D rendering features basic phong lighting, with specular map and WIP normal map support. The engine is currently missing light shadows, because the main 2.5D project I'm currently working on does not need them in anyway.

For the 3D test, you can use WASD to move the camera around and hold shift while moving to increase speed. To look around, use the arrow keys or left click and then drag your mouse. Additionally, Q and E can be used to change the camera's roll. Something to keep in mind at the moment is that vsync's a little weird with certain long rotations and transformations on the camera, so I'd recommend turning it off for now.

For the atmospheric test, it can be controlled with A and D for movement, shift to sprint, and pressing control to start telekinesis. Once in telekinesis mode, different boxes within range can be selected with the left and right arrow keys, and press control again to pick up the object. Afterwards, you can walk around with the object, move it with the arrow keys, and throw it by pressing the control key again. The game also features ledge grabbing, by jumping at a ledge and holding a direction. There is a ledge located on the left side of the test area. You may also "enter" houses by pressing either the e or w keys when over their door. Just to note, this demo is running on a much older iteration of the engine, so it is missing some features/improvements in the new version (Config files, faster startup due to optimizations, FPS cap).

For the second game demo, it is a prototype of a 2.5D rogue-lite platformer I was messing around with. This game loads rooms (created with the RoomEd app in the download) and strings them together to create "floors", which the player must platform through and clear. The player can move using the A and D keys, slide using the shift key, and jump with the spacebar. You cannot directly attack, but sliding into bats will knock them out and sliding into skeletons will knock them backwards, so you can get creative. Currently loads one floor, but you can use the F6 key for debug to load the next floor (crashes occasionally when loading, it's WIP). In the RoomEd app, CTRL-S and CTRL-L shortcuts are used for saving and loading rooms, respectively. Make sure to click the bottom half of the text for each room file's name, as the menu is still a little wonky in it's current stage (it was a tool for me, never meant to be widely used).

SOURCE CODE NOTES:

Since this page is unlisted now and requires the link to access it, I have included a full download of the latest full source code for the engine. It's still very in progress even with it being usable in it's current state, so there may be some systems you encounter in there that I have not touched months or even years.

FUTURE PLANS:

Currently, the engine is usable for creating full experience, even though it has some systems that need to be tweaked and updated as well as lacking an editor to speed up the world/level design process. Here's my list of plans below:

  • Make materials (for mesh render components) stored internally, as they were a recent addition to the engine with no purpose to be stored internally while testing Done! Materials are now in an internal array within the renderer. This allows me to manage them much easier internally within the engine.
  • Work on the OBJ model loader so that it supports the full variety of OBJ files (the ones missing vertex normals, texture coordinates, etc) Done! All data from the OBJ files is loaded and is much more efficient than before. Separate meshes are taken into account and stored internally individually as well.
  • Add automatic asset loading systems, for assets other than textures (which are dynamically loaded and unloaded as an option) and update dynamic texture loading to be compatible with mesh render components
  • Add sprites that can be drawn as quads in 3D space using the depth buffer (for 2.5D games such as the rogue-lite platformer)
  • Fix and add more features to custom shader support, which broke when refactoring the rendering systems Done! For the most part, custom shaders are working. But it would be best for me to add more sugar-coating around them so they are easier to create/use for the user.
  • Re-write DataArrays and create OrderedDataArrays for data-structures in the engine, now that I understand memory management much better, to replace std::vectors in the engine Done! Now using DataLists for anything where order matters, and DataArrays for unordered arrays that need to be fast.
  • Re-write framebuffer support to be more sensible and flexible, as the current implementation is not robust enough for large post-effects pipelines to be implemented or for sensible use of views with textures as render-targets.
  • Add fullscreen/borderless window support to the engine, won't take long as it's just figuring out the relevant window settings with the Windows API Done!
  • EVENTUALLY: Re-write the engine editor from scratch, using as little from the engine itself as possible for the UI New Editor is currently in it's early stages!
  • EVENTUALLY: Add a wrapper around the Bullet physics engine for 3D physics, which would make the engine fully capable to use for simplistic 3D games
  • EVENTUALLY: Add support for fbx/3ds model files, as well as bones and animations

Download

Download
Clarity3DSponzaDemo.zip 145 MB
Download
Atmoshperic-Test.zip 12 MB
Download
Crawler-Roguelite-Prototype.zip 4.2 MB
Download
Clarity-Full-Source-Code.zip 177 MB

Install instructions

HOW TO RUN:

Once downloaded, extract the files and open the exe to start the game. You can modify the config.ini within a text editor to change different options for the engine. At the moment, CacheTextures and DynamicTextures options might be broken and result in a crash due to some recent rendering changes.

CONTROLS:

For the atmospheric test, it can be controlled with A and D for movement, shift to sprint, and pressing control to start telekinesis. Once in telekinesis mode, different boxes within range can be selected with the left and right arrow keys, and press control again to pick up the object. Afterwards, you can walk around with the object, move it with the arrow keys, and throw it by pressing the control key again. The game also features ledge grabbing, by jumping at a ledge and holding a direction. There is a ledge located on the left side of the test area. You may also "enter" houses by pressing either the e or w keys when over their door. Just to note, this demo is running on a much older iteration of the engine, so it is missing some features/improvements in the new version (Config files, faster startup due to optimizations, FPS cap).

For the second game demo, it is a prototype of a 2.5D rogue-lite platformer I am working on. This game loads rooms (created with the RoomEd app in the download) and strings them together to create "floors", which the player must platform through and clear. The player can move using the A and D keys, slide using the shift key, and jump with the spacebar. You cannot directly attack, but sliding into bats will knock them out and sliding into skeletons will knock them backwards, so you can get creative. Currently loads one floor, but you can use the F6 key for debug to load the next floor (crashes occasionally when loading, it's WIP). In the RoomEd app, CTRL-S and CTRL-L shortcuts are used for saving and loading rooms, respectively. Make sure to click the bottom half of the text for each room file's name, as the menu is still a little wonky in it's current stage (it's a tool for me, never meant to go to the public really).

For the 3D test, you can use WASD to move the camera around and hold shift while moving to increase speed. To look around, use the arrow keys or left click and then drag your mouse. Additionally, Q and E can be used to change the camera's roll. 

Leave a comment

Log in with itch.io to leave a comment.