Game engine with an Entity-Component-System (ECS) architecture. Focus on ease-of-use, runtime extensibility and compile-time type safety.
MIT License
Bot releases are visible (Hide)
This release comes with a ZIP file containing the entire source code, including its submodules. This makes it easier for people not used to working with Git submodules to download the entire source code.
There have been many additions and changes to the API, so writing a changelog for this would boil down to re-writing the entire documentation. Feel free to take a look at the new commits since v5.0 if you really need to check for individual changes.
Published by phisko almost 5 years ago
This release comes with a ZIP file containing the entire source code, including its putils
submodule. This makes it easier for people not used to working with Git submodules to download the entire source code.
Entities
with "function Components"ComponentFunctions
with "meta Components", attached to type Entitieskengine::no<T>
option for EntityManager::getEntities
to filter out Entities
with a given componentenums
in ImGui toolsOpenGL
OpenGL
shadersComponentJSONLoader
now works with arraysOpenGL
"entity in pixel" queriesInputFloats
ModelLoaderComponent
with ModelDataComponent
InputComponent
callbacksloop
field in AnimationComponent
pitch
, yaw
and roll
to PhysicsComponent
PhysicsComponent::kinematic
with KinematicComponent
putils_for_each_type
macro with a functionImGuiAdjustableSystem
not loading colors properlyOpenGLSystem
when requesting the Entity::ID
for pixel in y == 0
OpenGLSystem
Published by phisko about 5 years ago
For the first time, this release comes with a ZIP file containing the entire source code, including its putils
submodule. This will make it easier for people not used to working with Git submodules to download the entire source code.
ImGuiEditor
"component function" that displays a Component
as a tree structure in ImGuiLoadFromJSON
"component function" that loads a Component
from a JSON
objectMatchString
"component function" that returns whether a Component
(when serialized) contains a specific stringImGuiEntityEditorSystem
that displays an ImGui editor for any Entity
with a SelectedComponent
ImGuiEntitySelectorSystem
that displays an ImGui window letting users search for Entities
and add a SelectedComponent
to themQueryPosition
datapacketOnClickComponent
and OnClickSystem
Entities
with a ModelComponent
hold flyweight-style information for all GraphicsComponents
pointing to a same resourceGodRaysComponent
roll
to TransformComponent
and CameraComponent
color
and alpha
to GraphicsComponent::Layer
GraphicsComponent::Layer
as it was mostly unused and only complicated codeBaseModule::receive
non-virtualThe master
, develop
and v4.2
commit histories have been emptied to reduce the repository size. This is due to my (very unfortunately) poor use of Git. While trying to make the repository easier to use, I switched from submodules to subtrees. This made it easier to clone the repository, but much harder for me to work with it. The commit history quickly became polluted and the repository size basically exploded.
I found no better solution than to clear the history, which shouldn't have too many downsides, apart from people who forked the engine and would have liked to submit a merge request (but I haven't had any of those in ages).
I will be much more careful with my use of Git from now on, and will try to keep the repository size sane.
Published by phisko over 5 years ago
This version adds an extensible OpenGL deferred rendering system.
Default shaders are provided, but these are absolutely not state of the art, as graphics programming is not my specialty. They include (poor quality) shadow maps and (pretty decent) volumetric lighting/god rays.
Systems have also been added to load 3D models, be they standard (.obj/.fbx/etc. loaded with the assimp
library) or in MagicaVoxel
's .vox format. The AssImpSystem
also supports skeletal animation, although it has not been optimized at this point.
Performance has also been enhanced by the avoidance of runtime memory allocation, using putils::string
, putils::vector
and putils::function
instead of their standard counterparts.
Features:
OpenGLSystem
PolyVoxSystem
(used to generate meshes from voxel volumes)MagicaVoxelSystem
(used to load .vox model files)AssImpSystem
(used to load any other model file and skeletal animations)SelectedComponent
and HighlightComponent
ImGuiEntityEditorSystem
and ImGuiEntitySelectorSystem
Major changes:
SfSystem
is no longer built as a plugin and is automatically linked if the option to build it is enabledMinor changes:
kengine
is no longer simply a CMake "interface library" but a full fledged static/shared library depending on your platformImGuiAdjustableManager
has become a System
pitch
to GraphicsComponent
Entity
's maskOptimizations:
putils::string
, putils::vector
and putils::function
instead of their standard counterparts. These have the advantage of never performing memory allocation.Fixes:
BehaviorComponent
and BehaviorSystem
which had not been updated to new APIThe first thing I want to sort out is proper handling of object sizes in the OpenGLSystem. This was fairly simple with SFML as images were all loaded with the same default size. OpenGL introduces the fact that models may be created with different sizes, meaning that getting them to render properly and have their TransformComponent's size reflect reality implies playing around with the GraphicsComponent and TransformComponent sizes. This is not optimal.
I'm hoping to come up with a satisfactory solution for this soon enough and make a small release when that time comes. After that, I plan to implement a few toy projects with the engine in its current state to see what may be missing. One obvious thing is a menu system (and generally 2D rendering in OpenGL), so that may not be too far down the line.
Published by phisko almost 6 years ago
This new version features a greatly optimized memory architecture, better cache-efficiency, and a more advanced API.
This release changes the API for the kengine in various places. Refactoring code to work with this release should be rather straightforward, but some features have been temporarily removed:
NameComponent
or something similarFeatures:
AdjustableComponent
and ImGuiAdjustableManager
DebugGraphicsComponent
GUIComponent
ThreadPool
in EntityManager
(i.e. in `Mediator)Major changes:
GameObject
to Entity
Component
class. Any type can now be used as a componentEntity::XXXComponent
function names to Entity::XXX
(e.g. getComponent
became get
)Minor changes:
Optimizations:
Entity
a simple ID and bitmask, instead of storing a map of componentsFixes:
Published by phisko over 6 years ago
Features:
EntityManager::disableEntity
suitePySystem
Box2DSystem
ImGui
supportCollisionSystem
ScriptSystem
middle-class to simplify supporting more scripting languagesSfSystem
now detects appearance changesSfSystem
now supports rotationGraphicsComponent::yaw
size
field to GraphicsComponent
to override TransformComponent
on the graphical side of thingsGUIComponent
to make placing GUI elements simpleGraphicsComponent::repeated
Major changes:
Input
datapackets and replaced them with InputComponent
, makes more sense and is easier to useMinor changes:
common
directory is now in the include path ("common/systems/LuaSystem.hpp" can be replaced by "systems/LuaSystem.hpp")System.hpp
now forward declares EntityManager
for convenienceSfSystem
ExtensibleFactory
now registers GameObject
by defaultEntityManager
removeEntity/removeEntityByName
)QuadTree
(in PhysicsSystem
and PathfinderSystem
)Fixes:
cout
in LuaSystem
PhysicsSystem
now skips collisions when PhysicsComponent::solid
is set to false
hash.hpp
SfSystem
LuaSystem
not destroy its sol::state
in order to avoid memory corruption as I do not control the order of system destructiondetachComponent
in SfSystem::removeGameObject
EntityManager
now buffers entity removal to avoid iterator corruptionPublished by phisko almost 7 years ago
Fixes:
LuaSystem
clears its buffer at the end of each frame instead of the start (meaning events that were triggered before the start of the frame now get properly processed)LuaSystem
catches exceptions thrown by buffered commands to ensure proper execution of other commandsOptimizations:
SfSystem
Published by phisko almost 7 years ago
Fixes:
PhysicsSystem
now properly removes deleted GameObjects
from its quadtree (fixing memory corruption issues)LuaSystem
now buffers entity creations and removals until end of frame (fixing memory corruption issues)Addition:
LuaCollisionSystem
: provides access to Collision
datapackets from scripts. Serves as an example of how to provide access to any type of datapacketPublished by phisko almost 7 years ago
Features:
SfSystem
now supports rendering through multiple cameras and controlling the rendered area through CameraComponents
Refactorings:
MetaComponent
renamed to GraphicsComponent
as it is its only useMajor changes:
RegisterGameObject
and RemoveGameObject
are now datapackets, instead of members of the ISystem
interface.Minor changes:
pmeta_get_class_name
and other utility macros to make creating Reflectible
classes much easier.Fixes:
SfSystem
had a major drawing issue which is now fixedPublished by phisko almost 7 years ago
As the engine is evolving rapidly and I have a few major API breaking changes in mind, it is time for our first stable release!