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

Determining player starting map position #17

Closed
jblanchette opened this issue Dec 17, 2018 · 3 comments
Closed

Determining player starting map position #17

jblanchette opened this issue Dec 17, 2018 · 3 comments

Comments

@jblanchette
Copy link

Per request a new issue.

Wondering if it's possible to determine player starting position from the replay for a given map?

I haven't found any related documentation on the topic from other replay format docs. My current guess would be that the information is potentially in the given 'random seed' for the map?

@JFGHT
Copy link
Contributor

JFGHT commented Dec 18, 2018

I don't think we could get the spawn position from the random seed, but let's not keep that door closed.

What we could actually do, as a temporary solution, is detect the coordinates of the first actions from actions block. What do you think?

@PBug90
Copy link
Owner

PBug90 commented Dec 18, 2018

The random seed is used to initialize the random number generator across all clients so that everyone can run the same deterministic simulation (if you want more information look up deterministic lockstep in rts games).

As a consequence, the random number generator also determines the player starting positions. What you can do is infer the starting position from the first N actions of a player. Another possible scenario is generating a heatmap that shows game activity over time on the map.

@jblanchette
Copy link
Author

Ah darn, it seemed very likely it would come from the seed :)

I'll continue onward using estimation / prediction like suggested - closing this off, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants