Unit Selection Working Improved Version on Sprint 3 - UQdeco2800/2022-studio-3 GitHub Wiki

Overview

In Sprint 3, an important link is to refine the details and adaptability of previous features. Due to some differences in development time and code logic, not all units support the use of the unit selection function. We will fix it in this link to ensure the player's gaming experience.

Also, we will refine the content in the infobox. This includes pictures for each friendly unit, names of friendly units and their attributes, etc. Correspondingly, we will also help to refine some external elements such as buttons embedded in the infobox.

The following is the content that needs to be completed for this part:

  • Replace the selection method of Friendly Units with our selection logic
  • Resize Infobox and support some extra widgets (like buttons)
  • Add pictures, unit names, attributes and other elements into the infobox

For our Sprint 3's user testing, click here.

Unified Selection Method

In this game, there are three selectable units: buildings, workers and soliders. As we all know, they are developed by different teams and use different underlying logic.

Repeat our unit selection logic here: In the game, players can select a single unit with the left click, or hold down the mouse and drag out a rectangular area to complete the multiple selection of all units within the rectangular range. The selection function ends when user click on empty plots and other units(if user did this, new selection will replace the old one).

When the mouse hovers over the unit but not clicked (that is, the target has not yet been selected), the target will have a white out-glowing effect to remind the user that it has been semi-selected.

Once the target is selected:

  • If it is a movable unit, it can move according to the mode of operation it was set to.
  • If it's an immovable unit (like a building), some buttons for building actions will pop up for their unique interactions.

And here's all the units with selection method:

Building: Can't move, doesn't use altas files.

Implementing building selection is the easiest, and we have done this in sprint 2. In sprint 3, we will optimize the UI part to improve the mission of this unit.

Friendly Units-Worker: Use the right mouse button to click the specified location to move, use the altas file.

The Worker unit has developed a set of selection logic, which leads to some confusion in the operation mode inside the game. After cross-team collaboration, they agreed that we use the unit selection logic to iterate and preserve the mode of operation they move.

We did these to let worker can be selected in our logic:


Code: how we did on worker's selection

Friendly Units-Solider: Expected to move with the right mouse button, use altas files.

Solider units are still in an immobile state at the time of writing (29/9) on this page, maybe they haven't implemented functionality yet. Also as friendly units, they will be expected to use the same mobile mode of operation as workers. A modular development environment may make their implementation easier and faster.

Infobox Display Optimization

We try to design an avatar for each friendly unit so that it can be displayed in the infobox.

  • Worker Units: Forager

image

  • Worker Units: Miner

image

  • Solider Units: Archer*

image

  • Solider Units: Swordsman*

image

  • Solider Units: Hoplite*

image

  • Solider Units: Spearman*

image

*: As of Oct 01, Solider units are still unable to complete the movement and selection effects (in the case that we have actively communicated continuously), resulting in their avatars may not be successfully displayed in the game.

Design Iteration

Infobox

We have tried to adjust the white space of the infobox so that it can be packed with more resources and information. The adjusted dimensions are as follows:

Information_Box_Deepsea_resized

And each blank will display like this example:

Infobox-example

But this is, after all, behind closed doors. Designs made without knowing the development of other groups are ultimately incompatible with other content. Other groups have independently supported the display of data in the currently existing infobox (such as the new buildings that team 4 is responsible for), and our adjustment will no longer be necessary.

Although it won't be part of a new development, it's worth documenting as an experience.

Picture(Avatar)

We did an earlier round of avatar designs earlier in this phase, and the finished product looked something like:

archer-pixilart

Yes and that's right, this was the archer. Its performance is unsatisfactory when drawing experience, equipment conditions, and reference items (in-game models) are all insufficient. Fortunately, we work as a team and have more opportunities to try.

We changed the theme and style and had ongoing online and offline communication with the designers of Friendly Unit to ensure our designs were in line with their inner expectations. After getting the approval of most people and meeting the expectations of the original designer, a batch of iterative avatar images became the final result.

image

Consistency in UI

Added CogWheel(Settings) Button/ ESC Menu UI

**Removing older/base game elements and designing new UI based on colorscheme and theme. ** image Above is the old UI as shown. This is displayed when the user presses the ESC key or the pause button on the top right hand side. It is still using the janky ui of the old box-boy game which does not suite the theme or matches the games color shceme.

CogWheel Menu This is the new menu screen which will be replacing the old black box which can be seen before. This follows the atlantis theme by having a background of underwater ocean and the borders and buttons representing every other box and color style in the game. As you can see the border is the same as any pop-up boxes currently implemented in the game and the buttons follow the same color theme, with a wooden like pirate/ocean theme texture.

SettingsCogWheel This is a new settings cogwheel. Rather than having an old janky 2 buttons for exiting and pausing the game which used to display the menu. keep in mind those 2 buttons are also not the same size for some reason. That whole thing will be being replaced by this cogwheel which will display the above cogwheel menu shown with the following options. This makes it much more neater and consistent to the game by having everything looking similar and with less stuff on the screen.

SettingsCogWheel-highlighted This is a highlighted version which is done when a user hovers or the settings icon or clicks/selects it.

exittodesktop Exit to Desktop Button is shown with its selected/highlighted form underneath aswell. This will do what the old exit button used to do, AKA making you exit out the game completely to your desktop. exittodesktophighlighted resumebutton Resume Button is shown with its selected/highlighted form underneath aswell. This will let you back into the game which has been paused when u enter this menu/ if you pressed esc key. Resumebuttonhighlighted returnmmbutton Return to main menu Button is shown with its selected/highlighted form underneath aswell. This will exit you out the current game to the home/main menu screen which is displayed before starting the game. returnmmbuttonhighlighted settingsbutton Settings Button is shown with its selected/highlighted form underneath aswell. This will take you to various settings like video and audio to adjust according to your preferences. Settingsbuttonhighlighted