Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some upgrades don't seem to be working anymore #32

Open
NathanLovato opened this issue Mar 3, 2020 · 7 comments
Open

Some upgrades don't seem to be working anymore #32

NathanLovato opened this issue Mar 3, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@NathanLovato
Copy link
Contributor

Following my refactor of the stats and upgrades, the states, e.g. in PlayerShip, upgrades don't seem to be changing the gameplay. I haven't spent a lot of time investigating, but this might be due to not updating values from the Stats class, for example in a given state. We have to either:

  • Always call *.stats.get_stat("stat_name")
  • Have objects subscribe to stats' stat_changed signal and update a property accordingly
@NathanLovato NathanLovato added the bug Something isn't working label Mar 3, 2020
@Razoric480
Copy link
Collaborator

For the GSAIKinematicBodyAgent2D, it'll need to be via the stat_changed signal, since those values are built into the steering framework.

@Hansel-Dsilva
Copy link
Contributor

Seems like a serious bug. Any advice on how to go about debugging this? Perhaps I can compare the code with that before the refactor commit.

@NathanLovato
Copy link
Contributor Author

I have to check again, this might be solved already. There's more refactoring to do for the upgrade system but for now, we're busy with other projects.

@Hansel-Dsilva
Copy link
Contributor

I've manually play tested all the upgrades and the stats' cache dictionary seems to be updating properly. _cache is where all the current stats are located right? If so then this issue can be closed. Unless, the _cache updates don't actually change the gameplay? I can't tell because of the lack of any numerical feedback in-game. The health bar & cargo circle don't get bigger but I guess that's how the GUI is set up.

@NathanLovato
Copy link
Contributor Author

The stats are the stats, but concrete movement speed is being handled by the steering ai framework. I'll check it right away

@NathanLovato
Copy link
Contributor Author

The issue is still there. Notes to address it:

In the player's Move.gd state, we need to update the linear_speed_max and acceleration_max when the corresponding stat changes on the ship. This requires adding signals to the stats (signal linear_speed_max_changed(new_speed) etc. to connect them to the move state.

@Razoric480
Copy link
Collaborator

Could simplify it and just use the stats_changed signal and just re-apply all the variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants