You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the introduction of enemy AI in PR #58 the player ship can take damage and will despawn if it runs out of health. This causes several systems to panic:
Enemy targeting
Indicator system
HUD elements
Anything essentially that is querying for information about a .single() player entity.
These could be changed to .iter() or could be wrapped in conditionals (better) and this would seem to resolve the issue, but...
Well, for one, it sort of still makes sense to show the present location; currently this is determined relative to the player - we should see if this can be maintained such that the location persists after the player is killed.
Enemies should just use a conditional, and will eventually have other behaviours introduced that they perform in the absence of knowledge of a player.
The speedometer... can either be hidden or it could flash "ERROR" or "DEAD" or something.
All of that should be done to establish the sort of patterns we want to have in place for the future. That should be done first.
THEN... we make all of those changed redundant (for now) by introducing a "GAME OVER" pause state. The system changes are immaterial for the time being; but do them first so that we aren't just introducing the game over screen as a band aid - it might be removed or altered later, so that the world goes on even after the player dies (i.e. the GO screen is an active state rather than a paused one and you can see enemies salvaging remains and leaving, etc.). Because the universe does go on. You aren't the centre of it.
The text was updated successfully, but these errors were encountered:
Should be easy enough to simply respond to the player's destruction by moving to a GameState::GameOver in a next_state parameter.
The GameOver state could initially just continue to the StartMenu state. When our UI systems are more complete (see #34#88#32 ) we should be able to show game stats...
We currently don't record any such stats. Consider adding an issue for that (player kills, XP gained, money earned, time survived, etc.)
With the introduction of enemy AI in PR #58 the player ship can take damage and will despawn if it runs out of health. This causes several systems to panic:
Anything essentially that is querying for information about a
.single()
player entity.These could be changed to
.iter()
or could be wrapped in conditionals (better) and this would seem to resolve the issue, but...Well, for one, it sort of still makes sense to show the present location; currently this is determined relative to the player - we should see if this can be maintained such that the location persists after the player is killed.
Enemies should just use a conditional, and will eventually have other behaviours introduced that they perform in the absence of knowledge of a player.
The speedometer... can either be hidden or it could flash "ERROR" or "DEAD" or something.
All of that should be done to establish the sort of patterns we want to have in place for the future. That should be done first.
THEN... we make all of those changed redundant (for now) by introducing a "GAME OVER" pause state. The system changes are immaterial for the time being; but do them first so that we aren't just introducing the game over screen as a band aid - it might be removed or altered later, so that the world goes on even after the player dies (i.e. the GO screen is an active state rather than a paused one and you can see enemies salvaging remains and leaving, etc.). Because the universe does go on. You aren't the centre of it.
The text was updated successfully, but these errors were encountered: