triptych Posted September 14, 2013 Share Posted September 14, 2013 I wonder if it would work with cocoonjs / ludei so you could package up your game and sell it as an ios app... Link to comment Share on other sites More sharing options...
rich Posted September 14, 2013 Share Posted September 14, 2013 I've no idea to be honest, I don't have time to find out right now but would love to know if someone does! Link to comment Share on other sites More sharing options...
meanderingleaf Posted September 14, 2013 Share Posted September 14, 2013 Reading from cocoon's site, I would assume Phaser would be a good choice - CocoonJS does not constrain your games to any proprietary APIs or SDKs. Code your games using plain JavaScript and HTML5 using any engine you want. CocoonJS will run it with no code changes. Seems like so long as its html & javascript, cocoon will wrap it for you. Since Phaser supports both canvas and webGL (I believe?), its probably even more robust than some. Link to comment Share on other sites More sharing options...
Ezelia Posted September 14, 2013 Share Posted September 14, 2013 I made some tests (not real games) with Pixi and it worked just fine.I don't know if WebGL adds something when making 2D games on cocoon, since cocoon already use GPU to render all 2D stuff even when you use canvas 2D context Link to comment Share on other sites More sharing options...
Ludei Posted September 17, 2013 Share Posted September 17, 2013 Hello everyone!! Phaser works great on CocoonJS, we've been testing some demos and we haven't found errors . Regards,Ludei team korpuskel, drokt, ekiscrim and 2 others 5 Link to comment Share on other sites More sharing options...
benny! Posted September 17, 2013 Share Posted September 17, 2013 Wow ... fantastic news. Thanks for sharing and cool to have you around here! Welcome to the forums! Ludei 1 Link to comment Share on other sites More sharing options...
rich Posted September 17, 2013 Share Posted September 17, 2013 Sweet! Thanks guys Ludei 1 Link to comment Share on other sites More sharing options...
Mat Groves Posted September 17, 2013 Share Posted September 17, 2013 weh hey! is that with webGL? Ludei 1 Link to comment Share on other sites More sharing options...
Ludei Posted September 18, 2013 Share Posted September 18, 2013 weh hey! is that with webGL?Yes! Link to comment Share on other sites More sharing options...
Ludei Posted September 18, 2013 Share Posted September 18, 2013 We've found a problem with our debug service that crashes when trying to render a styled color message, we are working to fix it Link to comment Share on other sites More sharing options...
Fla5h Posted October 4, 2013 Share Posted October 4, 2013 Can someone help me out, i'm trying to add my game(consist of image folder, src folder and .html) to a zip to test and run on the cocoon mobile ipad app but it keeps saying that i have to add my .html into the zips root. Im seriously lost. Link to comment Share on other sites More sharing options...
Ezelia Posted October 4, 2013 Share Posted October 4, 2013 do you have an index.html file in your zip root ? make sure it's index.html , don't know if cocoon handles .htm files Link to comment Share on other sites More sharing options...
Fla5h Posted October 4, 2013 Share Posted October 4, 2013 yep its named index.html and everything I can get games i made in other engines to work just fine. Link to comment Share on other sites More sharing options...
benny! Posted October 7, 2013 Share Posted October 7, 2013 @Ludei: I did a small test with latest CocoonJS launcher and the following code:<!DOCTYPE html><html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <script type="text/javascript" src="js/phaser.js"></script> <script type="text/javascript"> (function () { // WebGL does work but no scaling var game = new Phaser.Game(320, 480, Phaser.WEBGL, '', { preload: preload, create: create, update: update }); // CANVAS does not work - throws exception. no canvas created. //var game = new Phaser.Game(320, 480, Phaser.CANVAS, '', { preload: preload, create: create, update: update }); game.canvas.style.cssText="idtkscale:ScaleAspectFill;"; function preload() { game.load.image('mushroom', 'assets/sprites/mushroom2.png'); } function create() { var test = game.add.sprite(200, 200, 'mushroom'); } function update() { } })(); </script> </body></html>I wasn't able to use Phaser with a normal canvas element. Using WebGL I have some scaling issue. The screenshot you posted looks like you do not have those issues. Would you mind to post some example code. Thanks in advance. Link to comment Share on other sites More sharing options...
Ezelia Posted October 7, 2013 Share Posted October 7, 2013 Hi Benny I didn't tested with Phaser but with Pixi I made some tests and the only solution that allways worked for me was by creating the canvas programmatically then passing it to Pixi initialisation (I don't know if Phaser allow this). and btw, Cocoonjs have an optimised canvas to accelerate 2D drawing see here :http://wiki.ludei.com/cocoonjs:extensions:basic:screencanvasthis one is not created with the standard <canvas> object, so it's allways a good idea to create the canvas first then pass it to the constructor. Link to comment Share on other sites More sharing options...
benny! Posted October 7, 2013 Share Posted October 7, 2013 Hi Benny I didn't tested with Phaser but with Pixi I made some tests and the only solution that allways worked for me was by creating the canvas programmatically then passing it to Pixi initialisation (I don't know if Phaser allow this). and btw, Cocoonjs have an optimised canvas to accelerate 2D drawing see here :http://wiki.ludei.com/cocoonjs:extensions:basic:screencanvasthis one is not created with the standard <canvas> object, so it's allways a good idea to create the canvas first then pass it to the constructor. Hi Ezelia - thanks for your answer. I did some tests with Pixi, too. Also, used the screencanvas and passed it to Pixi. Refer to my post I made in the Pixi forum. Unfortunately, I could not solve the scaling issue with in a WebGL context. My guess is to modify the glViewport somehow and just set the canvas dimension to window.innerWidth/window.innerHeight. But I do not know how easy this would be with Pixi. That said - I am not sure if it is worth the effort - since Pixi is 2D - and as you already mentioned - CocoonJS uses its screencanvas for 2d acceleration. So, maybe it does not really matter performance wise. But it would be of course be cool to know. Link to comment Share on other sites More sharing options...
Pert Posted January 15, 2014 Share Posted January 15, 2014 Played around with simple full screen background image scrolling and some particle effects to test Phaser and Cocoon mix yesterday, worked well on my personal Nexus 4 and Nexus 7.Also asked one of the testers to run it on lower end Android in office just for kicks - it was running well on HTC Desire HD with Android 2.3.5 - loading times were slightly longer and it did not get the screen size right, but that is probably down to me not doing any clever screen resolution checks. Overall test application was still running smoothly.I like Cocoon auto-hides OS navigation.There are some downsides.You can only compile app with compressed ZIP size up to 30Mb, but with ZIP compression set to max and graphics and audio properly optimised, JS, CSS and HTML minimised, it should not be an issue.Also, while compile process was not too bad (around 2-3 minute wait until I got email with download link), it requires few manual steps to test your package on real device.If you are happy to work in desktop browser and test your code on real devices couple of times a day and are willing to be mindful of project size on disk, for now, I really like Cocoon JS and it has hiked my motivation to work on my next HTML5 / mobile project! Link to comment Share on other sites More sharing options...
Recommended Posts