Skip to content

Clarify & speed up basic views tutorial - #1659

Merged
pvcraven merged 4 commits into
pythonarcade:developmentfrom
pushfoo:views_tutorial_improvements
Apr 1, 2023
Merged

Clarify & speed up basic views tutorial#1659
pvcraven merged 4 commits into
pythonarcade:developmentfrom
pushfoo:views_tutorial_improvements

Conversation

@pushfoo

@pushfoopushfoo commented Mar 24, 2023

Copy link
Copy Markdown
Member
  • Reduce coin count from 50 to 25 (focus is on views, not the game)

@Ibrahim2750miIbrahim2750mi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@einarf
einarf requested a review from pvcravenMarch 24, 2023 21:58
@pushfoo

pushfoo commented Mar 24, 2023

Copy link
Copy Markdown
MemberAuthor

@pvcraven for context, the direction I'm leaning towards for this would be to move this under a "Screens & Menus with Views" headings akin to the shaders index we currently have.

I may want to have #1608 expand on it, but I'm not sure yet. What I am sure of is that 50 coins takes far too long to play through for a tutorial which is about the screens, not the gameplay.

Comment threaddoc/tutorials/views/01_views.py Outdated
Comment threaddoc/tutorials/views/index.rst Outdated
@pushfoo

pushfoo commented Mar 28, 2023

Copy link
Copy Markdown
MemberAuthor

@pvcraven any objections to replacing code like this:

sprite.center_x=10sprite.center_y=10

with more efficient code which doesn't update the SpriteList twice?

sprite.position=10, 10

Also sorry for the close / re-open. I had a touchpad issue.

@pushfoopushfoo closed this Mar 28, 2023
@pushfoopushfoo reopened this Mar 28, 2023
@pvcraven

Copy link
Copy Markdown
Member

@pvcraven any objections to replacing code like this:

sprite.center_x=10sprite.center_y=10

with a more efficient code which doesn't update the SpriteList twice?

sprite.position=10, 10

No. Some examples that are super-basic I avoid that because students might not be introduced to tuples yet. But by the time they use screens, shouldn't be an issue.

@pushfoo
pushfooforce-pushed the views_tutorial_improvements branch from ea311c4 to c4185bfCompareApril 1, 2023 01:43
@pvcraven
pvcraven merged commit 61565a0 into pythonarcade:developmentApr 1, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pushfoo@pvcraven@Ibrahim2750mi