Races
A5H73Y opened this issue ยท 2 comments
Add the ability to race other players. There are lots of things to consider:
- can each track have a different number of maximum racers, and a different number of required racers
- how do the racers join a track? Do they spawn in set locations in immovable cars, then wait for X amount of players to join to start, or do they get spawned to the track when the minimum number players have been filled.
- Checkpoints need to be considered. My best thought so far is to do it based on Material, so you would do "/carz checkpoint" and it would create an incremented Checkpoint which is achieved when they drive over the same Material. There will be validation to ensure the Material isn't the same as the last checkpoint.
- Their location will be saved when the cross a checkpoint.
- Death Materials, or falling off a track etc. Take them back to last saved checkpoint (with speed reset).
- Launch Blocks, Slow Blocks, Speed blocks, look at driving on ice etc.
- BountifulAPI integration to nicely display countdowns etc.
- "/carz setstart (maximum)" could do some clever calculations to set the positions of each driver based on the direction they are facing.
- Configurable amount of laps per course.
- Do players join an empty track to create a new session that can be joinable by other players?
- how to make things configurable? How to set the number of laps?
- Look into achieving checkpoints using WorldGuard regions
i'd prefer to have a kind of lobby for the players waiting to join , like that i could build a room somewhere over the track to have a great view on it , then when it's time to start the race they spawn in immovable cars for a few seconds (countdown).
I wonder if that would be possible to make quite small tracks and be able to race for X laps ?Idon't know if checkpoints would have to be set for 1 lap or for the whole race (not sure if it's clear what i say there :D )
I'm maintaining a racing plugin in Bukkit so you can take inspiration from there: https://www.spigotmc.org/resources/racing.69086/