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

Spawn clients on different tiles #1435

Open
stilnat opened this issue Mar 10, 2024 · 3 comments
Open

Spawn clients on different tiles #1435

stilnat opened this issue Mar 10, 2024 · 3 comments
Assignees
Labels
Content Tasks that add new content. Difficulty: Good first issue 🍰 Easy tasks Feature A new system or other feature.

Comments

@stilnat
Copy link
Contributor

stilnat commented Mar 10, 2024

Summary

Currently, clients are spawning at the exact same location, resulting in clipping. Before spawning a player, server should choose a free tile, without tile objects or players and spawn the new player there.

One simple solution would be to predefine a list of tile location spawn and spawn the player on any of those, if it's free.
If no free location, spawn at (0,0) with an error message for now.
We'll improve the algorithm later.

@stilnat stilnat added Difficulty: Good first issue 🍰 Easy tasks Feature A new system or other feature. Content Tasks that add new content. labels Mar 10, 2024
@cosmiccoincidence
Copy link
Member

I would actually make this map-based, not code-based. The way I would like to see it done is by creating spawnpoint objects. These objects can be placed in the map editor. They will not be visible or interactive with the players in the round. They would only be visible to admins who have the map editor active.

@stilnat
Copy link
Contributor Author

stilnat commented Mar 10, 2024

okay so small correction, create a prefab called SpawnPoint that acts as a tile object, with a script so they register to a spawn system (maybe use one of the systems we already have if it makes sense), and use the tile coordinates from those spawn point to define where to spawn.

Same as above, If no free location, spawn at (0,0) with an error message for now.

@CREATURACHRISTO
Copy link

Assign me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content Tasks that add new content. Difficulty: Good first issue 🍰 Easy tasks Feature A new system or other feature.
Projects
None yet
Development

No branches or pull requests

3 participants