• Content Count

  • Joined

  • Last visited

  1. On my wp site I do it like this: I put the game on a subdomain. Then I use the plugin iframe And the iframe shortcode on the page / article where you want to put the game. ex: [iframe src=http://subdomainmaybe.urlfthegamehere/" width="100%" height="500]
  2. var x; var y; newEquation:function(){ x = Math..... y = Math... } update:function(){ if(myInpunt == x+y) ... else ... }
  3. nodejs is a backend technology so it's running on your server not on the mobile
  4. Thank you valueerror. I though this solution but don't try it. Here is something close to my final code. this.playerBodySize = 50;this.player.body.setCircle(this.playerBodySize);this.player.body.setCollisionGroup(this.playerCollisionGroup);this.player.body.collides(this.ballCollisionGroup, this.hitBall, this);hitBall: function (player, ball) { this.playerBodySize += 10; player.sprite.body.setCircle(this.playerBodySize); player.body.setCollisionGroup(playerCollisionGroup); player.body.collides(ballCollisionGroup, hitBall, this);}You can check the result.
  5. Hello everyone, My school organize a game jam the 10, 11, 12 of April 2015. You can register here.
  6. Check this cool tut to learn more about recycling
  7. Hello, I want to increase my player body. this.physics.p2.enable(this.player, false);//I want to increase this bodythis.player.body.setCircle(50);this.player.body.setCollisionGroup(this.playerCollisionGroup);this.player.body.collides(this.ballCollisionGroup, this.hitBall, this);hitBall: function (player, ball) { //I try this way but I'm loosing my CollisionGroup. How to do it ? player.sprite.body.setCircle(100); }//thanks
  8. mrdotb

    Button Basics

    Hello create: function () { // I assume you have an image loaded with the key 'button' //So you add an image button = game.add.image(,,'button'); //enable click on it button.inputEnabled = true; //this mean when you click you call the function, this); }, somefunction: function () { //What you want to do }
  9. I think you need to use a local server to perform HttpRequest. Like wamp or lamp.
  10. Hi, You need to use group. Try something like this. function create(){ //Create o1 group o1 =; //make some loop here o1.create(1 * 50, 150, 'spritewith2frame'); o1.create(2 * 50, 150, 'spritewith2frame'); o1.create(3 * 50, 150, 'spritewith2frame'); game.physics.enable(this.o1); //Create o2 group o2 =; //make some loop here o2.create(1 * 50, 150, 'spritewith2frame'); o2.create(2 * 50, 150, 'spritewith2frame'); o2.create(3 * 50, 150, 'spritewith2frame'); game.physics.enable(this.o2);}function update(){ game.physics.arcade.overlap(o1,o2, function(o1,o2){ if (o1.frame == 0){ o1.frame = 1: } });}
  11. Hello everyone this is warped my third game, a platformer. Warp (my hero) appear after 10 sec i have no preloader for the moment so just wait If you have any suggestion or other thing you want to suggest about the game feel free .
  12. Thank you for you're help. Finally i use this code: //create the group APP.bullets =; bulletTabs = [//Then i add 2 bullets with the same sprite in case i fire more than 4 bullets APP.bullets.create(0, 0, "bullet1"), APP.bullets.create(0, 0, "bullet1"), APP.bullets.create(0, 0, "bullet2"), APP.bullets.create(0, 0, "bullet2"), APP.bullets.create(0, 0, "bullet3"), APP.bullets.create(0, 0, "bullet3"), APP.bullets.create(0, 0, "bullet4"), APP.bullets.create(0, 0, "bullet4") ];//i kill them for (i = 0; i < bulletTabs.length; i++) { bulletTabs[i].kill(); }APP.bullets.enableBody = true; game.physics.enable(APP.bullets);// And when i grab the bullet i usevar currentBullet = APP.bullets.getRandom(0, 8);
  13. Hello, I want to switch sprite or frame when i fire. I use this for the moment but it's only working when i load the game. It's possible to switch sprite or frame in createMultiple(quantity, key, frame, exists) ? APP.bullets =; APP.bullets.createMultiple(10, random_card()); APP.bullets.setAll('anchor.x', 0.5); APP.bullets.setAll('anchor.y', 1); APP.bullets.enableBody = true; game.physics.enable(APP.bullets);function random_card() { var bullet var rand = Math.floor(Math.random() * 3 + 1); switch (rand) { case 1: bullet = "bullet1"; return bullet; break; case 2: bullet = "bullet2"; return bullet; break; case 3: bullet = "bullet3"; return bullet; break; case 1: bullet = "bullet4"; return bullet; break; default: return "error!"; }}
  14. mrdotb

    wave movement

    It's working with, 80, function() { currentBullet.body.velocity.y = Math.sin( * 25; }, this);Thank you again for you're help lewster.