Personal and technical blog and information site

Crystal Engine

Crystal Engine is a light-weight game engine built in C++ on OpenGL and Simple DirectMedia Layer.
Please understand that this product is still in the early stages of development, and that documentation may be limited to in-source comments until the product reaches beta. These builds are posted primarily for debugging purposes, and should not be used in production unless they are labeled "Stable."

Demo and Source Download

Date Version Notes Run or Download
2016. (22af44f)+ Added engine icon
+ Added draw disable for frame skipping
+ Moved graphics settings from Game constructor to individual functions
+ Render now renders to buffer by default, improved up-scaling
+ Added configuration file and option form to replace command line arguments
+ Added DemoSettings class for managing the configuration file
+ Added return code on quit from game play loop
* Separated Window and Renderer creation to allow renderer flags to be passed
* Moved manager classes inside the Game class
* Added functions to Game for accessing public manager functions
* Fixed inputManager getKey for mouse buttons
- Removed entity draw functions (replaced with draw disable in update)
Please complete the captcha above
See all builds



All prerequisites are included in the app bundle for builds and above.


Prerequisites on Linux include the SDL2_devel/SDL2_image-devel/SDL2_ttf packages. SDL2/SDL2_image/SDL2_ttf being the runtime equivalents.
The name of these packages may vary by platform.


All dependencies are included in dll form with the compiled product.

Usage Instructions

All information regarding compiling can be found in Makefile in the source archive.
To run this program, follow the instructions for your operating system.


These instructions apply for build and above.
  1. In Gatekeeper, enable applications from anyone, explained here
  2. Extract the app bundle from the archive to your Applications folder
  3. Run the engine demo like any other software


  1. Extract the contents of the ZIP archive to your desired location
  2. Open Terminal
  3. Using the change directory command, cd [folder name here], and list (or directory) command, ls, navigate to where you extracted the ZIP file's contents
    If you can type ls CrystalEngine and see a file with that name, you are in the right place, so continue
  4. Type chmod ug+rx CrystalEngine.bin (executable name may vary) to allow the file to be executed
  5. Type ./CrystalEngine (executable name may vary) to run the engine demo
Note: In builds without a menu, you may exit at any time by pressing Esc


  1. Extract the contents of the ZIP archive to your desired location
  2. Navigate to the location with File Explorer
  3. Double click on the file named CrystalEngine.exe
Note: You may need to whitelist the .exe file in your security software, since it is not a common program
Note: In builds without a menu, you may exit at any time by pressing Esc

Feature Checklist

[ ] Graphics
	[#] Renderer initialization
	[#] Renderer size control
	[#] Texture management
		[#] Texture drawing
		[#] Texture loading
		[#] Asset storage structure
		[#] Asset naming structure
		[#] Animation sequencing via incremental names
	[ ] Animation management
		[#] The Sprite object
		[#] Management of sprite frames based on time step and frame-rate
		[#] Management of sprite frames via exact modulo frame request
		[#] Creation of Sprite with static textures
		[#] Creation of Sprite with multiple textures
		[ ] Creation of Sprite from an animation strip
		[ ] Drawing functions within Sprite object
			[#] Translatable matrix
			[#] Rotatable matrix
			[#] Skewable matrix
			[ ] Color control
			[#] Alpha control
			[ ] Support for Blending modes
	[#] File format support
		[#] BMP
		[#] PNG
		[#] JPG/JPEG
	[ ] Font support
		[#] TrueType support
		[ ] BitMap support
		[ ] String drawing
			[#] Basic drawing
			[#] Specifiable origin point
            [#] Text alignment around origin point
			[#] Cropping and crop alignment
			[ ] Variable character spacing
			[ ] Directional alignment
			[ ] Line wrapping with bounds
[ ] Audio
	[ ] Sound Management
		[#] The Mixer/SoundManager object
		[#] Management of sounds based on file names
		[#] Creating Sound objects given exact file name
		[#] Queueing of sounds
		[#] Mixing and simultaneous sound events
		[ ] Multi-channel support
		[ ] Re-sampling
		[ ] Master volume control
	[ ] The Sound object
		[#] Stores audio and identifiers
		[ ] Playback
			[#] Plays audio when commanded
			[#] Multiple, simultaneous sound events
			[#] Stops audio based on creation identifier
			[ ] Fades audio in and out
			[ ] Audio effects
			[ ] Volume control
	[ ] File format support
		[#] WAV
		[ ] MP3 (may not pursue)
		[ ] OGG (may not pursue)
[ ] Entity
	[#] Entity template object
		[#] Extensible interface
		[#] Built-in properties
			[#] Sprite
			[#] Location
			[#] Create event
			[#] Update event
			[#] Destroy event
	[#] Entity controller
		[#] Entity storage array/vector/linked-list
		[#] Entity update controller
		[#] Entity order and draw sequence controller
		[#] Entity delete controller
	[ ] Collision detection
		[#] Single-entity (instance) collision
		[#] Multiple entity (object) collision
		[#] Circular collision detection
		[#] Rectangular collision detection
		[ ] Pixel-mask collision detection
		[ ] Hybrid collision detection (might not pursue)
[#] Input
	[#] Asynchronous text input
	[#] Asynchronous key press/release detection
	[#] Key identifier

Software Utilities

These are applications that I have written for a variety of purposes over time. They may not be particularly useful to you, nor user-friendly by any means, but use them if you want to. I offer no warranty and accept no responsibility for damage due to your use or misuse of these applications. If you want me to make something, please contact me.