RetardVeverca Posted March 4, 2014 Share Posted March 4, 2014 Hi. First I must say this is awesome engine, so simple, so fast ... thank you very much But I have problem with your Simple physics example, the canvas is not full screen (nor landscape nor portrait), I further tested it with mousedown and the canvas is truly not extended to the edges (at lease 1/3 of screen is out of bounds in landscape mode). I tried adding X and Y values to game.start() but this causes part of the screen that is outside to flicker and/or show multiple objects from game going in reverse direction. I also tried to set size with window.innerWidth and window.innerHeight but that causes game to be overstretched and almost 1/3 of canvas falls out of screen. So my question is, what is the best way to set screen size for multiple devices (from 320px up)? My second question is why is there "game.DebugDraw.enabled = true" in Simple physics example, but not in Flying Dog? My app does not render anything without game.DebugDraw.enabled set to true? I am working on Sony Ericsson Xperia Arc S (LT18i), android 4.0.4 with CocoonJS Launcher. Thank you and keep up the good work! Quote Link to comment Share on other sites More sharing options...
enpu Posted March 4, 2014 Share Posted March 4, 2014 There is specific property for scaling in CocoonJS:game.System.idtkScale = 'ScaleToFill';game.System.idtkScale = 'ScaleAspectFit';game.System.idtkScale = 'ScaleAspectFill';See if that help's you Quote Link to comment Share on other sites More sharing options...
RetardVeverca Posted March 4, 2014 Author Share Posted March 4, 2014 Aha ok thx I will try What about "game.DebugDraw.enabled = true"? Why is it used in Simple physics example, but not in Flying Dog? What is the proper way for drawing to the screen? Thank you Quote Link to comment Share on other sites More sharing options...
enpu Posted March 4, 2014 Share Posted March 4, 2014 Debug draw is used, when you want to see physics shapes or sprite hit areas visually.You see, sprites can be different size than it's hit area or shape. Did that help you? Quote Link to comment Share on other sites More sharing options...
RetardVeverca Posted March 4, 2014 Author Share Posted March 4, 2014 O yes, thank you for clarification, I dont have any sprites yet, just shapes so thats the reason It would be great otherwise for another screencast about bodys, shapes, collisions, sprites and combining all together, best in some simple real game world situation Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.