Player Stats and Visualization
I’ve gotten a point in Project Universe where I need to break from my self-imposed moratorium on working on visual design, because otherwise I’m going to find myself in a whole heap of trouble later on.
The player currently has three parts that are being considered (and several more I haven’t yet gotten to). I’ve already talked about movement, and that component lives on the actual player prefab. The player’s cargo inventory is basically a bucket for info on what and how many items the player is carrying, but isn’t yet being actively worked on. Before I get there, I need to make the player work, and by work, I mean statistically.
The sum of the player is made up of stats from the individual objects that the player equips on his or her ship. Since the player is “the Captain”, there’s no character sheet per se: everything is driven based on the configuration of the hardware. The first step is choosing a hull, and the hull dictates the levels of hardware that can be equipped. Some examples of hardware are cannons and missiles, shields, engines, and scanners. In addition, the player can hire crew to run stations, and crew members add their expertise to the stats generated by the specific items they chose (and could afford) to equip on their ship.
There’s two forces at work here: usability, and visual representation. Usability would be simple if that’s all I had to concern myself with. I could pull stats from the items and crew, and use them where needed. But I also need to be able to display values to the player in…some fashion…such that they mean something to the player, and so the player can make decisions on options by using these stats to compare. In order to figure out what values I need, I have to have some idea of the design of the UI I want to have display these values.
Here’s an example. A player fits some cannons onto her ship. They’re pretty decent: have a moderate range, OK to-hit values, and do acceptable damage. For a UI element, I could pull the stats from the item (defined in the Master Database) as numbers or as a bar chart or something. But I also need to factor in how the hired crew member will affect the values of the cannon. I could do that by adding another number in parenthesis next to the cannon’s individual values, or I could extend the bar chart along the relevant axes, but in a different color. Under the hood, however, I really only care about the sum of the stats of the cannon plus the stats of the crew member, giving me a final number I can use. In one case, I need to “explode” the constituent values so I can work with the cannon stats and the crew stats as individual values. But I only need their combined value to determine if the attack round hit anything or not.
My current task is to figure out a way to get these values out and where they need to be as efficiently as possible and with the bare minimum of redundancy in code. First, though, I need to know what values I want to have displayed, and how I want to display them will factor into that to a great deal. Being nowhere ready for prime time, though, any visual design I come up with will most certainly change, altering the requirements for what stats I need, and when I need them.