A classic video game is developing for training in creating and maintaining large codebase
- Used SFML, RapidJSON, GTest, better-enums.
- Cross-compilation on CMake 3.27: MSVS2019/MinGW-w64.
- Controller, Core
ListenersEmitters
- observer pattern interpretation in Qt/UE manner.LowLevelApplication
- it handles I/O from windows level, organizes a game loop.Application
- it a singleton contains all globally needed semi-related to ECS resources (configs, textures, etc).
- Model, Simulation, ECS
- Each of
Component
holds a map of <EntityPtr
,UserComponent
>. - Each of
Entity
can claim/reject aComponent
and get the value of it. - Each of
System
contained in and updated by aLevel
class.- Each of
UserLevel
provided by aLevelProvider
that delegates level creating to aLevelCreatorsStorage
. LevelCreatorsStorage
holds unique lazy creator-function taken from static-initialization stage for eachUserLevel
.
- Each of
- Each of
- View, Menus and Layers
- Still as a stub.
- Structure-intrusive automatic serialization solution like a code generation in UE.
- Used a lot of C++20 concepts for replacing SFINAE.
- Main classes:
SerializableBase
- is common staff for serialization via RapidJSON.SerializableStruct
- is container and base class for user structure contains severalSerializableVariable
and/orSerializableStructs
. It iterates recursively on self members.SerializableVariable
- it contains an object of RapidJson-supported literal type or third-party type which defined fromJson/toJson inGameJsonConversions
/StdJsonConversions
structures.
- For user-usage defined several macro e.g.
SERI_V(...)
,SERI_S(...)
&SERI_C(...)
, etc. - TODO: Implement a serializable representation of std::vector, std::array/c-array.
FrameByFrame
- is an encapsulation of a sprite-sheet png-file- For each png-file exists a
ConfigTexture
object describes name, frame rate, frame size, origin, orientation, etc. TextureProvider
- it used for createFrameByFrame
object. When application starts, it loads all textures that enumerated in aConfigTextures
object via visitor pattern implemented in aSerializableStruct
class via iterating on internal structure-members array.
- For each png-file exists a
PVS-Studio - static analyzer for C, C++, C#, and Java code.