Adding Multiplayer to SwapPics Knights vs Demons


I will be adding local and remote 2 player modes to my game over the next month or so.  This and the following posts will outline my design plan, how changes, and what finally got built.

First some background. The game was conceived when I saw the deadline to register for Steam's next fest was less than 2 weeks away. So I made a very basic version of the map with just buildings and a write-up. Now the game is almost finished and I have about 7 weeks till NextFest and then another couple of weeks later before release. I added controller support using Rewired for Unity so that the game would run on SteamDeack and I saw that local multiplier support was easy with Rewired. So now I am going to try and add local multiplayer and remote multiplayer. I have done a multiplier demo for a client with Mirror previously so I think with Unity's new multiplayer support it should be possible. SwapPics is not lag-sensitive. Since all player actions take seconds to affect the opponent it is easy to hide any lag from the players.

My upgrade play is 

1) Add an option for the player to play Demons instead of Knights,

2) Add mapping from controllers to either Knights or Demons

3) Modify the game UI to handle 2 players playing on the same board.

4) Make a local lobby for players to set up who plays which side and any handicapping between players.

5+) Remote multiplayer game. I will research and plan this well coding the local multiplayer mode.

My estimates for local multiplayer are 12~18 calendar days and 16~24 calendars for remote multiplayer. 

Step 1) is broken down into two parts.

a) Generating a map with Demons on the right and Knights on the left.

b) Modifying game code to allow the player to solve Demon puzzles and give orders to Demons.

I have already reread the code for generating maps and found 15~20 methods that need to be modified with 2 or 3 variables changed in each. The gameplay code is simpler and if I make changes to generation right the gameplay changes should be minimal. 

I will start this tomorrow (2023/12/16).  I expect step one to be completed by the 19th~21st. I may be a bit optimistic in my estimates. Today I need to add user-settable sensitivity controls for the joysticks on controllers. The game was designed for a mouse and I find it hard to play with joysticks.

P.S.  Having just finished writing this post I realize that step a) may be much easier than I realized. If scale the whole map by (--1,1,1) it will mirror the map on the X–axis and I just need to go in and fix all the colliders because Unity does not like colliders with negative scales. 

Files

SwapPicsUI2.zip Play in browser
Dec 13, 2023

Leave a comment

Log in with itch.io to leave a comment.