Official continuation of Destination Sol, the great fun little arcade space shooter from http://sourceforge.net/projects/destinationsol/ Modules live at https://github.com/DestinationSol/
Apache License 2.0
330
stars
122
forks
source link
Convert remaining MainGameScreen visuals to NUI #665
This pull request converts all remaining 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.
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
This supersedes #641.
This depends on #664.
You can view the changes made only in this pull request here.
Description
This pull request converts all remaining visual functionality of
MainGameScreen
to use NUI instead. This does not cover auxiliary classes, such asBorderDrawer
andZoneNameAnnouncer
but does includeWarnDrawer
. Most of the not covered classes render rotated images, which is not supported under NUI (and so useUiDrawer
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
Imperial Small
is recommended for this)Armour
Shield
Health
Enemies
Stats Bars
Health Bar
Shield Bar
Ammunition Bar
Miscellaneous
Potential Future Improvements
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.Breaking Changes
GameScreens#mainGameScreen
variable has been re-named toGameScreens#oldMainGameScreen
.GameScreens#mainGameScreen
now points to the NUI version ofMainGameScreen
instead.Notes