Farama-Foundation / Arcade-Learning-Environment

The Arcade Learning Environment (ALE) -- a platform for AI research.
https://ale.farama.org/
GNU General Public License v2.0
2.14k stars 420 forks source link

Wrong screen size with getScreenRGB and Python #185

Closed svepe closed 7 years ago

svepe commented 7 years ago

The image returned from getScreenRGB() with the Python interface has a resolution 160x210 (width x height), i.e. it is in portrait, while the image drawn in the SDL display is in landscape. I have confirmed the issue with a few games, so I do not think it is ROM related. I tried digging around the code a bit, but couldn't figure it out. I am happy to fix it as long as anybody has an idea why this is the case.

mgbellemare commented 7 years ago

Svetlin,

The native resolution at which Atari images is actually 160x210 (some games have taller screens). This is typically stretched out to be wider than large, either in 4:3 or 2:1. The 160 "pixels" width comes from the image not consisting of pixels at all, but rather scanlines. Put another way, Atari pixels do not correspond to squares but instead rectangles.

Best,

On Mon, Jan 30, 2017 at 3:35 PM, Svetlin Penkov notifications@github.com wrote:

The image returned from getScreenRGB() with the Python interface has a resolution 160x210 (width x height), i.e. it is in portrait, while the image drawn in the SDL display is in landscape. I have confirmed the issue with a few games, so I do not think it is ROM related. I tried digging around the code a bit, but couldn't figure it out. I am happy to fix it as long as anybody has an idea why this is the case.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mgbellemare/Arcade-Learning-Environment/issues/185, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPczhs-9ADlKdlzj8CJab8LGL0wOdSfks5rXgNXgaJpZM4Lxiyx .

svepe commented 7 years ago

Marc,

I see. Thanks for the info.