YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
24 stars 8 forks source link

GX.games: add ability to interpolate canvas during tests #5840

Open gnysek opened 5 months ago

gnysek commented 5 months ago

Is your feature request related to a problem?

Currently GX.Games exporter allows to set interpolation between pixels like other exporters, but, since HTML5 <canvas> is also resized in most of cases, whole game is still distorted, until there's image-rendering: smooth; added in CSS for <canvas> element.

This is checkbox which does that, but only for published games: 20240513_90877e076d878749d743d84b41914f75 There's no way to do such thing when testing locally (especially if game runs in default browser instead of Opera GX), and requires updating CSS every time, manually. This is very time consuming.

Examples:

<canvas> with default, settings:

<canvas> with image-rendering: smooth;, settings:

Describe the solution you'd like

a) Ability to enable canvas interpolation from IDE b) Ability to use custom index.html file same as for HTML5

Describe alternatives you've considered

New function, which allows to change that in-game:

gx_set_canvas_rendering([bool]) - whether to turn image-rendering: smooth; or image-rendering: pixel, by constants:

Additional context

No response

gnysek commented 5 months ago

I've just added gx_set_canvas_rendering proposal in Describe alternatives you've considered section.