Hello! I’m a university software engineering student who was introduced to Unity through an elective game development class. I’m currently a senior, and for whatever reason, the university decided to assign us our capstone projects. I was fortunate enough to be assigned to work on a VR project using Unity, but this thread is going to devoted to something else.
A mutual friend of my older brother and I introduced us to a friend of his who has recently left his IT job because he was spending all his time working on a competitive card game instead of asking people if they had tried turning it on and off again. He had already created a few proto-type decks, so we spent some hours hanging out and playing cards. The game is insanely fun. It’s akin to games like MTG, but with a unique twist that holds a lot of depth while being very easy to pick up and play.
Our mutual friend and this new acquaintance had decided that they were going to start a company with this card game as their flagship product. They already had a few artists on board, but what they really needed were software developers. My brother majored in organic chemistry, but after working for about a year, he realized that he hated his job and started looking for a way out. He signed up for one of those web-development boot camps that pay you to train in software development for 9 months with the caveat that you are then contractually obligated to work at a fixed salary for a couple years. He did his time, and then got hired as a back-end developer. We talked it over, and we agreed to join this start-up venture. Since I’m currently obligated to work on a Unity project for the university, we decided that our minimum viable product (MVP) would include a client application built with the Unity game engine (my responsibility) and a server-side web application built with spring boot (my brother’s responsibility).
For my part, I need to create a menu system that supports multiple pages. The Start page will allow players to login and/or create an account. Once they’ve successfully logged in, they will be transported to a Multiplayer page that allows them to create a new game lobby or select and join an existing game lobby from a list of created game lobbies. Once a player has created a new game or selected an existing game, the Multiplayer page will begin displaying a new menu with the name of the game lobby and the names of the players who are currently in the lobby. When two players are in the same game lobby, they will be able to press the start game button, at which point they will be transported to the Game page.
The current plan is to keep things simple with a 2D game, so I intend to build it into the menu system like any other page. To ensure that players can read the card text and appreciate the kick-ass artwork, hovering your mouse over a card on the game board will result in a magnified copy of the card appearing on screen, and the magnified card needs to appear in different positions relative to the smaller card depending on which zone the card belongs to. One of our goals for the minimum viable product is to simulate the feeling of playing a card game in real life. To that end, every card will be created when the game starts, and the Unity application will maintain some sort of game state context that is continually updated as cards are moved from zone to zone. Players will be able to move cards by clicking, dragging, and dropping them. If they were dropped within the boundaries of a valid zone, the card should automatically snap into position with the other cards in that zone. The game-state context will also need to be updated to reflect those changes.
When the game client makes a get game-state request to the server, it will receive a json string that represents a game-state object with data such as gameId, playerOne, playerTwo, and a list of “card-states”. Each card state will include the cardId, cardName, the zone that the card is in, the position that the card occupies in that zone, and the player who is currently in control of the card. When the unity application receives that string from the server, it needs to automatically rearrange the game board to accurately reflect the new gamestate and simultaneously update the context. When a player moves a card from one zone to another, the Unity application needs to construct and post its own game state json string to the server, but it should only include the card that moved and any cards that changed positions due to the move. The Game page will also need to include separate menus for cards that are in zones which are not visible on the game board. For example, cards in the deck need to exist in a separate deck menu that players can access by pressing a button.
I will do my best to continually update this thread throughout development of the project. I mostly intend to use this as a development journal of sorts, so UML diagrams, source code, and discussion of problems encountered and how they were (hopefully) solved are likely inclusions.