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

Integrate flow field pathfinder into game simulation #1656

Merged
merged 68 commits into from
Oct 31, 2024

Conversation

heinezen
Copy link
Member

@heinezen heinezen commented Jun 2, 2024

Makes the pathfinder usable from the game simulation.

Depends on #1648, #1647

Introduces several additions and optimizations to the work started in #1620 :

  • Flow field documentation
  • Gamestate
    • Map object for accessing pathfinder
    • use pathfinder in move system
    • new nyan API bindings for Terrain objects
  • Pathfinder
    • Massive performance increase for flow field calculation
    • LOS propagation across sectors
    • Flow field caching
    • Fixed several bugs

@heinezen heinezen force-pushed the feature/gamestate-pathing branch from 4e4536b to 7fcfdf9 Compare June 2, 2024 03:18
@heinezen heinezen added improvement Enhancement of an existing component lang: c++ Done in C++ code area: simulation Involved in the game mechanics and simulation big stuff High-impact changes, mainly foundation work labels Jun 2, 2024
@heinezen heinezen changed the title Feature/gamestate pathing Integrate flow field pathfinder into game simulation Jun 2, 2024
@heinezen heinezen force-pushed the feature/gamestate-pathing branch from 9ac1a73 to e410c95 Compare July 10, 2024 23:51
TheJJ

This comment was marked as duplicate.

@heinezen heinezen mentioned this pull request Jul 12, 2024
13 tasks
@heinezen heinezen force-pushed the feature/gamestate-pathing branch from 759396c to c3f49b6 Compare July 19, 2024 12:13
libopenage/gamestate/map.cpp Outdated Show resolved Hide resolved
@heinezen heinezen force-pushed the feature/gamestate-pathing branch 2 times, most recently from 7809d09 to 1487ef3 Compare July 28, 2024 01:38
@heinezen heinezen marked this pull request as ready for review July 28, 2024 01:38
@heinezen heinezen added this to the 0.6.0 milestone Jul 28, 2024
@heinezen heinezen force-pushed the feature/gamestate-pathing branch 2 times, most recently from c0bfe1f to da96a11 Compare July 28, 2024 11:21
@heinezen heinezen added the kevin-rebuild-pl0x instruct kevin to rebuild this pull request label Jul 28, 2024
@SFTbot SFTbot removed the kevin-rebuild-pl0x instruct kevin to rebuild this pull request label Jul 28, 2024
@heinezen heinezen force-pushed the feature/gamestate-pathing branch from 8d4c2cb to 6c9ded3 Compare July 29, 2024 02:04
@TheJJ TheJJ added the kevin-rebuild-pl0x instruct kevin to rebuild this pull request label Jul 30, 2024
@SFTbot SFTbot removed the kevin-rebuild-pl0x instruct kevin to rebuild this pull request label Jul 30, 2024
@heinezen heinezen force-pushed the feature/gamestate-pathing branch 2 times, most recently from abce704 to 13ce00c Compare August 2, 2024 14:31
Copy link
Member

@TheJJ TheJJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this is good for now, and an incremental improvement to the already well designed previous code. we surely can improve further and fix bugs that show up in practice :)

const std::unordered_map<nyan::fqon_t, int> APITerrain::get_path_costs(const nyan::Object &terrain) {
std::unordered_map<nyan::fqon_t, int> result;

nyan::dict_t path_costs = terrain.get_dict("Terrain.path_costs");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be awesome if nyan could return the casted std unordered/map directly...

@TheJJ TheJJ merged commit 00b7f4c into SFTtech:master Oct 31, 2024
13 checks passed
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 big stuff High-impact changes, mainly foundation work improvement Enhancement of an existing component lang: c++ Done in C++ code
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants