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

WIP Placement handler #144

Merged
merged 37 commits into from
May 22, 2018
Merged

WIP Placement handler #144

merged 37 commits into from
May 22, 2018

Conversation

tomjn
Copy link
Owner

@tomjn tomjn commented Jan 8, 2018

Implements a building placement algorithm:

  • optimised for spreading cpu load across multiple frames
  • pluggable placement test functions
  • configurable search increment and radius
  • runs in a square spiral pattern moving outwards
  • operates on a job system with async requests, give it a job and it'll call a function you pass on completion/failure so that you can do something with the result

Some features still need fully testing, some are partially implemented at the time of writing

@tomjn
Copy link
Owner Author

tomjn commented Jan 8, 2018

Current testing showed that units tend to stop doing things, though no debugging has been done to determine why just yet. Probably because not enough positions are being checked per game frame. Until the timing code is finished it's doing a set number of iterations rather than using time budgets as intended, so I was conservative, maybe too conservative about it

@pandaro
Copy link
Contributor

pandaro commented Jan 8, 2018

interesting

@tomjn
Copy link
Owner Author

tomjn commented May 20, 2018

Recent tests and modifications added basic spacing support, the algorithm is now competent enough to be used as a replacement

Additionally, changes were made to allow this widget to be used to debug it:

https://gist.github.com/tomjn/01ada053704d523502729ebdc23299a1

@tomjn
Copy link
Owner Author

tomjn commented May 20, 2018

I would also note that the latest commits made changes that aren't compatible with native Shard. I'm fine with this

@tomjn tomjn merged commit 154970c into master May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants