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

Accelerate function in episode 18 breaks moving north or west #5

Open
annahowell opened this issue Jul 17, 2017 · 0 comments
Open

Accelerate function in episode 18 breaks moving north or west #5

annahowell opened this issue Jul 17, 2017 · 0 comments

Comments

@annahowell
Copy link

Hi, the way in which the particle accelerate function is now implemented as of episode 18 breaks accelerating in some cases. If you try and accelerate the spaceship from episode 10 to the left or up on the screen the speed at which the spaceship moves drops to near zero. I am using:

if(thrusting) {
ship.accelerate(1, 1);
}

I assume this is because in some cases the function should actually be subtracting instead of adding but I am kind of new to all this. I've been following your guides and writing it in C++/SDL2 but have now dropped to JS to double check and sure enough it happens there too. Help! :)

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

No branches or pull requests

1 participant