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

  • Teams.
  • Team chats.
  • Player name and colour customisation.

Minor changes

  • Increased player texture size from 128x128 to 256x256 pixels.
  • Breaking changes to server config schema.
  • Changed score font from Public Pixel Font to Press Start 2P.
  • Now saving GUI options for spectator mode and “Enter Address” state fields.
  • Removed comment from command-line argument processing (to support hex colours).
  • Changed empty.ron to be infinite on both dimensions (forgot to change this while testing).
  • Now having the followed player be rendered on top of all other players.
  • Occupation zones are configured in terms of team ids, and can be configured to be occupied by any team.
  • Addition of teams.ron and team_survival.ron configs, and making occupation.ron have teams enabled.
  • Added team-only portal server config to be used in occupation.ron.

Bug fixes

  • Disabling stars with the checkbox in the settings now actually works.
  • Fixed bug with DPI scaling and health bars of other players being positioned incorrectly.
  • Fixed bug with visual jitter of chat messages in some cases.
  • Now Ctrl+C works to exit a GUI state that has been unfocused for at least a second.
  • Preventing timer panel from cutting off score panel.
  • Fixed small bug with subconditions of an And or Or condition previously not resetting.
  • Fixed bug where if you’re spectating and follow another player, then immediately play the game, the camera now instantaneously moves instead of a wrongly placed smooth transition.