If you find any bugs, please open an issue or contact games@nircoe.com
- Graphics API: OpenGL 3.0-4.6 with version-gated features, default version is 4.6.
- Set specific version: Add the following in your CMake files before fetching gamecoe (example for version 3.3):
set(GAMECOE_GRAPHICS_VERSION_MAJOR 3) set(GAMECOE_GRAPHICS_VERSION_MINOR 3)
- DSA (Direct State Access) for OpenGL 4.5+ - Stateless buffer operations (
#if GAMECOE_HAS_DSA) - UBO (Uniform Buffer Object) for OpenGL 3.1+ - Efficient uniform data sharing (
#if GAMECOE_HAS_UBO) - Shader Preprocessing: gamecoe auto-injects
#versionand#definemacros into your shaders
- Set specific version: Add the following in your CMake files before fetching gamecoe (example for version 3.3):
- Rendering: Basic Shape rendering support (only triangle, rectangle and box at the moment)
- Multi Active Scene Support: Want to build a bigger world with more than 1 active Scene at a time? Want to make the pause menu a separated Scene so your code will be more organized? gamecoe supports it!
- gamecoe structure: gamecoe holds several namespaces
- gamecoe: The main namespace, built out of a few modules -
- gamecoe/core:
Game,Scene,Windowclasses - gamecoe/entity:
GameObject,Component,Transform,Camera,Renderer,ShapeRendererclasses - gamecoe/graphics: Mostly internal for gamecoe or for power user usage -
Shader,GraphicsBuffer,VertexArrayclasses (Textureclass implemented but not yet integrated into a Component) - gamecoe/utils: Mostly internal for gamecoe
- gamecoe/core:
- timecoe: Track the time between frames
#include <timecoe.hpp> float deltaTime = timecoe::deltaTime();
- colorcoe: Use one of 140 built-in colors from the colorcoe:: namespace,
or a custom color of your own with the gamecoe::Color class!
#include <colorcoe.hpp> auto green = colorcoe::green(); gamecoe::Color myColor(108, 92, 236, 98);
- inputcoe: Full basic keyboard and mouse input tracking, want to know if a key/button just got clicked?
if it's being held down? what is the position of the mouse?
you can find this functionality and more in the inputcoe:: namespace!
#include <inputcoe.hpp> if (inputcoe::pressed(inputcoe::Key::Space)) { /* do something */ } auto mousePosition = inputcoe::mousePosition(); if (inputcoe::released(inputcoe::MouseButton::Left)) { /* do something */ }
- gamecoe: The main namespace, built out of a few modules -
- gamecoe toolkit: Use a variety of our in-house tools for better game development experience with gamecoe.
All are optional, to avoid bloatware.
- logcoe: Feel free to use our in-house tool logcoe as your logger during development,
logcoe comes built-in with gamecoe!
Just add
set(GAMECOE_USE_LOGCOE ON)in your CMake files before fetching gamecoe, and you are good to go!logcoe::debug("Player got 1 coin!"); logcoe::error("Enemy has negative HP!");
- soundcoe: Feel free to use our in-house tool soundcoe for your game sound management,
soundcoe comes built-in with gamecoe!
Just add
set(GAMECOE_USE_SOUNDCOE ON)in your CMake files before fetching gamecoe, and you are good to go!soundcoe::playMusic("boss_fight.wav"); soundcoe::playSound("hit.mp3");
- logcoe: Feel free to use our in-house tool logcoe as your logger during development,
logcoe comes built-in with gamecoe!
Just add
- Engine Structure:
Game→Scene→GameObject→Componentclasses workflow
initialize() Called when GameObject/Component is created
↓
begin() Called at the beginning of Scene activation
↓
activate() ←────────╮ Called when GameObject/Component is activated
↓ │
├─→ update() ←╮ │ Called every frame while active
├─→ render() ─╯ │ Called every frame if GameObject has Renderer, or Component is a Renderer
↓ │
deactivate() ───────╯ Called when GameObject/Component is deactivated
load() ←───────────────╮ Called when Scene is loaded
↓ │
activate() ←────────╮ │ Called when Scene is activated
↓ │ │
├─→ update() ←╮ │ │ Called every frame while active
├─→ render() ─╯ │ │ Called every frame while active
↓ │ │
deactivate() ───────╯ │ Called when Scene is deactivated
↓ │
unload() ──────────────╯ Called when Scene is unloaded
- C++20
- CMake 3.20+
- Python3: for GLAD2 generation
- Linux: Developed and tested on Linux (Arch)
- Windows: Not tested yet
- MacOS: Not tested yet
- Officially Supported: OpenGL 3.0+
- Tested Compatibility: May work on OpenGL 2.0+, but not officially supported
The engine is designed for OpenGL 3.0+ core profile. Older versions may work but are not guaranteed.
gencoe - Python-based Generator for gamecoe!
gencoe will generate a new ready-to-go project with gamecoe examples for you, and will help you to create new scenes and components faster and easier!
Please look at gencoe README for more details.
First of all, for any help with gencoe, please run:
# General gencoe help
gencoe --help
# New Project generation help
gencoe init --help
# New Scene generation help
gencoe scene --help
# New Component generation help
gencoe component --helpUse gencoe to generate a new project with examples on how to use gamecoe in main.cpp:
# In order to generate a new project in the current directory:
gencoe init MyGame
# In order to generate a new project in a specific path:
gencoe init MyGame -p /path/to/MyGameLater on use gencoe in order to generate scenes and components for your game!
# Generate the assets directories for a new Scene and code snippet for it
gencoe scene MainMenu
# Generate .hpp/.cpp files for a new Component
gencoe component PlayerController
# Generate .hpp/.cpp files for a new Component that inherits from another Component
gencoe component CustomRenderer -i Renderer
# Generate .hpp/.cpp files for a new Component inside a namespace
gencoe component Monster -n Enemies- GLFW: Window and Input handling
- GLAD: OpenGL Context
- GLM: Math library
- logcoe: In-house logger (Optional)
- soundcoe: In-house sound manager (Optional)
- Collider: Collider Component for GameObjects collision detection and handling
- More Basic Shapes: Circle, Sphere and more
- Batch Rendering: Introduce batch rendering system for better performance
- SpriteRenderer: New Renderer Component for Sprite rendering
- datacoe: Integrate datacoe for save/load data management system with optional encryption
- Example Projects: Add small games created with gamecoe as examples
- Thread Safety: Make gamecoe thread-safe and benefit from parallel performance enhancement
- Text Rendering: Font loading, text rendering
- uicoe: Built-in factory methods for basic UI GameObjects such as Button, Textbox, and more
- poolcoe: Built-in Object Pool system
- GameObject parent-child tracking: Two-way tracking
- Better Documentation and Logging
- mathcoe: In-house math library, to replace glm