Skip to content

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

Open
@annahowell

Description

@annahowell

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! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions