All changes to this project will be documented in this file. The format is based on Keep a Changelog.
tnt::unroll
ontypes/TypeUtils.hpp
, which emulates a partially unrolled loop.json/JsonEnum.hpp
, which adds support for automatically generating json bindings for desired enum types on request. For enabling automatic enum bindings, please modifytnt::enum_traits<T>
fromtypes/EnumTraits.hpp
totrue
for your enumT
like this:
enum my_enum { /* some custom values */ };
#include "types/EnumTraits.hpp" // needed for tnt::enum_traits
template <>
struct tnt::enum_traits<my_enum>
{
inline static constexpr my_enum count = my_enum::count; // change this if your enum doesn't have count at the end as a "sentinel"
inline static constexpr bool jsonable = true;
};
tnt::enum_sentinel<T>
, a variable template that signalises "end of parsing" to enum-stringifying functions onmirror/Light.hpp
. It can be specialised for your custom enums, and it defaults toT::count
.tnt::enum_name
for getting a string representation of an enum's name either at compile time or run time.tnt::enum_value
for getting an concrete enum value from a string representation either at compile time or run time.- Support for
tnt::task<void>
. mirror/Light.hpp
which contains some basic reflection facilities.tnt::type_name
andtnt::value_name
now live there.tnt::conceptify
ontypes/TypeUtils.hpp
, which helps convert simple type traits to concepts without you needing to writerequires
.
- Reduced template instantiations on the new type lists implementation. You can find them on
types/TypeLists.hpp
. - Improved
tnt::range
to cover some corner cases. tnt::enums
now returns an array of pairs containing the name and the value of the enum.tnt::Vector
is now trivially default constructible. Also the constructor which has a single parameter is now explicit.include/json/*
's folder files now have a corresponding source file onsrc/json
. Also the "registration" technique is changed, but shouldn't affect the code that uses these files.tnt::doo::system_base<T>::clear
now works even ifT
doesn't provide aclear
method by callingremove
on each object onT::active
. Alsotnt::doo::system
doesn'trequire
types to provide aclear
method anymore.- Methods of
tnt::system<T>
are now conditionallynoexcept
depending on the implementation of these methods onT
.
tnt::Expected
. Usetnt::expected
from the same file instead as it offers exceptionless error handling andconstexpr
usage.
- Old typelists implementation. It is replaced by the implementation that was previously found on folder
exp
. [[deprecated]]
functions ontnt::doo::physics_sys
.
operator==
fortnt::bit_mask
types.utils/SDL_forward.hpp
, which forward-declares some opaque SDLstruct
s.tnt::Vector
now is move assignable.tnt::value_name
which returns a string representation of the value passed as a template parameter. It can be especially useful when used with enums.- Conversion operator from
tnt::basic_hashed_string<Char>
tostd::basic_string_view<Char>
.
- Some warnings related to the naming of some local variables.
- Operators overloaded for
tnt::bit_mask
are now markednoexcept
. - Separated the documentation part of the build from the rest. See
cmake/Doxygen.cmake
. pcg/Random.hpp
now has a corresponding source file.- Rewrote
tnt::generator<T>
to allow custom allocator support. - Minor quality of life improvements for
tnt::generator<T>
andtnt::task<T>
.
{fmt}
support fortnt::type_info
. Seeformat/FormatedTypeInfo.hpp
.- Support for the function from
core/Graphics
on Lua (tabletnt:gfx
). There is a new entry ontnt::lua::lib
namedgraphics
and some entries now have an updated value. tnt::hashed_string
, a non-mutable string with a pre-computed hash value ontypes/HashedString.hpp
.std::hash
(types/HashedString.hpp
) andfmt::formatter
(format/FormatedHashString.hpp
) specialisations are provided.
tnt::type_info::name()
will now correctly show the type name stored.
tnt::type_info::operator==
is now[[nodiscard]]
to avoid accidentally using comparing instead of assignment.tnt::type_info::name()
will now return astd::string_view
.tnt::type_info
is nowfinal
to avoid unintended usage.tnt::type_id
will not stripconst&
from the type name anymore.- Fixed warnings about
tnt::doo::physics_sys::addForce
being used ontnt::doo::steering_sys
. tnt::AudioPlayer
now contains a pointer to the audio cache and one to the sfx cache.tnt::Snipper
,tnt::vfs_handle
andtnt::vfs::*
now usestd:unordered_map
.tnt::Snipper
,tnt::vfs_handle
,tnt::vfs::*
,tnt::asset_cache
pre-defined specialisations now usetnt::hashed_string::hash_type
as key.- Updated
extra/.editorconfig
to match the style used on the codebase.
physics
folder, it was unused.
tnt::type_name
onTypeInfo.hpp
if you need only the name of a type.tnt::operator<<
fortnt::type_info
so that it can be used withstd::cout
.tnt::Vector::operator*
withfloat
as first argument, making some code easier to read.tnt::physics_sys::force
, that stores the force being applied to the objects on a certain moment. Related functions are updated accordingly.tnt::is_debug_v
andtnt::is_release_v
onutils/Traits.hpp
.extra/tnt.natvis
will be installed when building theinstall
target.utils/FLogger.hpp
, which adds support for writing log output to a file by using functions ontnt::logger
.tnt::lua::registerLoader
to add the TnT modules loader to the given lua state.tnt::drawCircle
andtnt::fillCircle
oncore/Graphics
.- Deduction guides for classes on
types/ScopeUtils.hpp
.
- Updated
tnt::type_info
andtnt::type_id<T>
to work withoutfriend
. tnt::physics_sys::AddForce
andtnt::physics_sys::addGlobalForce
are no longer profiled.tnt::ImGui::WindowFlags
is now 8 bit.tnt::logger
will now print the logging message type fromERROR:
to[ERROR]
to provide more readable output.- Moved
tnt::logger::printable
tonamespace detail
. - TnT libraries on Lua now MUST be
required
when used withtnt::scripts_sys
from the Data Oriented ECS. Otherwise, the good ol'lua::load*
functions are still available for use. - The third argument of
tnt::scripts_sys::add_object
, since TnT libraries can now berequire
d from a Lua script. tnt::crtp<T>::super
is nowprotected
.- Functions on
core/Graphics
are now marked asnoexcept
.
- Small tweaks.
- Some incorrect things on
exp/TypeListsv2.hpp
. - Some incorrect things on
doo_ecs/System.hpp
.
tnt::physics_sys::addForce
andtnt::physics_sys::addGlobalForce
. Instead, just add the desired force to thetnt::physics_sys::force[id]
andtnt::physics_sys::totalForce
variables accordingly.
tnt::physics_sys::resolveVelocity
andtnt::physics_sys::resolveInterpenetration
. Usetnt::physics_sys::resolve
instead.tnt::crtp<T>::super
. It gave issues when assigning a derived class. Usetnt::crtp<T>::base
instead.
tnt::y_comb
ontypes/TypeUtils.hpp
.tnt::vfs_handle
if you want to have separate virtual file systems. It is thread-safe, like the functions ontnt::vfs
will be soon.tnt::crtp<T>::super
, which is the same as callingtnt::crtp<T>::base()
.doo_ecs/System.hpp
, which contains some utilities related to Data Oriented ECS systems.utils/Bench.hpp
which will replaceutils/Benchmark.hpp
.tnt::sized_any<S>::operator bool
to check the validity of the content of the any type.
tnt::crtp<T>
is now default constructible andconstexpr
-ready.TypeUtils.hpp
is now moved on foldertypes
.PROFILE_FUNCTION
now works with the three major compilers.tnt::any
is nowtnt::sized_any<S>
where S denotes the size of the storage for the any. It is deduced by default or can be set by the user. If you want to use different any objects with different sizes on an array/vector, usetnt::any
which is equal totnt::sized_any<(std::size_t)-1>
and has a default size.
utils/Benchmark.hpp
, but you should still use it, untilutils/Bench.hpp
is finished.
- Folder
types
, which contains type-related utility files. mirror/TypeInfo.hpp
andmirror/Any.hpp
.exp/TypeListsv2.hpp
which will replace the old implementation in the future.extra/tnt.natvis
which lets you check the values oftnt::
data types on the Visual Studio debugger. NOTE: Data Oriented Systems are not included.- Destructor
tnt::Expected<T>
which correctly cleans memory occupied by the object. tnt::scripts_sys::reload
.to_json
method to Data Oriented ECS systems.- A window icon for the TnTEditor.
- New overload of
tnt::Window::setIcon
, which loads an icon for the window from a given path. - Support for loading only desired libraries of TnT for each object part of
tnt::doo::scripts_sys
. - Support for logical operators for
tnt::lua::lib
. - More specific flags to
tnt::lua::lib
.
- Minor things on the TnT install system from
CMakeLists.txt
. - Rewrote a part of
README.md
to be more informative. - Error with auto-generated
tnt::operator |=
,tnt::operator &=
andtnt::operator ^=
for bitmask types. tnt::has_flag
fromutils/BitFlags.hpp
now supportsconst
flags.
tnt::Snipper::onModify
now returnsvoid
.- The TnT editor will now be installed too when the
install
CMake target is selected. - Data Oriented Systems now have no constructor/destructor.
tnt::lua::loadSparseSet
will now loadtnt::sparse_set<tnt::doo::camera>
along withtnt::sparse_set<tnt::doo::object>
.- The json structure of the scripting component is now:
{
"script": {
"file": "script.lua",
// optional, core by default.
"libs": ["core", "math"]
}
}
- Type of second argument of
tnt::lua::load
fromstd::span<const tnt::lua::lib>
totnt::lua::lib
.
CONTRIBUTING.md
. Everybody is now free to ask for support whereever it seems reasonable.core/Context.hpp
.
input:mouse_pos
to the Lua API.- Small improvements to the editor UI.
tnt::doo::null_v
, which is generic version oftnt::doo::null
. NOTE: It only works with types that satisfyconcept std::unsigned_integral
.- Example project showing how to use skeletal animation with TnT.
remove
method fromtnt::asset_cache
.async/Generator.hpp
andasync/Task.hpp
.core/Graphics
which provides some helper functions related to drawing lines. More functions to come.tnt::Window::setWidth
,tnt::Window::setHeight
andtnt::Window::setSize
, to manipulate the size of the window.- New example named
project
, showing a simple project that can be loaded on the editor. remove
member function for the systems of the Data Oriented ECS that lets you remove entities from the given system andclear
which removes all the entities from the given system.utils/PolyResource.hpp
, which contains a helper to handle data that usesstd::pmr::polymorphic_allocator
.tnt::template_traits
, which give you the tools to play around with templates.
- Some "incomplete" things in
utils/Sort.hpp
. - Lua functions of Data Oriented ECS systems failing unexpectedly.
tnt::vfs::absolute
now uses<filesystem>
instead of<SDL2/SDL_filesystem.h>
.tnt::doo::camera
is nowstd::uint32_t
. This is done to save space.- Moved
utils/CoUtils.hpp
to folderasync
. - Added some small features to the editor.
- TnT now builds with fast floating point model.
- The systems of the Data Oriented ECS will now check for inexistent objects on
add_object
. - Rewrote
utils/TypeLists.hpp
to use lowercase for the name of thestruct
s and support for more than 2 types stored on atype_list
.
tnt::sparse_set<T>::edit
.
- Support for steering behaviours on Lua.
- Deduction guides for
tnt::sparse_iterator<T>
. utils/LuaUtils.hpp
, which will contain functions that export some stuff from folderutils
to lua. For now, onlytnt::sparse_set<T>
is supported.- Some
noexcept
ontnt::sparse_set<T>
. - You can now assign a
tnt::sparse_sentinel
to atnt::sparse_iterator
. tnt::doo::sprites_sys::target_cam
, to set a camera as a target for the renderer.- Some small missing parts of the documentations.
- Section on how to build the engine as a DLL on
INSTALL.md
. tnt::sparse_set<T>::edit
,tnt::sparse_set<T>::index
,tnt::sparse_set<T>::insert
,tnt::sparse_set<U>::operator==
.
- A small bug with comparing
tnt::sparse_iterator<T>
andtnt::sparse_sentinel
. - Exported
tnt::lua::load
. exe
linked withTnT.dll
crash randomly. NOTE that if you need to use the Data Oriented ECS (you normally need) and the Lua bindings for the Data Oriented ECS (src/tolua/LuaDooEcs.cpp
), you have to build the source files on thesrc/doo_ecs
folder together with your executable.
tnt::lua::load
now needsstd::span<const tnt::lua::lib>
as an argument.tnt::sparse_iterator
'sexplicit
ctor now accepts atnt::sparse_set<T> const&
instead oftnt::sparse_set<T> const*
.tnt::sparse_set<T>
is now copy-constructible.- Renamed all the member of the systems of the Data Oriented ECS that holded the id-s of the objects to
active
. Also changed their data type fromstd::vector<object>
totnt::sparse_set<object>
.
tnt::lua::lib::doo_ecs
. Load the Data Oriented ECS by hand (just calltnt::lua::loadDooEcs
).tnt::doo::has_object
andtnt::doo::json_has
. Usetnt::contains()
fromutils/Containers.hpp
instead.
include/TnT.hpp
, which#include
s all the current headers of the TnT Engine SDK.utils/SparseSet.hpp
, which contains an implementation of a sparse set.- Support for building the engine as a dynamic library.
tnt::doo::scripts_sys::Init()
andtnt::doo::scripts_sys::call()
.- More
static
on some global variables on.cpp
files. utils/Benchmark.cpp
.
- Lua bindings are working!!
tnt::Timer
now usesstd::chrono::high_resolution_clock
.- Rewrote
utils/Benchmark.hpp
.
utils/SDL_Utils.hpp
.fileIO/AssetManager
.cmake/Setup.cmake
.include/tiled
folder.
static
on some global variables on.cpp
files.tnt::doo::cameras_sys::zoom_to_fit
.tnt::halton1
andtnt::halton2
onpcg/Random.hpp
, which generate a random number base on Halton sequences.tnt::doo::scripts_sys::call
, which calls a function from the lua script.- Support for
fileIO/VirtualFS
' alias paths for the built-inasset_cache
s.
- Renamed
concept tnt::doo::basic_system
toconcept tnt::doo::system
and removed some unnecessary requirements. tnt::doo::animation_comp
's andtnt::doo::object_data
's ctor is now moved to the respective header file.- Data Oriented Systems now don't need to be non-copyable.
tnt::lua::load
now accepts asol::state_view
as the first argument.add_object
andfrom_json
methods on each Data Oriented System (exceptobjects_sys
) now takeobject const&
as the first parameter.tnt::doo::objects_sys::from_json
now returnstnt::doo::object
.- Data Oriented Systems now don't need to implement
add_invalid
. tnt::asset_cache
now needs anunsigned int
as a template parameter, rather than just anint
. Also the built-inasset_cache
s will now usestd::pmr::unordered_map
instead ofstd::pmr::map
.- Rewrote
fileIO/VirtualFS
.
concept tnt::doo::system
.game.lua
.tnt::lua_ctx
fromutils/LuaLoader.hpp
.add_invalid
from all built-in Data Oriented System.core/Camera
,core/Space
,core/Scene
,ecs
andecs2
folders.
tnt::randomUnitVector
onpcg/Random.hpp
.tnt::doo::null
ondoo_ecs/Base
, which serves as an id for non-existent entities on a system.tnt::doo::physics_sys::resolveVel
andtnt::doo::physics_sys::resolveInterpenetration
, which are called bytnt::doo::physics_sys::resolve
.tnt::has_flag
,tnt::set_flag
,tnt::unset_flag
onutils/BitFlags.hpp
.tnt::Rectangle::TopLeft
,tnt::Rectangle::TopRight
,tnt::Rectangle::BottomLeft
andtnt::Rectangle::BottomRight
, which return the corresponding corner of the rectangle.concept basic_system
on doo_ecs/Base.hpp, which contains all the members that a system must have.- Support for drawing objects on a camera/multiple cameras for the Data Oriented ECS. See doo_ecs/Cameras.hpp.
- Optimized
tnt::RotateVector
for cases when the angle is 0. - The following files are deprecated, and will be removed on the next version update:
core/Camera
,core/Space
,core/Scene
, all the files onecs
,ecs2
andtiled
. Use files ondoo_ecs
as a replacement instead. tnt::doo::physics_sys::resolve
now resolves both the velocity and the interpenetration of the colliding objects.- Updated
examples/doo_ecs_ex.cpp
to include the new cameras system. tnt::doo::sprites_sys::Draw
, now needs the id of a camera as the last argument, set it to-1
(the default) to switch to old-style drawing.- Moved
object_data
,concept system
andobjects_sys
to doo_ecs/Objects.hpp.
utils/LuaManager
. Use files on thetolua
folder instead.tnt::Window::Draw
. Usetnt::doo::sprites_sys::Draw
instead.
struct
s for checking supported SIMD instructions by the machine onutils/Traits.hpp
.vcpkg.json
, which will automatically install the dependencies of the engine using vcpkg.- Support for more steering behaviours.
concept tnt::doo::system
, which contains the basic requirements that a data type should have to be called a system of the Data Oriented ECS.concept tnt::logger::printable
, which checks if a type can be used as a parameter to the engine's logger.tnt::doo::sprites_sys::draw_area
, which returns the area where the object passed as a parameter will be drawed.
- An issue with
fileIO/TextureAtlas
. - Some issues related to non-correct calculations with global data on the Data Oriented ECS.
- Updated Github Actions, Microsoft Azure Pipelines and AppVeyor build due to changes to
CMakeLists.txt
. - Updated
INSTALL.md
to explain how the build steps change using vcpkg manifests. - CMake will now automatically find vcpkg, but you have to define the
VCPKG_ROOT
environment variable. - All the functions of
tnt::logger
now require that their parameters satisfytnt::logger::printable
. - All the Data Oriented ECS systems will now check if an object is part of the system when calling
Update
.tnt::doo::sprites_sys
will do the same thing on theDraw
function. - Rewrote
tnt::Rectangle::Outside
usingtnt::Rectangle::Contains
. - Rewrote
utils/Logger.hpp
to have no overload (one function for each logging level). - Some style-related stuff on
Doxyfile.in
. - Modified the example program to show how to use the global coordinates with the Data Oriented ECS.
- Folder
ai
, which containedai/steer/Steering
files. tnt_imgui_close
. ImGui-related resources will be freed automatically on exit.
doo_ecs/Steering
, which adds support for steering behaviours to the objects that are part of the physics system.tnt::AngleOfR
, which is just the same astnt::AngleOf
, but the result is in radians.- Overload of
tnt::AngleOf
, which returns the rotation of atnt::Vector
. - Support for giving physics objects a maximum velocity and acceleration. If one of these properties is specified when loading from a json chunk, the other is mandatory to be specified.
tnt::doo::has_object
ondoo_ecs/Base
, to check whenever a certain DOO ECS system have a member with the given id.- An experimental work-in-progress implementation for handling skeletal animations (
doo_ecs/Bones
). CODESTYLE.md
, which contains a guide to the coding style used on the engine's source code.- A partial experimental implementation of actions and action lists, which supports coroutine functions.
- Support for logging with colored output.
tnt::doo::object_data::parent
andtnt::doo::objects_sys::parent
, which keep track of the parent of the object. That means the Data Oriented ECS objects now support global/local coordinates. Use-1
to show that the object has no parent. The membersangle
,scale
andpos
now store the local coordinates. The same applies to physics'vel
,maxVel
,accel
andmaxAccel
properties. NOTE: when constructing a new object forobjects_sys
orphysics_sys
, the upmentioned parameter members are treated like using the global context.gAngle
,gScale
, andgPos
ontnt::doo::objects_sys
, which get the required data related to the global context.tnt::doo::objects_sys::set_parent
, which changes the parent of the given object.
- The Data Oriented ECS now updates and draws objects using global coordinates.
tnt::bubble_sort_fn
is nowfinal
.tnt::doo::object_data
is nowfinal
.- Rewrote some of the implementation of
utils/TypeLists.hpp
.
Contributors
section onREADME.md
.add_invalid
on each system of the Data Oriented ECS exceptobjects_sys
.- Partial support for Joysticks on
core/Input
. Joysticks are automatically detected when connected/removed from the device. utils/CoUtils.hpp
, which contains some coroutine-related utilities.cmake/Setup.cmake
, which contains some functions that wrap a part of the code onCMakeLists.txt
.
- Incorrect behaviour of
tnt::Dot
onmath/Vector.hpp
. (thx cgyurgyik).
tnt::logger::error
is now marked as[[noreturn]]
.
- Redundant
inline
onconstexpr
functions. (thx again cgyurgyik).
tnt::doo::scripts_sys
, which connects.lua
scripts to objects of the Data Oriented ECS.tnt::bubble_sort_view
,tnt::bubble_sort_fn
andtnt::views::bubble_sort
onutils/Sort.hpp
which wrap the bubble sort algorithm.
- Marked some stuff as deprecated. A warning will be emited when you use them. The affected files/classes are:
tnt::AssetManager
,tnt::VirtualFS
andLuaManager.hpp
/LuaManager.cpp
. - Trailing
0
after comma won't show on ImGui'ssilder_*
andhslider_*
functtions. - Rewrote a part of
exp/Runtimer
. tnt::doo:sprites_sys::add_object
now acceptstnt::doo::sprite_comp const&
.tnt::doo::objects_sys::get_data
is now[[nodiscard]]
.- Systems from the Data Oriented ECS now are non-copyable and accept
tnt::doo::object const&
instead of justtnt::doo::object
as function parameters. - The implementation of the functions of the Data Oriented ECS is now located on
.cpp
files.
- An overload of
tnt::doo::sprites_sys::add_object
.
tolua
folder, which contains separated files for Lua bindings. The filesutils/LuaManager.hpp
/utils/LuaManager.cpp
are now deprecated, and you are encouraged to use the headers located ontolua
folder.- Support for non-movable bodies on
physics_sys
. - Support for detecting and resolving collisions between
physics_sys
objects. Seetnt::doo::physics_sys::colliding
andtnt::doo::physics_sys::resolve
. - Support for adding/removing global forces applied to the objects of
tnt::doo::physics_sys
. inline namespace phys
, which provides some physics-related constants, ex. forces that can be applied to objects (like gravity).- More
constexpr
fortnt::Vector
. - Use three way comparison for
tnt::Vector
if supported by the compiler. utils/BitFlags.hpp
, which helps on generating bit manipulating operators for the enums the user selects.utils/Traits.hpp
which provides some type traits utilities.
- Moved
tnt::is_detected
/tnt::is_detected_v
toutils/Traits.hpp
. tnt::doo::physics_sys::add_object
now accepts aphysics_comp const&
as an argument.- The Data Oriented ECS systems now reserve memory for 10 objects instead of 5 when needed.
- The Data Oriented ECS systems now check if objects have a specific component when loaded from a .json file.
utils/LuaManager.hpp
/utils/LuaManager.cpp
. Use files located on thetolua
folder instead.utils/LifetimeManager.hpp
.utils/Observer.hpp
.tnt::doo::phys_comp
.tnt::scoped_thread
.
tnt::input::Update
, which callstnt::input::updatePrevious
andtnt::input::updateCurrent
.tnt::render_lock
, a RAII class which clears the given window on its ctor, and callsRender
on its destructor.constexpr
on some members oftnt::Vector
,tnt::Rectangle
, and some other math functions.
- Implementation of easings to use lambdas and
constexpr
. - All
tnt::default_*_cache
(except oftnt::default_texture_cache
) now return asmall_cache
(initial size of 10) instead of amedium_cache
(initial size of 50). - Made some performance improvements for
tnt::AudioPlayer
. - Rewrote a part of ImGui's backend to reduce dynamic memory allocations.
- Implementation of
tnt::ensure
,tnt::safe_ensure
andtnt::check
. No behaviour change involved.
json/JsonDooObject.hpp
.tnt::run_after
onutils/TypeUtils.hpp
.tnt::ImGui::destroy_context
. Context resources are now freed automatically.tnt::ImGui::update_context
becausetnt::ImGui::End
now calls it for the user.tnt::doo::objects_sys::Update
andtnt::doo::objects_sys::Draw
. Usetnt::doo::physics_sys::Update
andtnt::doo::sprites_sys::Draw
instead.concept tnt::doo::system
.
- Missing documentation over some places.
tnt::if_then
andtnt::if_else
onTypeUtils.hpp
to avoid conditional branching.tnt::TextureAtlas
asset type and specializations fortnt::asset_cache
to support it. Use a texture atlas when you have all your textures arranged on a single image file to gain performance.tnt::Timer::deltaCount
, which is a shorthand totnt::Timer::deltaTime::count()
.- Animations support for the new data oriented ecs.
tnt::Timer::deltaTime
now callsreset
. Also it returns the duration withfloat
base. That means theUpdate
functions now needfloat
instead oflong long
.- tnt::Timer is now header only.
tnt::overload
is nowfinal
.tnt::asset_cache<T, I>::load
is nowpublic
.tnt::Rectangle
conversion operators now are notexplicit
.- Rewrote a part of the backend of
core/Input
. The user no longer needs to calltnt::input::close
. It is now removed.
- Visitor-related stuff and
tnt::is_convertible
onutils/TypeUtils.hpp
.
- An experimental reflection system. See
utils/Mirror.hpp
. - Header
utils/Assert.hpp
. tnt::overload
onutils/TypeUtils.hpp
.- A new Data Oriented Entity Component System.
tnt::asset_cache
to replacetnt::AssetManager
. Note thattnt::AssetManager
will be deprecated and then removed on a future release.- Load a game script from cmd.
- Hot code reloading for
.lua
files. - Folder
format
andjson
, which contain code for serializing the engine types to{fmt}
andnlohmann::json
.
tnt::Rectangle
is now DefaultConstructible`.- Moved
STATIC_CHECK
fromUtils.hpp
toutils/Assert.hpp
. Moved container-related stuff fromUtils.hpp
toutils/Containers.hpp
andutils/Convert.hpp
. tnt::AssetManager
is nowdeprecated
.
tnt::Synchronized
fromutils/TypeUtils.hpp
.Utils.hpp
,FormatedTypes.hpp
andJsonTypes.hpp
.
- Link to Gitter room on
CONTRIBUTING.md
. assets/particle.png
.
- Most of the content of
ecs/Particle
.
- Link to the official subreddit on
CONTRIBUTING.md
.
- Lua functions on
main.cpp
should be now on tabletnt
. ex.function tnt.draw
. tnt.do_imgui
is now optional.
fileIO/File.hpp
/fileIO/File.cpp
.
tnt::file::Snipper
is nowtnt::Snipper
, and is afinal
class.tnt::Snipper::isModified
is nowpublic
.
- Some unnecessary lines on
.gitignore
.
tnt::Window
s created with the second constructor now haveSDL_WINDOW_SHOWN
flag by default.
tnt::lua::loadSpriteComp
/tnt::lua::loadPhysComp`.
tnt::lua::loadSpace
/tnt::lua::loadScene
.
tnt::Space::addObject
now doesn't use concepts, but needs antnt::Object const*
as a second argument. This decision is made for performance reasons.
assets/TnT.png
andassets/TnT.ico
.- Some stuff on
CMakeLists.txt
to build an installer for the engine. tnt::lua::load
to load all needed packages. It works similar tosol::state_view::open_libraries
.tnt::lua::lib
to be used as argument oftnt::lua::load
.
- Some stuff on
README.md
.
Player::to_lua
onmain.cpp
is nowstatic
.tnt::lua::*
functions now returnsol::table
.
math/GenericMath.hpp
, but its contents are available onmath/MathUtils.hpp
.include/version.h.in
.
ai/steer/Steering.hpp
/ai/steer/Steering.cpp
. It contains some basic steering behaviours that can be applied totnt::Object
s that have atnt::PhysicsComponent
.
- Steering functions not producing desired behaviour.
tnt::Vector::operator *=
/tnt::Vector::operator /=
overload that accepts afloat
as right-hand-side.struct tnt::is_detected
onTypeUtils.hpp
.tnt::PhysicsComponent::getMaxVelocity
andtnt::PhysicsComponent::getMaxAcceleration
.tnt::PhysicsComponent::getDirection
which returnsvelocity.Normalized()
.tnt::PhysicsComponent::getSpeed
which returnsvelocity.Magnitude()
andtnt::PhysicsComponent::getMaxSpeed
which returnsmaxVelocity.Magnitude()
.tnt::AngleOf
which returns the angle formed bytnt::Vector
s passed as a parameter.
tnt::Dot
now returnslhs.x*rhs.x+lhs.y+rhs.y
. Usetnt::AngleOf
to get the angle formed by the parametertnt::Vector
s.
fileIO/Reader.hpp
andfileIO/Write.hpp
.
- Some utility math functions on
math/GenericMath.hpp
.
- header
math/GenericMath.hpp
. There you will findPI
(to be removed when C++20 adds support for some 'special' numbers like pi and e) and templated math-related lambdas like lerp, blerp and beziercurve. tnt::pcg::randomVector
.- Library's ImGui bindings for Lua.
concept tnt::object
. Please use it as a function argument to reduce the number ofnew
/delete
calls.
tnt::Space::addObject
now accepts aconst
reference of a class derived fromtnt::Object
instead of atnt::Object*
.
- The overload of
tnt::Space::addObject
which took astd::pair
as an argument.
- Support for minimalistic physics with
tnt::PhysicsComponent
. Nowtnt::Space
-s will update an object's physics if ithas<PhysicsComponent>()
.
FormatedTypes.hpp
that contains specializations offmt::formatter
for engine types.
- Updated
CONTRIBUTING.md
.
- Worked on the new ECS implementation. You can find it on the
ecs2
folder, but it is not guaranteed to replace the current stable ECS.
tnt::ImGui::BeginSection()
andtnt::ImGui::EndSection()
.
- Some small "problems" with the look of some ImGui widgets.
- Updated the documentation for bulding the engine.
tnt::ImGui::Begin()
to use the passedtnt::WindowFlags
parameter for window customization. Note that only some of the flags are available for the moment.
- Restructured ImGui's backend with reduced
new
/delete
calls to gain some performance.
ecs/Component
.tnt::PhysicsComponent
is now located onecs/RigidBody
.physics/Box
andphysics/Quadtree
.- Most of the functions of
imgui/gui_config.hpp
.
- The window size of the example in
main.cpp
is now1280x720
.
tnt::Scene
's constructor now needs astd::string_view
which contains the path of the background. If it is equal to "", no background is drawed.tnt::Space::isActive
.tnt::Space
s are not active if none of theirtnt::Object
is active. If atnt::Space
is not active, it is not updated nor rendered.
tnt::Window::getWidth
andtnt::Window::getHeight
are now marked asconst
.
-tnt::ImGui::hslider_int2
and tnt::ImGui::hslider_float2
.
- ID-related macros for ImGui.
core/Graphics.hpp
/.cpp
.
tnt::AssetManager
now automatically converts relative path to absolute. That includes eventnt::SpriteComponent
.tnt::Camera
constructor that acceptstnt::Rectangle
.tnt::Sprite::Draw
which needs only atnt::Window const*
.- An experimental implementation of
tnt::Object
. - A partial implementation of animations for
drawable
tnt::Object
s. Not fully finished/tested yet. - Check for window resizing on
tnt::Window::handleEvents
.
tnt::Object
rotating incorrectly.tnt::drawable
not showing when usingtnt::Space
.tnt::ImGui::hslider_*
not drawing correctly and/or out of bounds.
- Some functions on the implementation of
tnt::Scene
. main.cpp
is now a basic work in progress editor for the engine.tnt::ImGui::hslider_*
now draw their value's text on top of the thumb, for a cleaner look.- Tried to optimize
tnt::Space::Draw
. - Most
tnt::Object
members are initialized by using default member initalizers. tnt::logger::*
functions that accept a formatting string and one argument, now acceptT&&
instead ofT
.
tnt::Script
, atnt::Component
which can be used with Lua scripts.- Attributes
[[likely]]
and[[unlikely]]
on tnt::Object
'stemplate
functions. - Utility function
tnt::Object::has<T>
to check if the object has the specifiedtnt::Component
without errors.
- Some stuff on the implementation of
tnt::Space
. - Header
Component.hpp
is deprecated and will be removed on another commit.class tnt::Component
andconcept tnt::component
are now defined onObject.hpp
.tnt::Script
andtnt::SpriteComponent
are now defined toScriptable.hpp/.cpp
andSprite.hpp/.cpp
. tnt::file::Snipper::onModify
now usesconcept
s.utilities
folder is now renamed toextra
.
math/Matrix.hpp
andmath/Matrix.cpp
.
LuaManager
functions now takesol::state_view
as an argument rather than asol::state&
. Also a default parameter is passed to them.
LuaSandbox.hpp/.cpp
because it was unused andLuaManager
is a better alternative to it.
tnt::input::lastKeyPressed
.- More Lua bindings. Now
tnt::Window
can be used with Lua. However, a small number of it's member functions is available.
LuaManager.hpp
is now on folderutils
. Please use it instead ofLuaSandbox.hpp
.lua
andsol2
are now required to build the project.- Tried to optimize
tnt::input::mouse...
functions. concept tnt::drawable
now correctly detects drawable objects.tnt::Window::Draw
is now redesigned. Also removed the overload which drawed atnt::SpriteComponent
.
- Lua bindings for some engine types.
tnt::AssetManager
functions now useconst_iterator
s.- ImGui functions now don't copy window instances passed to them.
tnt::window_ref
andtnt::window_ptr
on core/Window.hpp.- Unnecessary checks on
tnt::AssetManager
destructor.
- TnT is now live on Discord. Come visit, ask questions and suggest anything anytime.
operator const SDL_Rect() const
andoperator const SDL_FRect() const
fortnt::Rectangle
.
- Made some optimizations on
tnt::SpriteComponent::Draw
by minimizing copies.
- Redundant line on
CMakeLists.txt
.
- Modularized version of
utils
headers on foldermodules
. - Some documentation on some header files.
concept drawable
at the end ofObject.hpp
.
- Moved
concept component
toComponent.hpp
. - Renamed
tnt::SizeOfArray
lambda totnt::array_size
and used a customconcept
to make it work only with arrays.
- File
Concepts.hpp
.
- Updated
concept camera
to detect camera types correctly. Moved it toCamera.hpp
.
- New
tnt::Window
constructor, which omits position and flags for a simpler construction. tnt::Window::isOpened
andtnt::Window::handleEvents
. Note that these functions should be used together, because usingtnt::Window::isOpened
as a condition for the game loop without callingtnt::Window::handleEvents
after polling events may cause an infinite loop.- New ImGui widget
colored_text
which draws a text with a specified color. const
on some ImGui widget members.explicit
specifier ontnt::Action
andtnt::BlockingAction
tnt::stack_allocator
constructors.
tnt::Object
methods now handle data related to global and local coordinates.
- Widget
menu
on ImGui. Please usetnt::ImGui::BeginMenuBar
,tnt::ImGui::EndMenuBar
,tnt::ImGui::menu_button
andtnt::ImGui::menu_item
instead. tnt::RotateComponent
andtnt::ScaleComponent
to be part oftnt::Object
.
- Horizontal ImGui sliders now will display the current value on their center.
- All ImGui slider widgets (vertical and horizontal) don't require an ID, x or y position, instead they require just a text to display on them.
hslider_int
andhslider_float
now require an extratext
as the second parameter.
- New implementation of
Action
s, together with the documentation. Also a test on foldertest/actions
is included, showing the basic usage ofAction
s. - Section
Documentation
onREADME.md
. FindSphinx.cmake
oncmake
folder in case of starting to useSphinx
for documentation.
- Experimental implementations of
Action
s. Please use the new implementation instead. Easingsv2.hpp
from experimental folder. Use the original implementation on foldermath
instead.
- New CMake
option
TNT_BUILD_DOCS
to build the documentation using Doxygen. Note that the switch isON
by default.
docs
folder. The website is now hosted on thegh-pages
branch of the repository.
tnt::Window::operator SDL_Window*
is nowexplicit
.
Debug
build for AppVeyor.
- Documentation for some header files.
- New overload for
tnt::SpriteComponent::setTexture
which should be used for clipped textures. - Check on
tnt::Snipper::onModify
fortypename Func
. - Function
tnt::Snipper::unwatchFile()
.
tnt::SpriteComponent::getWidth()
/tnt::SpriteComponent::getHeight()
now returns the correct width if the texture is clipped.tnt::SpriteComponent
's destructor is no longervirtual
.
- Build status for Azure Pipelines builds.
INSTALL.md
to learn how to obtain the binaries of the engine.
- Renamed
InputManager.hpp
andInputManager.cpp
toInput.hpp
andInput.cpp
. - Moved
Random.hpp
to the correct folder. - CMake's minimum version now is
3.12.4
because C++20 support is required to build the project.
inline
on somestruct Vector
functions.AppVeyor
build and it's status badge onREADME.md
.stack_allocator<T>
can now be used in production code.- Prefix
TNT_
onAllocator.hpp
's include guard. - Example/test showing the usage of
stack_allocator<T>
withstruct tnt::Vector
.
tnt::Vector& operator=(tnt::Vector&&)
.
- Some project-related stuff on CMakeLists.txt. The project should compile as always because the build process isn't affected by these changes.
inline
,const
andnoexcept
on someclass Expected<T>
functions.- Better check on
tnt::ImGui::button()
/tnt::ImGui::text()
/tnt::ImGui::list_item()
to not draw if outside window. - Template functions for
class Object
to attach or removeComponent
s. - New test
dynamic_ecs
forclass Object
's new functions. TNT_
prefix forLogger.hpp
include guard.- Stuff to turn
Logger.hpp
into a C++20 module partition. TnT.ixx
, which will be used as the main file of the module TnT.
- A typo related to
SDL2_DIR
onazure-pipelines.yml
.
- Every
class
derived fromclass Component
is (and should be)final
, derived ONLY fromclas Component
and NOTvirtual
-ly inherited. - Moved the
class Timer
test to foldertest/timer/
.
#include <SDL2/SDL.h>
on Component.hpp.
- Conditional check before
delete
-ing anObject
'sparent
. - Ability to move and resize ImGui windows. Widgets won't be drawn if they won't fit on the window.
- Missing
#include
onAudioPlayer.cpp
.
- Renamed
concept camera_type
toconcept camera
. - Renamed
StackAllocator
tostack_allocator
. It is still not functional.
- Code Inspector badge on README.md.
class Rectangle
,class AssetManager
loader functions on LuaManager.hpp.final
keyword forclass AssetManager
.noexcept
on somestruct Vector
functions.
- Method of comparing
struct Vector
-s. That shouldn't affect your code, though.
noexcept
on somestruct Camera
functions.- Widget
text
andnewline
for ImGui.
- A bug with
tnt::ImGui::button()
showing the wrong color.
tnt::ImGui::menu()
now needs astd::string_view*
rather thanstd::string*
to conserve space.- Now ImGui widgets require
std::size_t
for their id rather thanlong long
, so that the id is not negative and it is compatible withstd::hash
. - The title on ImGui's windows is now more centered.
tnt::ImGui::checkbox()
now doesn't need to have anid
,x
andy
, because it is drawn on the window. Just awindow
where to draw it, thetext
to draw to it and abool *value
. The same withtnt::ImGui::button()
andtnt::ImGui::menu()
.tnt::ImGui::progress_bar()
now has an offset between it's body and it's filled part and doesn't needx
andy
as parameter, but needs atext
to draw on its side.tnt::ImGui::button()
's width is now dependent on the size of the text you want to display on it.- Made the text size of
tnt::ImGui::button()
to be equal to the global font size. - The font ImGui used from
zeldadx
toInconsolata
. - The slider color of
hslider
andslider
ImGui widgets.
- Functions
tnt::ImGui::BeginList()/EndList()
andtnt::ImGui::list_item()
for indexed and unindexed lists. - Some spacing before the first item of
tnt::ImGui::menu()
. - Check on
tnt::ImGui::menu()
so that you don't add two menu widgets on the same window.
long long id
from widgettnt::ImGui::progress_bar
.
- Started working on lists and indexed lists for ImGui.
- Check on
CMakeLists.txt
to deleteassets
directory on thebuild/type
folder if already exists. - New assets tick.png to be used on
checkbox
widget for ImGui.
- The way
tnt::ImGui::menu
worked to get equal spacing between different options. - ImGui's
menu
widget spacing from 50 to 20.
- Some files to be compiled on
CMakeLists.txt
. bool active
+ getter/setter onclass tnt::Object
.- Some utiltity functions on Space.hpp.
randomFloat()
on pcg/Random.hpp.- Implementation of
Camera::Shake()
.
- Updated .gitignore.
- Moved Camera.hpp/cpp to folder
core
. - Moved AudioPlayer.hpp/cpp to folder
fileIO
. Camera::Bounds()
to return atnt::Rectangle
.- Renamed
Camera::Screenshake()
to justCamera::Shake()
.
Camera::FBounds()
.
- Widget
checkbox
for ImGui.
- The way
Runtimer.hpp
works.
- Animation-related stuff on
class Sprite
.
concept component
.- assets\ prefix for places where assets are required.
- Linking with SDL2_ttf on
CMakeLists.txt
. - Check on
CMakeLists.txt
for linking SDL2 on the correct way on different platforms.
- Moved
.clang-format
and.editorconfig
to new folderutilities
. ret
on Timer.hpp fromauto
tostatic auto
to display correct fps.
- Animation related functions on
class Sprite
. Objectv2.hpp
, because the problem it was trying to solve could be solved without templates.
- Some functions on Objectv2.hpp/.cpp.
- Command
CMakeLists.txt
to copy all assets to the binary directory.
vcpkg.exe
to just vcpkg onCMakeLists.txt
for cross-platform building.
assets/zeldadxt.png
because it is unnecessary.
- CONTRIBUTING.md.
- Some logging messages on
tnt::ImGui::Begin()
andtnt::ImGui::End()
. - A call to
tnt::input::updatePrevious()
andtnt::input::updateCurrent()
ontnt::ImGui::update_context()
.
- Contributing section of README.md to point to CONTRIBUTING.md.
- Some lines on CMakeLists.txt which don't affect building.
- Some redundant lines on
tnt::ImGui::End()
. - scipts/format-proj.ps1 and scripts/ttf2png.py.
- azure-pipelines.yml.
- Added option on ImGui to load colored text.
- tnt_imgui_init() and tnt_imgui_close(). Now you just need to call them instead of make_context/destroy_context.
- .ttf files support for ImGui.
- Some stuff related to windows.
- macro TNT_IMGUI_RUNTIME_CONFIG to enable contents of gui_config.h.
- ImGui text color to white by default.
- tnt_imgui_begin() and tnt_imgui_finish() to tnt::ImGui::Begin() and tnt::ImGui::End().
- return type of ImGui widgets from int to bool for using less memory.
- some stuff on gui_config.h.
- The way ImGui handles text.
- slider_byte and hslider_byte on ImGui.
- CMakeLists.txt on folder src.
assets
folder containing all engine assets used in main.cpp.- .clang-format.
- format-proj.ps1 to format all .cpp files of the project.
- The Building the engine from source section on README.md.
- Added progress_bar widget with it's getters/setters on the ImGui library.
- TNT_ prefix on the include guard of some files that didn't already have it.
- Started turning main.cpp into an animation editor.
- Some stuff related to Animations on
class Sprite
. - The path of the default font on ImGui.cpp.
- The indentation of data inside namespaces.
- id data on every ImGui widget from int to long long.
- Coveralls stuff on build.yml.
- Temporarily removed Tiled-related stuff on AssetManager.
#include "tiled/TileMap.hpp
to maketmx::TileMap
a complete type.- Full project support for CMake.
- Some stuff on CMakeLists.txt.
- AddText on class AssetManager is temporary unavailable.
- class RuntimeManager now uses SDL2, even thought it is not completely ready for "release" yet.
- Some float comparisons on Easings.hpp, Rectangle.hpp and Vector.hpp.
operator delete
tooperator delete[]
for pixels at Noise.cpp
- Added folder rpp on tests.
- Some data and functions on AnimationComponent.
- Minimum value support for slider and hslider widgets.
- Moved the Github Actions status icon on to of the README.md file.
- ImGui widgets that modify values now take a pointer to the value rather than a reference.
- min and max at slider and hslider widgets to min_ and max_ so that the names don't collide with any stl algorithms.
- The build status header on README.md
void Timer::start()
andvoid Timer::stop()
implementation.Timer::deltaTime()
now callsTimer::start()
if the Timer instance is stopped.- build.yml.
- Fixed a problem on ttf2png.py.
- Fixed CodeFactor review badge on README.md.
- Marked
class
File's,class
Expected andclass
actions::Delay constructors asexplicit
. - Added
return
statement onstruct
Rectangle. - Assigned a value to
location
variable at Matrix.cpp.
- include/YamlTypes.hpp
- test.json
safe_enum
andcuriously_recurring_template
from include/utils/TypeUtils.hpp.- redundant
virtual
on functions that are marked asoverride
.
- .editorconfig.
- README.md.
- CHANGELOG.md (this file).
- New macro IMGUI_ID on ImGui.hpp.
- ImGui fonts support, but by using a tool called ttf2png.py, which I wrote for this purpose.
- Some new utilities for TypeLists.
SDL_Color Window::getClearColor()
- class InputManager to
namespace tnt::input
on InputManager.hpp. - The example provided on main.cpp.