SFTtech / SFTtech/openage

Standardize control flow between engine subsystems

Open
#1,500 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

code quality improvement lang: c++
Dominant language
Python
Stars
14.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

We could improve the way individual subsystems in the engine (presenter, renderer, gamestate, networking, ...) talk to each other by using a standardized method for all communications. For this to work, we would need to define how data should be sent, fetched or manipulated during transfer and find a flexible solution that is reusable for all subsystems.

The main benefit of this would be less maintanance (since we don't need to figure out a new solution for every subsystems) and better code readability. It should also improve thread safety as the subsystems usually run in their own threads and communication between them form a critical path. We also want to minimize interdependencies between subsystems as much as possible.

https://github.com/SFTtech/openage/pull/1492 and https://github.com/SFTtech/openage/pull/1497 already address parts of this issue by handling communication in dedicated objects and using a one-way control flow.

We can use other implementations as a reference, e.g. https://developer.android.com/kotlin/flow

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing pull requests 1492 and 1497, then trace how the presenter, renderer, gamestate, and networking subsystems currently communicate. Define a reusable communication approach covering sending, fetching, manipulation, thread safety, and reduced interdependencies; done means the approach is agreed and applied consistently across the relevant subsystems.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.