SFTtech / SFTtech/openage

Headless mode

Open
#652 5 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

just do it lang: c++ nice new thing ☺
Dominant language
Python
Stars
14.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

I would love to be able to develop and run tests of the engine without spinning up the whole asset loading & graphics pipeline. Combining a simple test framework with the history / log discussed in Chipmunk's pull request this could enable powerful regression testing as well in the future.

For example, in some silly pseudocode, maybe testing wood gathering could look like this:

# test_wood_gatherer_log.txt:
- tick 0: load TestArabia.map
- tick 0: spawn villager at (1,1) with id 0
- tick 1: task unit with id 0 to chop wood at (1,2)
- tick 1000: end

# test.py
import headless_engine
headless_engine.run(open('test_wood_gatherer_log.txt'))
assert headless_engine.get(unit=0)['carrying']['wood'] == 10

Perhaps this is already possible. If so, can someone point me in the right direction for doing so?

(This is a bit of a stupid reason / test compared to the architectural advantages of a headless mode, but I only develop on Linux over SSH (my local machine cannot effectively run it) and I'd love to be able to contribute without having access to Linux with a graphical environment. Except for the rendering pipeline, everything should be workable like that it seems.)

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

Review Chipmunk's pull request #642 and the test.py and test_wood_gatherer_log.txt example first. Done means the engine can run the proposed history-based tests without starting the asset-loading and graphics pipeline, while supporting the regression-testing workflow described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
game-dev, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.