Update step_5.py make program work directly from the book#22
Open
horstjens wants to merge 1 commit intopvcraven:masterfrom
Open
Update step_5.py make program work directly from the book#22horstjens wants to merge 1 commit intopvcraven:masterfrom
horstjens wants to merge 1 commit intopvcraven:masterfrom
Conversation
several minor errors made the program not working when directly taken out of the book (step_5.py https://learn.arcade.academy/en/latest/chapters/25_sprites_and_walls/sprites_and_walls.html#using-a-camera-for-scrolling) * resources paths were not correct anymore (i guess it dated from a previous version where resources were not organized in subfolders ) * method move_camera_to_player was called but actually did not existed
pvcraven
requested changes
Jan 21, 2024
|
|
||
| # Create the player | ||
| self.player_sprite = arcade.Sprite("images/character.png", SPRITE_SCALING_PLAYER) | ||
| self.player_sprite = arcade.Sprite(":resources:images/animated_characters/female_adventurer/femaleAdventurer_idle.png", SPRITE_SCALING_PLAYER) |
Owner
There was a problem hiding this comment.
The idea for this example was to get students to practice downloading and using their own images, rather than the build-in resources.
|
|
||
| # Scroll the screen to the player | ||
| self.scroll_to_player() | ||
| #self.scroll_to_player() |
Owner
There was a problem hiding this comment.
Yep, this is missing. The linked example from the API has the definition.
With the new 3.0, if it ever gets released, has a reworked camera that will change this section again.
Contributor
Author
There was a problem hiding this comment.
Is there something I can do to help you with version 3.0 ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
several minor errors made the program not working when directly taken out of the book (step_5.py https://learn.arcade.academy/en/latest/chapters/25_sprites_and_walls/sprites_and_walls.html#using-a-camera-for-scrolling)
resources paths were not correct anymore (i guess it dated from a previous version where resources were not organized in subfolders )
method move_camera_to_player was called but actually did not existed