• Content Count

  • Joined

  • Last visited

About programlocura

  • Rank

Contact Methods

  • Twitter
  1. Hi Videlais! Many many thanks! You make me realize my mistake, there was a path variable overriding another path variable, so the file wasn't calling from "the server"... Yeah, stupid mistake. Thanks again, Regards.
  2. Hi everyone! I'm in the final phase from my game, fixing bugs to work like a charm on mobile, but i'm having a lot of problems with cocoonjs. A co-worker told me that Cocoonjs doesn't support PHP. I was working with an intermediate PHP file to call to an external URL (From a service) that returns information, but it only returns the file content itself. Now i'm trying to retrieve information from the service but i'm having cross-domain issues. Someone actually has achieved this? Any information would be appreciated. Regards.
  3. Hi! I'm currently porting my game to mobile devices with CocoonJS. After days with a lot of headaches trying solve the issues, i came with one that i read on the forums that is solved on CocoonJS 1.4.4, but because i'm new with this I don't know what version it's actually being used to compile my project. I'm having this error: Javascript Exception (Line: 7181 Tag: 'requestAnimationFrame'): TypeError: 'undefined' is... Does someone knows this error? How can i fix it? Thanks in advance.
  4. Hi! I finally solved the problem, i was overrading the type of one sprite: this.doorMask.type = 'door'; // Now is commented to prevent thisThis line was preventing Phaser to detect the collisions. Thanks to everyone!
  5. Hi! I'm currently working on a game and i came across with a problem. Today i was merging new changes into the project and the collisions stop working... The changes were: Add audio/musicDelete some commentsChange minor thingsI'm managing the collisions this way: this.physics.collide( this.player, this.zombies, this.collisionHandler, null, this);The collision handler: /** * Manage the collision between the player and the enemies * @param obj1 PhaserSprite * @param obj2 PhaserGroup * @returns void */collisionHandler : function( obj1, obj2 ) { /* console.clear(); console.log("%c-- Colision Between Player And Zombie --", "color: red; font-size: 18px"); console.debug(obj1); console.debug(obj2); */ if( obj2.type === 'zombie' ) { // Games end this.gameEnded = true; // Stoping zombies for( var i = 0; i < this.zombiesCount; i++ ) { var currZombie = this.zombiesManager[i].spr; if( currZombie ) { currZombie.body.velocity.x = 0; currZombie.body.velocity.y = 0; } } // Calling Game over this.onGameover(); }},I don't even know how to start debugging this error. The dev console doesn't show the collision or errors. Is there any reported bug where the collisions suddenly stop working? Overlap isn't working either I can't figure out why the collisions are deactivated... this.zombies.forEach(function(collectible){ if(,collectible)) { this.collisionHandler(this.player, collectible); }}); Thanks in advance.
  6. Hi! I'm not sure about the problem, but i'm going to sugget some changes in your code to discover the problem... index.html <html><head> <title>HTML5</title> <script src="phaser.js"></script> <style> body{margin:0; position: absolute; width: 100%; height: 100%;} canvas{margin-left: 15%; margin-top: 8%;} </style> <script src="game.js"></script></head><body> <div id="gameContainer"></div> <!-- The game container --> Deaths: <span id="deaths"></span><br> Rounds: <span id="rounds"></span></body></html>The js file window.onload = function(){ // var windowWidth = document.body.clientWidth; // var windowHeight = document.body.clientHeight; var deaths = -3; var game = new Phaser.Game(900,480,Phaser.CANVAS,"gameContainer", {preload: onPreload, create:onCreate, update:onUpdate});...What are you seeing in the dev console? Try this, maybe it works.
  7. Hi! If "bounce" it's a tween... var bounce = game.add.tween( object ).to().start();For 1.1.3 bounce.onCompleteCallback( function() { this.removeTween(scoreText);});For 1.1.4 (Only available on dev branch) bounce.onComplete( function() { this.removeTween(scoreText);});I hope it helps!
  8. Hi! I've moved that lines below the "target" line and it works! Thanks
  9. Hi everyone! I've downloaded the 1.1.3 min version and added into my project, but i'm getting the following error: Uncaught TypeError: Cannot read property 'style' of null - line 21670.I was looking for the bug, it seems that "target" variable, where the code says: document.getElementById(parent) is a null value. Maybe i'm doing something wrong, but i've only changed the phaser.js file (build directory) from the 1.1.3 to 1.1.2. Thanks in advance, Regards.