Skip to content

Conversation

@BenjaminAmos
Copy link
Contributor

Description

This pull request converts all of remaining the visual functionality of MainGameScreen to use NUI instead. This does not cover auxiliary classes, such as BorderDrawer and ZoneNameAnnouncer but does include WarnDrawer. Most of the not covered classes render rotated images, which is not supported under NUI (and so use UiDrawer directly instead).

The original MainGameScreen class remains for now, due to other dependencies in the code that rely on it, such as input handling.

This pull request also includes a bug-fix for retrieving item examples in ItemManager.

Testing

Warnings

  • Start a new game or continue and existing one (Imperial Small is recommended for this)
Armour
  • Open your inventory and un-equip your armour.
  • A "No Armor" warning should be displayed in orange.
Shield
  • Open your inventory again and un-equip your shield this time.
  • A "No Shield" warning should be displayed in orange.
Health
  • Reduce your health to below 5 or lower (the exact value depends on the ship chosen).
  • A "Heavily Damaged" warning should be displayed in red.
  • Increase your health back to 5 or above (again, exact value depends on the ship chosen).
  • The "Heavily Damaged" warning should fade away.
Enemies
  • Shoot at your starting station until it becomes hostile
  • A "Dangerous Enemy" warning should appear in orange.

Stats Bars

  • Start a new game with the "Loaded Imperial Large" ship
Health Bar
  • Ram your ship into the starting station.
  • You should see the value in your health bar go down.
Shield Bar
  • Fire on the starting station until it becomes hostile.
  • When the starting station shoots your ship, the value in your shield bar should go down.
Ammunition Bar
  • The icons on the ammunition bars should correspond to the weapons you have equipped.
  • Fire your left gun.
  • You should see the value of the first ammunition bar go down.
  • Fire your right gun.
  • You should see the value of the second ammunition bar go down.
  • Continuously fire your left gun until it runs out of ammunition.
  • You should see an hour-glass icon appear in the ammunition bar, which will steadily increase until it is full again.

Miscellaneous

  • When flying near a planet, you should see some dots in the corner, which roughly indicate the direction towards the planet.
  • Then flying on a planet, you should see a compass (I don't know what it does - points towards true north?).

Potential Future Improvements

  • The UIWarnDrawer notifications are not the most visually pleasant. Better placement and design is needed but for now I've tried to retain most lf the original appearance and behaviour.
  • UIWarnDrawer notifications start from the middle of the screen on Android, which shouldn't really be the case.
  • There are gaps between the status bars in the top-left of the HUD where certain elements are absent. The FlowLayout explicitly does not ignore empty elements, which is why spacing is still applied.

Breaking Changes

  • The original GameScreens#mainGameScreen variable has been re-named to GameScreens#oldMainGameScreen.
  • GameScreens#mainGameScreen now points to the NUI version of MainGameScreen instead.

Notes

@BenjaminAmos
Copy link
Contributor Author

BenjaminAmos commented Sep 20, 2022

This was replaced by #665.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant