Kengine Versions Save

Game engine with an Entity-Component-System (ECS) architecture. Focus on ease-of-use, runtime extensibility and compile-time type safety.

v6.0

2 years ago

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.

v5.0

4 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.

Changelog

Major changes

"System Entity' model

  • Systems are now represented by Entities with "function Components"
  • Datapackets have been replaced by "function Components"
  • This lets systems be queried and extended by users (by adding new "function Components" or any other type of components, e.g. for profiling)

"Type Entities"

  • Replaced ComponentFunctions with "meta Components", attached to type Entities

Features

Architecture

Helpers

Tools

OpenGL

  • Render to texture
  • Cascaded shadow maps

Minor changes

Behaviors

  • OpenGL sprites and text are now drawn upright
  • ComponentJSONLoader now works with arrays
  • Optimized MagicaVoxelSystem loading through binary serialization
  • Light shaders are now responsible for clearing their shadow maps
  • Optimized OpenGL "entity in pixel" queries

ImGui tools

Components

Misc

  • Replaced putils_for_each_type macro with a function

Optimizations

Fixes

  • Fixed ImGuiAdjustableSystem not loading colors properly
  • Fixed crash in OpenGLSystem when requesting the Entity::ID for pixel in y == 0
  • Fixed camera orientation in OpenGLSystem

v4.2

4 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.

Changelog

Features

  • Added "component function" system, which lets users register function template specializations for specific components (such as a serializer, JSON parser, string matcher...)
  • Added an ImGuiEditor "component function" that displays a Component as a tree structure in ImGui
  • Added a LoadFromJSON "component function" that loads a Component from a JSON object
  • Added a MatchString "component function" that returns whether a Component (when serialized) contains a specific string
  • Added an ImGuiEntityEditorSystem that displays an ImGui editor for any Entity with a SelectedComponent
  • Added an ImGuiEntitySelectorSystem that displays an ImGui window letting users search for Entities and add a SelectedComponent to them
  • Added a Bullet Physics system and a QueryPosition datapacket
  • Added OnClickComponent and OnClickSystem

Major changes

  • Moved to a "model entity" architecture for OpenGL rendering systems, where Entities with a ModelComponent hold flyweight-style information for all GraphicsComponents pointing to a same resource

Minor changes

  • Added GodRaysComponent
  • Added roll to TransformComponent and CameraComponent
  • Added color and alpha to GraphicsComponent::Layer
  • Removed GraphicsComponent::Layer as it was mostly unused and only complicated code

Optimizations

  • Made BaseModule::receive non-virtual
  • Made the engine thread-safe

Fixes

  • Various fixes in OpenGL rendering systems, both about functionality and architecture

Note

The 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.

v4.1

4 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.

OpenGLSystem preview

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:

  • Added serialization
  • Made it possible to add/update entities during iteration
  • Added OpenGLSystem
  • Added PolyVoxSystem (used to generate meshes from voxel volumes)
  • Added MagicaVoxelSystem (used to load .vox model files)
  • Added AssImpSystem (used to load any other model file and skeletal animations)
  • Added SelectedComponent and HighlightComponent
  • Added ImGuiEntityEditorSystem and ImGuiEntitySelectorSystem

Major changes:

  • The SfSystem is no longer built as a plugin and is automatically linked if the option to build it is enabled

Minor changes:

  • kengine is no longer simply a CMake "interface library" but a full fledged static/shared library depending on your platform
  • The ImGuiAdjustableManager has become a System
  • Added pitch to GraphicsComponent
  • Component IDs are now printed, which may help with debugging an Entity's mask

Optimizations:

  • Used putils::string, putils::vector and putils::function instead of their standard counterparts. These have the advantage of never performing memory allocation.
  • Compilation times have been reduced thanks to being a "normal" library

Fixes:

  • Stopped using execution policies as they are not available on gcc
  • Fixed BehaviorComponent and BehaviorSystem which had not been updated to new API
  • Various fixes in scripting systems

What's coming next

The 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.

v4.0

5 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:

  • Entities no longer have names. If you really need to associate strings to your Entities you can create a NameComponent or something similar
  • Entities can no longer be serialized to ostream. I am currently working to re-implement this feature.
  • Because of the previous point, it is no longer possible to save and load the game state. I am currently working to re-implement this feature, in a manner that will be better optimized than the original (binary saving instead of JSON serialization)

Features:

  • Made it possible to get a collection of entities matching several component types
  • Added AdjustableComponent and ImGuiAdjustableManager
  • Added DebugGraphicsComponent
  • Added GUIComponent
  • Used an actual ThreadPool in EntityManager (i.e. in `Mediator)

Major changes:

  • Renamed GameObject to Entity
  • Entities no longer have names
  • Entities are now created using a simple function, instead of a type/type name and a name
  • Removed Component class. Any type can now be used as a component
  • Changed Entity::XXXComponent function names to Entity::XXX (e.g. getComponent became get)
  • Removed support for directories in ScriptSystem to stop iterating over FS every frame
  • Removed any use of Ogre as it was very experimental

Minor changes:

  • I changed my name 🙂 URL is now phisko/kengine
  • Changed Z axis in SfSystem (up is now up)
  • Used a real JSON library

Optimizations:

  • Made Entity a simple ID and bitmask, instead of storing a map of components
  • Stopped dynamically allocating each entity and component, instead used pools of components
  • Stored entities by "archetypes" to optimize iteration

Fixes:

  • Suppressed an inheritance warning in MSVC (I know my inheriting class is using its parent's function, that's the point)

v3.0

6 years ago

Features:

  • Added speed and pause/resume functionality
  • Added save/load feature
  • Added EntityManager::disableEntity suite
  • Added PySystem
  • Added Box2DSystem
  • Added ImGui support
  • Added CollisionSystem
  • Added ScriptSystem middle-class to simplify supporting more scripting languages
  • Made it possible to overwrite entities
  • SfSystem now detects appearance changes
  • SfSystem now supports rotation
  • Added GraphicsComponent::yaw
  • Added size field to GraphicsComponent to override TransformComponent on the graphical side of things
  • Added fields to GUIComponent to make placing GUI elements simple
  • Made it possible to repeat elements (such as a background) with GraphicsComponent::repeated

Major changes:

  • Removed Input datapackets and replaced them with InputComponent, makes more sense and is easier to use

Minor changes:

  • The 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 convenience
  • Optimizations in SfSystem
  • ExtensibleFactory now registers GameObject by default
  • Improved exception messages in EntityManager
  • Changes to script function names (removeEntity/removeEntityByName)
  • Removed all uses of QuadTree (in PhysicsSystem and PathfinderSystem)

Fixes:

  • Removed unnecessary and forgotten call to cout in LuaSystem
  • PhysicsSystem now skips collisions when PhysicsComponent::solid is set to false
  • Added missing include in hash.hpp
  • Improved key buffering in SfSystem
  • Made LuaSystem not destroy its sol::state in order to avoid memory corruption as I do not control the order of system destruction
  • Removed unnecessary call to detachComponent in SfSystem::removeGameObject
  • EntityManager now buffers entity removal to avoid iterator corruption

v2.2.2

6 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 commands

Optimizations:

  • Optimized includes in SfSystem

v2.2.1

6 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 datapacket

v2.1.0

6 years ago

Features:

  • The SfSystem now supports rendering through multiple cameras and controlling the rendered area through CameraComponents

Refactorings:

  • MetaComponent renamed to GraphicsComponent as it is its only use

v2.0.1

6 years ago

Major changes:

  • RegisterGameObject and RemoveGameObject are now datapackets, instead of members of the ISystem interface.

Minor changes:

  • Added 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 fixed