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

Document Simple and Platformer engines #2185

Merged
merged 39 commits into from
Jul 3, 2024

Conversation

pushfoo
Copy link
Member

@pushfoo pushfoo commented Jul 3, 2024

TL;DR: To improve and optimize these, we have to know they're doing.

Changes

  • Clearer names in a moving platforms example file
  • Use context managers for cameras as an opportunistic fix
  • Add annotations in many places
  • Rewrite top-level docstrings for the Simple and Platformer engine
  • Document their attributes and properties
  • Explain what more of the code is doing with comments
  • Document Platformer-relevant attributes in Sprite
  • Rewrite SpatialHash top-level docstring and document some attributes

Supercedes #1981.

pushfoo added 30 commits July 2, 2024 18:29
* Delete redundant comment

* Add cross-references

* Use Google-ish style
* Add cross-refrences to Sprite.boundary_*

* Add top about perf and terrain
* Add return anntotation

* Expand docstring using pyglet/Google style
* Add return annotation to walls property

* Add return annotation to jump
* Rename moving_wall_list to moving_platform_list

* Pass moving and static items to correct arguments to stop using tons of CPU

* Fix spacing and indentation

* Use activate context manager for cameras
* Fix broken pair lists

* Expand to triplets of change_?, boundary_?, boundary?

* Link the moving platforms example page

* Fix SpriteList cross-ref

* Promote the tip about perf to an important
* Fix indent causing syntax error

* Use shorter cross-ref syntax

* Add example code to warning
* Add doc and cross-refs

* Convert to pyglet style
@pushfoo pushfoo merged commit e5962e3 into pythonarcade:development Jul 3, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

1 participant