Skip to content

Conversation

@Hishamk2
Copy link
Contributor

@Hishamk2 Hishamk2 commented Jun 3, 2025

This PR makes the generation of obstacles' and buildings' positions and orientation the same given the same seed. This should be helpful for debugging and adding new features.

To change the seed, go to server/src/map.ts and change this line of code to whatever you want the seed to be.

this.seed = packet.seed = random(0, 2 ** 31);

To spawn in the same place, go to server/src/config.ts and change

spawn: { mode: SpawnMode.Default }

to

spawn: { mode: SpawnMode.Fixed, position: [x, y] }

where x is your x coordinate and y is your y coordinate

Hishamk2 added 3 commits June 3, 2025 16:55
All of them have a corresponding non seed-dependent random function.
To hardcode the seed for testing, modify line 115, this.seed = packet.seed =
All buildings' and obstacles' positions, orientations are the same given the same seed.
Bouy's positions is not the same though.
@Hishamk2 Hishamk2 requested a review from hsanger as a code owner June 3, 2025 22:07
kidwaih2

This comment was marked as off-topic.

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

Successfully merging this pull request may close these issues.

2 participants