Search the Community

Showing results for tags 'cocoonjs'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 119 results

  1. Hey guys! this is the trailer for my newest game Reach for the Star! It was built using HTML5 Canvas and Javascript with the iioEngine I have ported it to iOS and Android however I cant share the web build until the iOS and android builds are published. Any feedback on the trailer would be awesome!
  2. I'm using Phaser 2.3 with Canvas + . I'm able to use the audio system fine, but there is a pause for about 200ms while looping an OGG file(~10 seconds of music) on each loop start. I need the audio looping for my background music. The best answer I could find was this : Ludei's comment. Is the issue solved or is there any fix? ( I also tried the latest version of Phaser, same results.)
  3. Hi there, Just want to let you know that we have released our latest mobile games, Siege, on Google Play! Check it out here: A gameboy-inspired retro arcade games, you are challenged to survive as long as you can from the Gargantua attack while retaliate! Can you survive this immortal monster attack? This game built with love using Phaser JS, and packaged using Cocoon JS Do let me know what you think! If you have any feedback/encounter bug, just let me know here! Thanks!
  4. i tried different songs in different file formats (mp3,wav, ogg) music ='theme',1,true); // key, volume, loop'',0,1,true); //marker, position, volume, loop, forceRestartmp3 is not played at all and with wav or ogg the bug is the same.. i also tried playing the music with'theme',0.4);and it jumps too... (it sounds like a damaged cd but only on the first note - the first 200ms are played twice) all the other sounds (the short ones) don't have this problem.. i have no idea what to do - it seems that the file length is somehow a source of the problem (my audio file is a 30sec loop so it's not that long) thx in advance!
  5. Hello , I'm a html5 game dev (and a construct 2 user) , my problem is , when trying the apk which i got from ludei and cocoon.js i get horrible fps in the first 10 seconds . then performence return to stable 60fps , is there any tips on how to fix this ?
  6. hxe


    Available at Google Play store: Catventures is now available for Windows Phone: Available for iOS: Here's beta gameplay demo in Youtube: Game is done by using Construct 2 and build by Follow me on Twitter @rasterigames
  7. Any examples of games released to App Store or Google Play made with Phaser? Also hope to know what kind of porting system has been used. (e.g. cocoonJS) I know 1 - BiolabDisaster , I've heard this is made with Phaser and ported to app store? any others?
  8. Hi all, I'm trying to get a project working in Cocoonjs with Pixi. At first I was under the impression that I could just take my code and place it in a Canvas+ and be good to go. I'm now realizing, to utilize my UI I will need access to the full DOM features, so I also need to use a Webview. Now I am trying to use both and am refactoring my code (side question: Does Ludei claim you can use the same code because it works if you only use a Webview? Do they expect that you can use the same code if you need to use both a Canvas+ and Webview? I don't see how they could since you have to write custom code to make Webview and Canvas+ interact). So here's the problem; I finally got all errors and warnings out of the code after doing a bit of refactoring. I've separated all to most of the PIXI/rendering specific code from the jQuery and DOM related code. I load the Webview, the app connects to my game server as expected but the canvas looks glitchy. By that, I mean it looks like what would accompany static on a TV, but less exaggerated. It will be mostly black with glitchy, patterned grey pixels interspersed. Every once in a while it will jump to having more grey static and then go back to more black. I can provide code or screenshots if needed. I am using Pixi v3 (I think v3.0.6). I am also using pixi-spine (unsure of the version). Autodetect renderer seems to be using Canvas renderer. Has anyone experienced (and fixed) this kind of thing?
  9. While trying to get our last game Fip to run on CocoonJS launcher, we noticed that the sound wasn't playing at all. After much investigation we were able to make it play but after making some changes to Phaser (dev branch). The first problem encountered was in Sound.js, inside update() function here: if ( &&{ // console.log('tried playing locked sound, pending set, reload started');; this.pendingPlayback = true;}the ".locked" attribute was "undefined" so the sound never reloads. So our first change was inside Cache.js/addSound(), changing this: this._sounds[key] = { url: url, data: data, isDecoding: false, decoded: decoded, webAudio: webAudio, audioTag: audioTag };with this one: this._sounds[key] = { url: url, data: data, isDecoding: false, decoded: decoded, webAudio: webAudio, audioTag: audioTag, locked: };The second problem was in Sound.js/update() at the following line: if (this._sound && this._sound.readyState == 4)the attribute "readyState" is undefined. Changing the previous test to the following fixes the problem: if (this._sound && ( || this._sound.readyState == 4))Now the game plays sounds nicely inside CocoonJS launcher Please note, that we didn't try yet to play audiosprites, but just regular sound files (a music actually).
  10. Hi everyone, I introduce you my first HTML5 mobile game. It is developed with phaser, ES6 (using babel), and ported to mobile using cocoonjs. The game consist in a sliding puzzle game world where the player have to collect cookies. The player (the cookie bag), is controlled using accelerometer. Android version is already available, IOS will be released next week. Google Play
  11. I've developed an HTML5 game using cocoonjs. I followed various guides online to get the thing SSL'd(?) and zipaligned (?) and was finally able to get the APK supplied by cocoon in a format that the play store would accept. I have received an email from the play store advising me of a 60 day deadline to resolve SSL issues with the app (pasted below). Does anyone know of any online resource (or would care to share their advice) that can hold my hand through resolving this (preferably the whole process from cocoon APK to play store ready APK) issue. Getting it to a play store ready format took a couple of hours and if I'm honest, I have no idea how I got there Thanks, BattyMilk Email from the play store We wanted to let you know that your app(s) listed below statically link against a version of OpenSSL that has multiple security vulnerabilities for users. Please migrate your app(s) to an updated version of OpenSSL within 60 days of this notification. Beginning 7/7/15, Google Play will block publishing of any new apps and updates that use older, unsupported versions of OpenSSL (see below for details). REASON FOR WARNING: Violation of the dangerous products provision of the Content Policy and section 4.4 of the Developer Distribution Agreement. The vulnerabilities were fixed in OpenSSL versions beginning with 1.0.1h, 1.0.0m, and 0.9.8za. To confirm your OpenSSL version, you can do a grep via: $ unzip -p YourApp.apk | strings | grep "OpenSSL" For more information about the vulnerability, please see this OpenSSL Security Advisory. To confirm that you’ve upgraded correctly, upload the updated version of the app(s) to the Developer Console and check back after five hours. For other technical questions about managing OpenSSL, please see!forum/mailing.openssl.users. In 60 days, we will not accept app updates containing the vulnerabilities. In addition, we will reject new apps containing the vulnerabilities. Note: while the issues may not affect every app that uses OpenSSL versions prior to 1.0.1h, 1.0.0m, or 0.9.8za, developers should stay up to date on all security patches. Even if you think that specific issues may not be relevant, it's good practice to update any libraries in your app that have known issues. Please take this time to update apps that have out-of-date dependent libraries or other vulnerabilities. Before publishing applications, please ensure your apps’ compliance with the Developer Distribution Agreement and Content Policy. If you feel we have sent this warning in error, visit this Google Play Help Center article. Regards, Google Play Team
  12. Hi there, I made my game and even my leadersboard system and everything works fine, I´m having a beautiful 60fps in my game and I get/save scores perfectly, on desktop and cocoon´s Webview+ The problem is that I tried my game in an old smartphone and it´s running a little bit slower, so I changed to Canvas+ and now I´m getting those 60fps even in old smartphones. The problem is that I´m not being able to save the scores if I use Canvas+. At the beginning I was using jQuery (just for that... I know...) this way: $.getJSON( path+"getScores.php", { game: "1", order: "ASC" }).done(function(data) { this.checkScore(data.scores[9])})And everything was working fine until cocoon started to throw weird errors about jQuery, so I changed to XMLHttpRequest this way: var http = new XMLHttpRequest();var url = path+"getScores.php";var params = "game=1&order=ASC";"POST", url, true);http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");http.setRequestHeader("Content-length", params.length);http.setRequestHeader("Connection", "close");http.onreadystatechange = function() {//Call a function when the state changes. if(http.readyState == 4 && http.status == 200) { alert(http.responseText); }}http.send(params);Now I have the same problem, working on desktop, working on webview+ and no working on canvas+ (but no errors, simply not working). So my question is, how would you send some data to a .php file using canvas+? It seems (to me) that is not possible at all...
  13. Hi, I've been developing a game using phaser, then packaging it for android using CocoonJS. It's a cognitive training game, and I'm working with psychologists who want to gather as much data as possible about players. One thing we'd like to do (with players' consent, obviously) is take photos of the player while the play the game. This is because we want to analyse the images to gauge their levels of motivation and engagement. So I've been trying to use the CocoonJS camera plugin to implement this feature, but I'm finding that the documentation and examples aren't very helpful. I've got this: Cocoon.Camera.start({ success: function(stream){ console.log('camera started'); if (Cocoon.nativeAvailable) { console.log('native available'); context.fillRect(0, 0, 100, 100); context.drawImage(stream, 0, 0, 100, 100); } }, error: function(){ console.log('error starting camera'); }});So, assuming that I have context (and the associated canvas) defined somewhere, I have a couple of questions that I can't find answers to online. 1. Is there a way for me to not have this stream automatically displayed on screen? I've tried creating a canvas and context using Phaser.Canvas.create( ), which I thought didn't automatically add the canvas to the DOM, but it still appears on screen. I want to capture images in the background, without showing a preview, but I can't seem to figure out how to do this. 2. To capture the images, I've been calling canvas.toDataURL( ), which seems to work ok. Is this the best way for me to do this? Is there some way I can grab images directly from the stream object (the argument in the success function above), without having to draw to a context (because this would prob solve my problem in question (1) too? 3. I think generally I've found it very hard to work out exactly how the CocoonJS Camera plugin works, because, as I said, the docs are very sparse. They mention a video puzzle here, which I've downloaded on ipad and seems to work pretty well. But the code is missing from the CocoonJS demos on github. I should also say, I really don't have to use the CocoonJS Camera plugin. So if anyone has any other suggestions about how a phaser + cocoonjs game can take photos using the device's camera without showing a preview, I'd really appreciate it. I've looked around but can't see much else. getUserMedia doesn't work, at least in CocoonJS canvas+, and I'd prefer to stick with canvas+ if possible. Phaser, on the other hand, is pretty essential to my project, mainly because it's so so good: fast, intuitive, well-documented, and full of useful features. Thanks! (and sorry for the long post!)
  14. Hello everybody, I transfered my project in PIXIv3 and when I lauch it in cocoonjs, I saw the fps very poor. I didn't understand the why of the how until I realize that cocoon was in canvas mode. So, if I do (in cocoonjs): var renderer = new PIXI.autoDetectRenderer(canvas.width, canvas.height); renderer returns canvas. Canvas works, but the FPS is not the best. else, if I do: var renderer = new PIXI.WebGLRenderer(canvas.width, canvas.height)renderer return webgl. OK, the FPS is max, BUT, cocoonjs don't display sprites. It display graphics, background color, but no sprite. It's annoying because v2 (v 2.7 i believe my last version) worked perfectly: autoDetect returned webgl, FPS max and sprites were displayed. It is normal, it isn't? I stress google since long hours and i don't have any key about this (stencil?, I don't know what is, and I don't understand why v2 worked and why v3 not). I stess me too, because I don't know how many tests I did in my device but the result is the same, with cocoonjs, PIXI the third (3.0.6) is not a webgl warmachine.
  15. Hi, one of my colleagues has problem with our game running on CocoonJS. I am running it on old Samsung Galaxy Tab2 and everything is OK. He has Nexus 7 phone and he can see only about 1/4 of game (tops left corner) stretched over whole screen. When detecting screen size I am using this code (recommended at " Common Phaser + CocoonJS issues" thread): if (!(nav["isCocoonJS"] !== undefined && nav["isCocoonJS"] === true)) { windowWidth = window.innerWidth - 1; windowHeight = window.innerHeight - 1; } else { windowWidth = (window.innerWidth - 1) * window.devicePixelRatio; windowHeight = (window.innerHeight - 1) * window.devicePixelRatio; // Hack to avoid iPad Retina and large Android devices. Tell it to scale up. if (window.innerWidth >= 1024 && window.devicePixelRatio >= 2) { windowWidth = Math.round(windowWidth / 2); windowHeight = Math.round(windowHeight / 2); } // reduce screen size by one 3rd on devices like Nexus 5 if (window.devicePixelRatio === 3) { windowWidth = Math.round(windowWidth / 3) * 2; windowHeight = Math.round(windowHeight / 3) * 2; } }Any idea, what can be the reason?
  16. I am having issues getting the click events to fire for a basic Phaser.Button when running in canvas+ with cocoonJS. I am testing the app (using phaser v2.2.2) with the cocoonJS launcher (using cocoonJS v2.1.1.1) on iOS 8.1.2 on an iPhone 6. Here is what I have on a basic menu game state: var button = - 100, 215, 'assets', null, this, 'button_play_02.png', 'button_play_01.png', 'button_play_02.png', 'button_play_01.png');button.inputEnabled = true;button.fixedToCamera = true;button.smoothed = false; { console.log('button event onInputOut');}, this); { console.log('button event onInputDown');}, this);The button image displays in canvas+ but does not fire anything when clicked/touched. In webview+ and webview it works fine. The 'assets' is a texture atlas with the images being displayed for the buttons based on transparent pngs. I have seen similar issue on other topics (see below) but found no solution that worked. Any help would be greatly appreciated. Related topics:
  17. Hi there, weird thing at least for me... I´m testing my game in my Cocoon js Laucher and is giving me false, also, is giving me false too. I tried 4 different alerts and just the last one, running if firefox is giving me the right result, does anyone know why is this hapenning? I´m pretty sure I´m running this in cocoon (Phaser 2.3.0 and cocoonjs launcher 2.1.1) alert( //false in CocoonJS Launcheralert( //false in CocoonJS Launcheralert( //true in Firefox (as expected)
  18. Can someone share their experience(s) with cocoonjs? I'm not fond of proprietary software and APIs, but I'd like to learn more about Ludei. Thanks.
  19. Hi there, so I used to use for my leaderboards but to be honest, their service really sucks... Now I´m starting to use Google Play Games services but it´s a little bit confusing, does anyone know a good tutorial to implement this into a cocoonjs/phonegap game? (So far, no problem with an http hosted game) Thanks in advance.
  20. Hi all, I have an app I am working on that almost done and looks nice on my phone (Samsung Note 4). However, my scaling technique is not working on all phones, leaving some screens looking like this pic attached (hope you can see the white border around the off-white screen! The pic is HTC One X. Similar issues on tablets). My code setup is pretty simple: index.html file: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Title</title> <script src="js/phaser.min.js"></script> <script src="js/main.js"></script> </head> <body> <center><div id="game"></div></center> </body> </html> Sizing inside of main.js: var w = window.innerWidth * window.devicePixelRatio; var h = window.innerHeight * window.devicePixelRatio; var game = new Phaser.Game( w, h, // Width, height of game in px Phaser.AUTO, // Graphic rendering "", { preload: preload, // Preload function create: create, // Creation function update: update } // Update function ); I'm resizing screen elements according to w and h, so everything is designed to respond to w/h. Is this a problem with my div structure? I tried completely removing the html file... using canvas introduces a whole new host of problems though, with scale still unresolved (in canvas either does not show up or appears too large). Also tried changing the div name, using other techniques like: w = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) * window.devicePixelRatio; I can't seem to figure out how to get this to fullscreen. I am using WebView+ (not canvas), and min android version is 2.3. Help appreciated
  21. Hello Everyone, First time post on this forum, and first Phaser project. I researched for this, and have had results but not complete results so I decided to post a topic. I'm not at all looking for a solution with code as I'm not looking to waste anyone's time here, but guidance will be much appreciated given my 'noob' status with phaser. My background might be helpful : I'm coming from actionscript/starling here, where 1. stage can be scaled 2. textures can have scales as well so that a texture of scale 1 that reports a size of 100x100, would also report a size of 100x100 when at scale .5, it's just that the original image would be twice smaller, starling would handle upscaling the texture. With that, placing objects dynamically is easy as I would not have to change the code used to place objects on stage because width/height of objects would not change, and the stage being scaled would also allow me to place things in absolute values and still get a proportionally similar result on different 'screens' at least when the ratio of the stage is the same. What I want is "best fitting" the base dimensions of my game to the current "container" dimensions (as well as centering it). The topic is mostly about two things : fitting the game in those "3 different target containers" and also handling multi-resolution. So I'm creating a game for 3 "target containers". By that I mean : 1. a variable width/height div, in a desktop browser (inside a website that I won't be in control of so the dimensions are not fixed) 2. in a mobile browser, this time full window (nothing but the div containing phaser will be on this page) 3. in cocoonJs As I would've done with a flash project, I've prepared a set of different sized assets. I'm detecting whether I'm in cocoonjs with the following //initisCocoon = Reflect.hasField(Browser.navigator,'isCocoonJS');The game is designed (at scale 1x) for a base 'screen' of size base = new Rectangle(0, 0, 2048, 1536);this is a Rectangle I can access everytime. So all my assets of scale 1x are prepared for this base screen size (for cocoonJs actually). and I have other sets of downscaled assets, here is the list of scales I have : scales = [0.25,0.375,0.5,0.75,1];also an array that I can access anywhere in case that matters. Now for cocoonJs and a full browser version of the game on desktop, I have the following setup , and it works fine : function init() { isCocoon = Reflect.hasField(Browser.navigator,'isCocoonJS') ? true : false; game.scale.scaleMode = isCocoon ? ScaleManager.USER_SCALE : ScaleManager.RESIZE; game.scale.canExpandParent = true; game.scale.setResizeCallback(onResize, this); if (isCocoon) { trace("[Main] is CocoonJS"); }else trace("[Main] is not CocoonJS"); game.scale.setScreenSize(); }function onResize() { if (isCocoon) { var w = Browser.window.innerWidth; var h = Browser.window.innerHeight; game.renderer.resize(w, h); game.scale.setScreenSize(); } }This works fine. Also in init and onResize, I also calculate the "scale factor" of my game realScaleFactor = game.width / base.width; //that's assuming the game is always in landscape and it is.and look for the closest Float to that Float in my "scales" array , in order to find the right scale assets for my "screen"... if my game.width is 1024, i'll be at a scale of 0.5 compared to my original dimensions for my game, and since I have such a downscaled version for my assets, i'll preload stuff from my assets/0.5x/ folder instead of the assets/1.0x/ I guess that all makes sense (unless there's a more obvious way to do this). Now the problem with my multi-resolution paragdim that I'm trying to "port" from starling . The basic idea again is to be able to use absolute values whenever possible, and relative values when placing ui stuff (because obviously some screens are larger than the ratio of the "base" rectangle). I would scale down the stage, and starling would scale up images with the scale property. that means I can download smaller textures, still have stuff appear at the right scale and an image would always be the right size when I read the width/height values. I just tried placing every Sprite I need in a container (group), scaling that container down. it's like a Show_All I guess. yet the images are 2x too small when I'm at a .5x scale so it's probably useless to go this way. Could I make those 3 targets work , and load different sized assets, using the SHOW_ALL technique and how can I tell the scale manager the "base dimensions" or ratio of my game it should respect in order to SHOW_ALL. - and does that work with cocoonjs. How are you guys handling multi-resolution , without having to manually scale images, or hardcoding screen values. And how can I setup the ScaleManager for the three "targets" I have... The problem being the div with the fixed width/height the game could run in and I don't know in advance its dimensions. --- I'm very confused and very sorry if the solution is obvious. My problem is being convinced that something needs to be done a certain way and not having the necessary knowledge to do it the Phaser Way so in that regard I thank you in advance for any links and suggestions to help me for both the "3 target" and the "applying multiresolution" problems I currently have.
  22. Hi! I'm trying to develop my first game with Phaser. First of all - great engine. Really easy to understand and well documented. Game is rather simple (i think). - There are around 50 sprites (loaded in "create" function, 1.6 MB PNGs) falling one by one from above (with tween, tried gravity too but it's overkill for such simple animation?). - There is onInputDown bind and onOutOfBounds one. - There is text layer with score. On my PC (i7, 8GB RAM, decent GPU) there is no problem with perfomance at all. Problem is when I run it via CocoonJS launcher on my Samsung S4 (I've tried with Chrome too, same or even worse results). Performance of game is rather bad. Sprites are not moving smoothly. It is normal or should I look for error on my side?
  23. Hadron Wars is one of the most sophisticated cross platform MMO RTS games built with HTML5. Game is available on: Android - iOS - Windows Phone - Windows - Facebook - Available engines performance was not acceptable for such game, so NECOLT built custom game engine for Hadron Wars. Also we use PixiJS for rendering and CocoonJS for distribution to iOS and Android. We are open to share our experience developing this game, so feel free to ask here. is in beta mode now. Feel free to test it and leave feedback !
  24. Yep, it's another flappy bird type of clone. But don't despair! I've added some other elements to the game play. The main reason for me creating this game was I wanted a simple concept to be able to get the game done quickly. Where I spent my time was not on making a unique game, but I wanted to go through the entire process of doing all of the other things outside of the game creation to get a mobile game deployed in an app store with a simple banner advertising along the bottom. There were a lot of challenges to get things working. First off, the board here has been an incredible resource. I used posts here to handle the following issues. Proper scaling of the game for mobile resolutionsBest practices for audio in the mobile space (Kindle Fire being the only exception)Best practices for implementing pause/resumeGetting CocoonJS/MoPub/Admob integrated and workingBest practices and things to avoid when using CocoonJs/Phaser In addition, I wanted to go through the metrics of getting a good looking game out into the Google Play Store. Making appropriate game-play screenshots, videos for the store listing. How to sign the .APK file in order to be published to the store. How to handle versions after deployment to incorporate new features and update to devices. Differences between deploying to Chrome store vs. Google Play vs. Kindle marketplace using a single code base. The lessons learned from this process were to better educate myself on the challenges for targeting mobile platforms. In addition to these findings, I also want to include in the future: deploying to iOS, multiple ad network integration (pros/cons of performance via mopub and impressions), better marketing techniques during the process of game development through release and beyond, testing on multiple mobile devices If you aren't adverse to yet another game that follows the flappy bird mechanic, I would appreciate any feedback on the game or experience on your particular mobile platform. You can download the game here: Here are some screenshots. All art assets are from