So my dates were wrong for when the break was, but that is OK there was plenty of work to be done. This week I focused on the creation of a management interface so that a player can begin to customize their decks if they wish to. This added another scene to the list bringing the project up to 3: The main menu/Login screen (as seen from week 5), the play screen, and now a management screen.
Day 1: The majority of the time spent at the beginning was creating the GUI objects that would separate everything into a, hopefully, easy to understand layout.
After a couple iterations this is the current build version of the Management screen. The left collection field will display the player’s cards based on a filter, the buttons at the bottom of the field, which will allow the player to view only the class of cards they wish to. The right most field is where the player will be able to view their currently selected deck.
The major issues encountered during this process were substantial. The image above was taken on a 16:9 aspect ratio, and is close to 1920 x 1080. The image below is the same, can you tell the difference?
The 2 images above are game views, what the actual game would render if run when built. Below is the scene view for both of the above images.
What took a couple hours to find out was something that apparently plagues people with Unity. What these two views see is based on different cameras, and the game view camera is easily fooled. The card objects are being instantiated on a 3-D grid. The x and the y coordinates are spot-on as we can see. It was the z-coordinate that was being set to some ridiculous negative number, meaning that the cards were actually far behind the board. So they were there, but we couldn’t see them.
Day 2: The second day of work, after much banging of my head, was writing the scripts to handle the behaviors of all the GUI pieces. During this session I had to determine how to transfer the account information from the login screen to this one. How I implemented this was by having a static variable within a script, which defined account behavior, that referenced the first instance of an account object and marked the object so Unity would not destroy it between scenes. If an account object instantiated where the static variable not being null, then the instance would destroy itself. By having an account object be in each scene the first instance which would contain the player information would replace the objects that were destroyed.
Next week: I plan to finish the helper scripts for the statistics fields, located between the collection and deck fields, and the scripts to move a card from the collection to the deck field. On top of this I will do some finishing touches for the next showcase demo.