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

Fixed: black screen rendering for MPE env in rgb_array mode #874

Merged
merged 2 commits into from Mar 7, 2023

Conversation

cibeah
Copy link
Contributor

@cibeah cibeah commented Jan 1, 2023

Description

Fixes #864 by drawing on pygame screen before extracting the image for rgb_array mode. Only calls pygame.surfarray.pixels3d when needed.

Not sure if a new unit test is needed, can add if necessary !

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Screenshots

Please attach before and after screenshots of the change if applicable.

Before:
drawing

After:
drawing

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
  • I have run pytest -v and no errors are present.
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I solved any possible warnings that pytest -v has generated that are related to my code to the best of my knowledge.
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Member

@jjshoots jjshoots left a comment

Choose a reason for hiding this comment

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

Apologies for necro-reviewing this PR, but just a small comment. In addition, could you update to the latest version of master?

pettingzoo/mpe/_mpe_utils/simple_env.py Outdated Show resolved Hide resolved
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.

[Bug Report] 'rgb_render' mode in MPE produces a black screen
2 participants