Closed MonstrousSoftware closed 2 months ago
I wonder if this behavior stems from GWT, where the large refresh button prevented the full window area from always being available... I believe the GWT backend also didn't have a full canvas option until a few years ago. I don't really think fixed-size or full-canvas is necessarily better than the other; full-canvas needs your app to be able to scale to different canvas sizes from the start, which is actually more of a challenge for newcomers than a fixed size. It's an important challenge to overcome for most games, but is reading the existing comments that difficult for people? Using comments is also what GWT does, and it has both sizing strategies present with one commented out.
I think for GWT, liftoff generates resizable by default and adds a comment how to make it fixed size:
// If you want a fixed size application, comment out the above resizable section,
// and uncomment below:
//return new GwtApplicationConfiguration(640, 480);
So the default for GWT is the opposite of teavm. Anyway, it is just a suggestion. There may be reasons or preferences to keep it as it is.
Hm, now I'm not sure if TeaVM would be equivalent to GWT if it used 0,0 ("all available space") or -1,-1 ("canvas size"). I'm going to try to make it mimic GWT now, with the 640x480 option in a comment. I think the TeaVM default will be the option with no changes, that is, -1,-1 , since that seems to be encouraged.
This should be fixed since May 29, when I made the TeaVM defaults match the GWT defaults as best I could. I think that should allow closing this.
The default screen size in the teavm launcher is set to
config.width = 640; config.height = 480;
. There is a comment explaining to use 0, 0 to use the full browser window and its a small effort to change this. But, I have never not changed this to 0,0. Should the default not be set to 0,0 (i.e. full canvas), especially for newcomers?See also: https://discord.com/channels/348229412858101762/405518143818301443/1242945169561616486