Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record history of cost changes in pathfinder #1680

Open
2 tasks
heinezen opened this issue Aug 25, 2024 · 2 comments
Open
2 tasks

Record history of cost changes in pathfinder #1680

heinezen opened this issue Aug 25, 2024 · 2 comments
Labels
area: simulation Involved in the game mechanics and simulation good first issue Suitable for newcomers hacktoberfest For newcomers from Hacktoberfest event lang: c++ Done in C++ code nice new thing ☺ A new feature that was not there before

Comments

@heinezen
Copy link
Member

heinezen commented Aug 25, 2024

Required Skills: C++

Difficulty: Hard

At the moment, changes to the movement cost of cells in the openage pathfinder always overwrite the old values. The old values are not saved anywhere, so going back to a previous state of the grid is currently not possible. Ideally, the grid should support going back in time, so we can roll back changes e.g. for multiplayer matches.

openage already provides the curve data types for storing values over time, so changes could be recorded using the same methods. An array curve (see #1678) would probably be the best option for storing values for a grid.

To try out the current pathfinder, check out pathfinding demo 1 by running the following command:

./run test -d pathfinding.tests.path_demo 1

Tasks:

  • Add a cost record storage for cells to the CostField implementation. The cost record should use curve. For performance reasons, the recorded values should be stored separately from the current cost values (so not in the cells vector).
  • Record the changed cost whenever a modifying operation occurs for CostField, e.g. setting a cell value.

Further Reading

@heinezen heinezen added nice new thing ☺ A new feature that was not there before lang: c++ Done in C++ code area: simulation Involved in the game mechanics and simulation good first issue Suitable for newcomers labels Aug 25, 2024
@heinezen heinezen added the hacktoberfest For newcomers from Hacktoberfest event label Sep 20, 2024
@HmbleCreator
Copy link

I would love to work on this issue, can you assign it to me?

@heinezen
Copy link
Member Author

@HmbleCreator Sure. go ahead :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: simulation Involved in the game mechanics and simulation good first issue Suitable for newcomers hacktoberfest For newcomers from Hacktoberfest event lang: c++ Done in C++ code nice new thing ☺ A new feature that was not there before
Projects
Status: pathfinder
Status: 📋 Backlog
Development

No branches or pull requests

2 participants