Support arbitrary resolutions (or at least non-square ones) #21
Replies: 1 comment 1 reply
-
Hey @tommy-mitchell , thanks for taking a look and for your question! (the first one here 🎉 )
At first, it came from the how the engine was created: as a proof of concept I wanted to port my PICO-8 games to my new engine, therefore needed a support for both 64x64 and 128x128. Then, it became a technical choice which helped me to make some decisions easier, mostly around the HTML surrounding the canvas, especially on touch devices where I assume square canvas and put touch buttons around it depending on the device screen ratio (it is implemented in https://github.com/beetrootpaul/beetpx/blob/main/html_templates/index.template.html#L567-L942 ) Recently, I started to wonder about adding a support for 1920 × 1080 equivalents e.g. 384 x 216. There might be some limitations regarding performance (am not an expert in the performance area), with a lot of pixels to process every frame. But even if not 384 x 216, then maybe at least 160 x 90?
Rather not. I am pretty sure for the engine API to work properly on a different resolution it would be kinda like a single line change, since I tried to not bake the square assumption anywhere in the code (apart from the HTML part). Are there any specific resolutions you have in mind? I am not feeling comfortable making the engine accept any resolution yet, but I think I can try to do something about some specific set of resolutions, ideally about a very specific set of screen ratios. Also, regarding the simplest solution, which would not require rethinking how to do the HTML: would something like on the 3 examples below be acceptable for you or the amount of black screen around the game would be a "no go"? The examples below are for 1080p aspect ratio, but I just wanted to express the idea of putting a rectangle inside a square without any other changes.
|
Beta Was this translation helpful? Give feedback.
-
This project seems really cool! I'd love to try it out, but I'm not as interested in making games with square resolutions. Is the limitation stylistic, or is it baked into a lot of places in the engine?
Beta Was this translation helpful? Give feedback.
All reactions