Teams and player customisation: Release of Spaceships version 1.3.0

Date:
Category: Development

Initially posted to the now-defunct Lemmy instance.

New version

In this version I have added support for teams to the game and the ability for players to change their name and colour.

This version is incompatible with previous versions of Spaceships due to the many protocol changes made.

Teams

Now servers can be configured to specify a fixed list of teams that players can join. If this list is empty (the default case), teams are disabled.

When teams are enabled, players within the same team cannot hurt and kill each other (unless friendly fire is enabled) and forcefields don't deflect these bullets fired from the team.

I have also made changes to the scoring system to work with teams, so that the winner can be an entire team (or teams) rather than just players.

New and changed configs

I have added two new configs to show teams in action: configs/teams.ron and configs/team_survival.ron. The first config has the winning team be the first to 20 kills, and the second config is the last team remaining where each player has a fixed number of lives.

I have also changed configs/occupation.ron to be team-based, so it is no longer limited to just two players. I have also added team-only portals at each player's base to allow teleportation from the opponent team's base back to yours. This is designed to make 1v1 more fun by allowing players to quickly stop occupation by the other player.

Team chat

When teams are enabled, by default pressing 'T' opens team chat which allows messaging only the players on the same team. This can be used in a teamed game to discuss strategy with privacy from opposing teams. A chat message is indicated as team-only if it says "(Team)" right before the name of the player who sent the message.

If you want to send a message to all players, press 'G' instead to open the global chat.

If teams are disabled, team chat and global chat are the same.

Player customisation

Previously there were a fixed number of hard-coded colours in the game that players could take depending on their internal id. Now players can set their colour to any arbitrary 24-bit RGB value. This is done by going to the settings screen.

Screenshot showing the user interface for changing your colour.

I have also given players the ability to set their name, which is now displayed in chat messages, the scores and above each player. This is a significant improvement to the previous "Player N" names for the chat.

Screenshot showing two players from the perspective of a spectator.

Major config schema change

I have made many breaking changes to the config schema in the scoring part to get it working with teams, as well as the world size. This means that all previous configs will not work in this new version.

To fix this, one thing you definitely will need to do is replace world_size: ... with world: World( size: ... ) (as this world struct contains the friendly_fire field as well).

If scoring is enabled, you will also need to change fields in that struct as well. I can't be bothered to list exactly everything that needs to be changed, so if you have any questions, feel free to add a comment or post somewhere on Lemmy or ask a question on Matrix.

Changelog

Here is an incomplete list of everything that has changed since version 1.2.1.

Major changes

Minor changes

Bug fixes