haxegon / zeedonk

Haxegon + Puzzlescript = Zeedonk!
http://www.zeedonk.net
12 stars 2 forks source link

Gfx.resizescreen doesn't work with canvas #226

Closed increpare closed 9 years ago

increpare commented 9 years ago

I don't know if you want to support resizescreen generally (I'm see no real reason it should be included), but it doesn't seem to work right now with the canvas

Game.background(Col.RED);
var w = 100+50;
var h = 100-50;
Gfx.resizescreen(w,h);
function update(){
  Gfx.clearscreen(Col.BLUE);
  var t = Game.time/30;
  Gfx.drawcircle(Gfx.screenwidthmid,Gfx.screenheightmid,10,Col.WHITE);
}
TerryCavanagh commented 9 years ago

Oh, we should totally include it! It might not even be that hard, er, maybe. Let's figure it out when you're back - it's hardly the most urgent thing to work on.

Wot I think is happening here is that the screen is being resized fine, but the canvas is still 768x480. For me it's drawing the circle in middle of the 150x50 canvas.

Right now, the only thing you can actually usefully do is resize the screen to multiples of 768x480. So, these work:

Gfx.resizescreen(768, 480);
Gfx.resizescreen(384, 240, 2);
Gfx.resizescreen(192, 120, 4); //This is the default
Gfx.resizescreen(92, 60, 8);
increpare commented 9 years ago

not planned on doing for the forseeable future