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

Delete SimpleCamera #2054

Merged
merged 4 commits into from
Apr 8, 2024
Merged

Conversation

pushfoo
Copy link
Member

@pushfoo pushfoo commented Apr 8, 2024

Changes

  1. Remove SimpleCamera from arcade.camera's __init__.py
  2. Delete the simple_camera.py file itself

Why

TL;DR: We'd have to rewrite SimpleCamera again + Discord discussion suggests nobody actually wants SimpleCamera around

It's Not Actually 2.6 Compatible

The current SimpleCamera isn't API-compatible with 2.6. Instead, it's a rewrite of a rewrite started before 3.0. See the blue forks on this timeline (credit goes to @DigiDuncan):
image
Green is development, yellow appears to be WIP code

Nothing Actually Uses It

Camera2D.from_raw_data is the best porting option

TL;DR: Add migration guide showing how to convert code to use the class method

Core Concept How SimpleCamera Fails to Deliver
2.6-compatible arguments Current implementation needs rewrite to be 2.6-comaptible
move_to / update methods Broken behavior replaced by grips and controllers + update doesn't accept a time step

Other compatibility approaches were disliked

The following options were disliked in Discord discussion:

Option Reason(s) for Dislike
Camera which acts like 2.6 but logs deprecation warning to console People will expect future compatibility, console warnings might get missed
Camera import raises an ImportError on use + links a migration guide A broken import in the default library is ugly
Rewriting for compatibility yet another time We have already done this too many times

@DigiDuncan
Copy link
Collaborator

Huge +1.

@pushfoo
Copy link
Member Author

pushfoo commented Apr 8, 2024

The CI failures are pyright being angry about the GUI again.

@pushfoo
Copy link
Member Author

pushfoo commented Apr 8, 2024

We can still merge this if we want, but the platformer tutorial still references SimpleCamera. PyCharm's search scoping may have excluded .rst when I looked.

@alejcas
Copy link
Member

alejcas commented Apr 8, 2024

There's no reasons to have simplecamera with carmera2d

@einarf
Copy link
Member

einarf commented Apr 8, 2024

Good stuff 👍

@einarf einarf merged commit 6687fa0 into pythonarcade:development Apr 8, 2024
7 of 8 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.

4 participants