flingengine / flingengine/FlingEngine

Need a better definition of Systems and components

Open
#145 0 comments 0 reactions 0 assignees View on GitHub
enhancement PRI 2 triage
Dominant language
C++
Stars
415
Forks
16
Avg merge
18h 53m
Merged PRs (30d)
7

Description

Right now the engine component model is somewhat monolithic and does not provide a clear path for users to go about making a new system.

I think the best way to go about solving this problem is to actually introduce the concept of `System`'s into our data model. The engine will manage the lifetime of these systems for you, giving you a couple options to choose from when creating one.

# Definitions
1. A `WorldSystem` - A world system will share the lifetime of it's owning world, being started and destroyed when the world does. By sharing the lifetime of a world this makes it easy to write gameplay systems, silar to Unreal's `UWorldSubsystem` and Unity's "Press Play" ideology.
2. A `PersistentSystem` - A system that will share the lifetime of the engine as a whole. It will be started when the engine is launched, and shutdown when the application closes. This is what the engine itself can use to do things like rendering, input, and other systems that need to be about during the entire lifetime.
3. `EditorSystem` - A system that shares the lifetime of the editor, which will make it simple to have some debug systems that you can create tools in and exclude from development builds.

## Code Structure
```
class System
|
|-- World System
|-- -- Any user defined gameplay subsystems
|-- -- Lua Scripting system
|-- -- Game type Definitions
|-- PersistentSystem
|-- -- Rendering systems
|-- -- Input systems
|-- -- File IO systems
|-- EditorSystem
|-- -- Editor systems like ImGUI options or other tools
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.