It’s time to display those results to the players. I will want to do the following: 1.) Determine how many, if any units will be destroyed in the battle, 2.) Display the battle results to the players, and 3.) When the “Battle Results” turn ends, discard player cards and destroy units that were lost
In this rousing round of CardConquest game development, I want to allow players to select what card they will player for a battle. The card the player chooses will affect their army’s “power” number, and the player with the most power will win the battle! This will be a fairly important component of the game!
Currently in CardConquest, players can move their units a distance of 1 land tile and then advance to the next turn. If players put their units on the same land tile and the turn advances, things get a little…strange visually but not really happens. What I want to have happen, though, is that two players move units onto the same land tile, the game will detect that and declare a “Battle” that will need to be fought.
The next step in making the Unit Movement phase work in multiplayer is to allow players to view the cards of their opponents. That means new UI! New code! New scripts! Yay!
In my previous two posts I worked on making the “Unit Placement” phase work in multiplayer. Now, it’s time to do the same for Unit Movement!
In this post, I hope to get the following done: 1.) Update the PutUnitsInUnitBox function in GameplayManager 2.) Update unit placement/movement so it is verified by the server 3.) Create a “Ready Up” system that will have the server advance the phase after all players are ready
Now that CardConquest allows players to join a lobby and then a game, it is time to start making some of the actual gameplay (or what I have so far that can be called gameplay) multiplayer as well.
After searching around for how to add multiplayer to Unity games, I decided to use Mirror. I decided to create a rudimentary “Lobby” system that would allow players to create and host a game, and then for another player to join that lobby based on IP. I wanted to make it so that the player hosts/joins a lobby all through my game’s UI.
Lucky number 13! I will finally be creating some cards for a game I have called “CardConquest.” The cards won’t do anything, but they will be there and you will be able look at them. Oh, and guess what? There will be a bunch of UI and buttons to add for this too! I’m getting all bothered and hot just thinking about it.
As the game stands now, the player can move units one tile away from the unit’s starting location in any given “turn.” Within the same turn, the player can keep moving units so long as they don’t stray more than one tile from that starting tile. This allows the player to manually “undo” and moves they make with their units. However, after a bunch of units have been moved, it can get confusing on which of the units was moved from where. So, to allow the player to easily and quickly “undo” unit movements they’ve had second thoughts on, I want to make a button that will reset all the movement for them.