Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by trifu

Hi all,

When I try to use the biolab app as a learning tool, I'm unable to increase the canvas size. I tried creating one large background image as an entity. I made it the same size as an ipad which is 1024width, 768 height (in landscape mode).

However, the canvas starts being painted around the center of the screen and overflows right and to the bottom and gets cut off, any ideas why?

btw, I'm using appmobi integration with impactjs.

1 decade ago by Jerczu

All canvas settings are at the very last line of the main.js you can set up your size and scale ratio.

1 decade ago by trifu

Hi Jerczu,

Thanks so much for answer my question,

this is what I have for that code:

if(ig.ua.iPad){ig.main( '#_cvs', MyGame, 30, 1024, 768, 2 );}
else{ig.main( '#_cvs', MyGame, 60, 240, 160, 2 );}
});

but it still shows a tiny biolab canvas in the middle of my iPad emulator...?

I tried making a large background of a single png, (1024width x 768 height), but I wasn't able to add it as an entity as it kept on covering over the other entities...

1 decade ago by Jerczu

if(ig.ua.iPad){ig.main( '#_cvs', MyGame, 30, 1024, 768, 2 );}
else{ig.main( '#_cvs', MyGame, 60, 240, 160, 2 );}
});

Slight mistake there should be
if(ig.ua.iPad){ig.main( '#_cvs', MyGame, 60, 512, 384, 2 );}//notice 2 = this means scale up by factor of 2 if you want to go native set 1024x768 but scale factor 1.
else{ig.main( '#_cvs', MyGame, 60, 240, 160, 2 );}
});

Why are you reducing the nominal fps from 60 to 30? Engine will do that for you if it cant pull 60fps.
Page 1 of 1
« first « previous next › last »