Search the Community

Showing results for tags 'phaser.io'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 20 results

  1. Gaming Innovation Group (GiG) is seeking JavaScript game developers for its brand new in-house HTML5 iGaming studio in the heart of Marbella on the Costa Del Sol. If you have experience with JS frameworks such as PIXI and Phaser.io and have an interest in online games, then GiG offers an exceptional career opportunity for you. Job description and application links here: https://www.gig.com/careers/tech/front-end-game-developer/925233/ Learn more about GiG here: https://www.gig.com/
  2. I am trying to make a 'bullet' from the var weapon shoot in a certain direction, this bullet is actually a pokemon ball as I am just making a practice game. I cannot seem to make the 'bullet' go in the direction that I would like it to, I entered: weapon.body.velocity.x = -100; under the the: if (cursors.left.isDown) but this did not work, when I pressed any key the screen would just freeze. Please help me make the 'bullet' go in the direction I want. var items; var game; var player; var weapon; var cursors; var fireButton; function addItems() { items = game.add.physicsGroup(); createItem(100, 400, 'coin'); } function createItem(left, top, image) { var item = items.create(left, top, image); item.animations.add('spin'); item.animations.play('spin', 10, true); } function itemHandler(player, item) { item.kill(); } window.onload = function () { game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); function preload() { game.stage.backgroundColor = ('#424242'); game.load.spritesheet('coin', 'coin.png', 36, 44); game.load.spritesheet('player', 'hero.png', 64, 64); game.load.spritesheet('bullet', 'Pokeball.png'); } function create() { player = this.game.add.sprite(100, 200, 'player'); // ANIMATION FOR PLAYER CONTROLS down = player.animations.add('down', [0,1,2,3], 10, true); left = player.animations.add('left', [4,5,6,7], 10, true); right = player.animations.add('right', [8,9,10,11], 10, true); up = player.animations.add('up', [12,13,14,15], 10, true); // enable physics in the game (can't go through walls, gravity, etc.) game.physics.enable(player, weapon, Phaser.Physics.ARCADE); game.physics.startSystem(Phaser.Physics.P2JS); game.physics.startSystem(Phaser.Physics.ARCADE); game.physics.p2.enable(player, weapon); player.body.setSize(30, 45, 16, 12); player.body.immovable = false; // enable keyboard arrows for controls cursors = game.input.keyboard.createCursorKeys(); // camera will follow the character game.camera.follow(player); addItems(); // Creates 1 single bullet, using the 'bullet' graphic weapon = game.add.weapon(1, 'bullet'); // The bullet will be automatically killed when it leaves the world bounds weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; // Because our bullet is drawn facing up, we need to offset its rotation: weapon.bulletAngleOffset = 90; // The speed at which the bullet is fired weapon.bulletSpeed = 400; game.physics.arcade.enable(player); // Tell the Weapon to track the 'player' Sprite, offset by 14px horizontally, 0 vertically weapon.trackSprite(player, 30, 0, true); cursors = this.input.keyboard.createCursorKeys(); fireButton = this.input.keyboard.addKey(Phaser.KeyCode.SPACEBAR); } function update() { game.physics.arcade.overlap(player, items, itemHandler); // PLAYER CONTROLS player.body.velocity.set(0); // player presses left key if (cursors.left.isDown) { player.body.velocity.x = -100; player.play('left'); } // player presses right key else if (cursors.right.isDown) { player.body.velocity.x = 100; player.play('right'); } // player presses up key else if (cursors.up.isDown) { player.body.velocity.y = -100; player.play('up'); } // player presses down key else if (cursors.down.isDown) { player.body.velocity.y = 100; player.play('down'); } // player does not press anything else { player.animations.stop(); } if (fireButton.isDown) { weapon.fire(); } } function render() { weapon.debug(); } }
  3. Hi, I am trying to make a simple game and have been running into many problems. The problem I am facing now is that I cannot fix this error in my javascript. It says that it cannot read the 'setSize' property on my 'player' sprite, but it works perfectly fine on my other sprites. Next it says that it cannot read the 'velocity' property of the 'player' sprite, but when I comment out the 'setSize' property it works. I just cannot figure out what is wrong, have I misspelled something? I cannot seem to find the problem, so any help would be appreciated. Btw, it worked yesterday, but when I loaded it up today it was no longer working... Html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Simple Canvas Game</title> <link href="https://fonts.googleapis.com/css?family=Syncopate:700" rel="stylesheet"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> html { background: black } canvas { margin: auto; } h1 { font-family: 'Syncopate', sans-serif; color: rgb(194, 68, 91); text-align: center; margin: 0 auto; font-size: 25px; } h2 { color: white; font-size: 8px; font-family: 'Syncopate', sans-serif; } </style> </head> <body> <header> <h1>Crafty Heroes</h1> </header> <footer> <h2>&copy; SoulesteDesigns 2017</h2> </footer> <script src="phaser.js"></script> <script src="game.js"></script> </body> </html> game.js: // VARIABLES // variables for static objects var walls; var house; var gate; var gate2; // variables for character var cursors; var player; var left; var right; var up; var down; var game = new Phaser.Game(550, 540, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); // ADD HOUSES function addHouse(image) { house = game.add.physicsGroup(); house.create(-250, -240, 'greenhouse'); house.setAll('body.immovable', true); } // ADD FENCES OR WALLS function addWalls(image) { walls = game.add.physicsGroup(); // fences up top walls.create(-90, -200, 'fencefront'); walls.create(5, -200, 'fencefront'); walls.create(100, -200, 'fencefront'); walls.create(195, -200, 'fencefront'); // fences to right walls.create(288, -200, 'fenceright'); walls.create(288, -135, 'fenceright'); walls.create(288, -70, 'fenceright'); walls.create(288, -5, 'fenceright'); // fences at bottom walls.create(5, 59, 'fencefront'); walls.create(100, 59, 'fencefront'); walls.create(195, 59, 'fencefront'); // fences to left walls.create(-91, -200, 'fenceleft'); walls.create(-91, -135, 'fenceleft'); // set the walls to be static walls.setAll('body.immovable', true); } // PRELOAD IMAGES FOR ITEMS, PLAYERS, ETC. function preload() { // preload player game.load.spritesheet('player', 'hero.png', 64, 64); // preload houses game.load.image('greenhouse', 'greenhouse.png'); // preload fences game.load.image('fencefront', 'fencefront.png'); game.load.image('fenceleft', 'fenceleft.png'); game.load.image('fenceright', 'fenceright.png'); // fence that has adjusted hit boundary game.load.image('gate', 'fenceleft.png'); game.load.image('gate2', 'fencefront.png'); // preload ground game.load.image('ground', 'tiles2.png'); } // ADD THINGS TO GAME function create() { // set area that the player may travel to game.world.setBounds(-250, -250, 550, 550); // set background color game.stage.backgroundColor = ('#3c6f42'); gate = game.add.physicsGroup(); game.physics.startSystem(Phaser.Physics.ARCADE); gate = game.add.sprite(-91, -70, 'gate'); gate.name = 'gate'; game.physics.enable([gate], Phaser.Physics.ARCADE); // This adjusts the collision body size to be a 100x50 box. // 50, 25 is the X and Y offset of the newly sized box. gate.body.setSize(15, 90, -2, 3); gate.body.immovable = true; gate2 = game.add.physicsGroup(); game.physics.startSystem(Phaser.Physics.ARCADE); gate2 = game.add.sprite(-90, 59, 'gate2'); gate2.name = 'gate2'; game.physics.enable([gate2], Phaser.Physics.ARCADE); // This adjusts the collision body size to be a 100x50 box. // 50, 25 is the X and Y offset of the newly sized box. gate2.body.setSize(90, 15, 3, 3); gate2.body.immovable = true; // adding the ground var ground = game.add.sprite(-224, -100, 'ground', 1); var ground = game.add.sprite(-224, -60, 'ground', 1); var ground = game.add.sprite(-224, -20, 'ground', 1); var ground = game.add.sprite(-224, 20, 'ground', 1); var ground = game.add.sprite(-184, 20, 'ground', 1); var ground = game.add.sprite(-144, 20, 'ground', 1); // add player image and place in screen player = game.add.sprite(-232, -100, 'player'); player.smoothed = true; player.scale.set(.9); player.body.setSize(30, 40, 16, 16); player.body.immovable = false; // player will "collide" with certain images like walls and houses player.collideWorldBounds = true; // ANIMATION FOR PLAYER CONTROLS down = player.animations.add('down', [0,1,2,3], 10, true); left = player.animations.add('left', [4,5,6,7], 10, true); right = player.animations.add('right', [8,9,10,11], 10, true); up = player.animations.add('up', [12,13,14,15], 10, true); // enable physics in the game (can't go through walls, gravity, etc.) game.physics.enable([player, house, walls, gate], Phaser.Physics.ARCADE); game.physics.startSystem(Phaser.Physics.P2JS); game.physics.startSystem(Phaser.Physics.ARCADE); game.physics.p2.enable(player); // make sure to add this code to add items/walls/buildings addHouse(); addWalls(); // enable keyboard arrows for controls cursors = game.input.keyboard.createCursorKeys(); // camera will follow the character game.camera.follow(player); } // what happens when player does something function update() { // player will now collide with these images rather than pass over them game.physics.arcade.collide(player, house); game.physics.arcade.collide(player, walls); // PLAYER CONTROLS player.body.velocity.set(0); // player presses left key if (cursors.left.isDown) { player.body.velocity.x = -100; player.play('left'); } // player presses right key else if (cursors.right.isDown) { player.body.velocity.x = 100; player.play('right'); } // player presses up key else if (cursors.up.isDown) { player.body.velocity.y = -100; player.play('up'); } // player presses down key else if (cursors.down.isDown) { player.body.velocity.y = 100; player.play('down'); } // player does not press anything else { player.animations.stop(); } } function render() { game.debug.bodyInfo(gate2, 32, 32); game.debug.body(gate2); game.debug.bodyInfo(player, 32, 32); game.debug.body(player); }
  4. Scaling an image down

    How do I scale, or resize, an image in javascript with phaser's framework? I have tried a few different things but they do not seem to be working. I am using a weapon method to throw a pokeball, this is just a test using some code from phaser.io, so the other images aren't mine, I am just testing to try and get the pokeball to be thrown, but it is freaking huge right now! Please help me, I need the pokeball to be about 10x10 px because my character is 64x64. var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); function preload() { game.load.image('bullet', 'Pokeball.png', .01, .01); game.load.image('ship', 'tiles1.png'); } var sprite; var weapon; var cursors; var fireButton; function create() { // Creates 1 single bullet, using the 'bullet' graphic weapon = game.add.weapon(1, 'bullet'); weapon.scale.setTo(.5, .5); // The bullet will be automatically killed when it leaves the world bounds weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; // Because our bullet is drawn facing up, we need to offset its rotation: weapon.bulletAngleOffset = 90; // The speed at which the bullet is fired weapon.bulletSpeed = 400; sprite = this.add.sprite(320, 500, 'ship'); game.physics.arcade.enable(sprite); // Tell the Weapon to track the 'player' Sprite, offset by 14px horizontally, 0 vertically weapon.trackSprite(sprite, 14, 0); cursors = this.input.keyboard.createCursorKeys(); fireButton = this.input.keyboard.addKey(Phaser.KeyCode.SPACEBAR); } function update() { sprite.body.velocity.x = 0; if (cursors.left.isDown) { sprite.body.velocity.x = -200; } else if (cursors.right.isDown) { sprite.body.velocity.x = 200; } if (fireButton.isDown) { weapon.fire(); } } function render() { weapon.debug(); }
  5. I am looking to hire a HTML5 game developer to build Snooker and Billiards games. This is a paid assignment, we can work on a fixed fee or on hourly basis. Please mail your interest and portfolio to ram@digient.in
  6. I am developing a .io style massively multiplayer game by using phaser.io with firebase. You can try this game here: http://robobattle.net/ I also published this game on Play Store: https://play.google.com/store/apps/details?id=net.robobattle.robobattle
  7. Animating a tween with controls

    So I have a character (sprite) that whenever you press a key it'll move it along the y position and once it reaches the top, send it back down to the bottom. So I've been doing this game.input.keyboard.onDownCallback = function() { player.y -= game.height / 4 + 20 if (player.y < 0) { player.alignIn(laneRect_three, Phaser.CENTER); } }; I've been doing this. So basically, every key down move the player up and if it goes beyond the screen send it back down. So I want to add some nice animation to this. So instead of just jumping up, it kind of travels up so I've added a tween, currentPosFish = game.height / 4 + 20; game.add.tween(playerFish).to({ y: currentPosFish }, 1000, Phaser.Easing.Quadratic.InOut, true); But the thing with this is, it just sets it at the y position. How can I set a tween so it increments like what I was doing above?
  8. Restart state but keep saved variable?

    I'm doing a round based game. So after you've killed so many enemies it'll pop up, "Round 1", after some more, "Round 2" and so on. The amount of enemies doesn't change it's just the round that increases after you've killed say 20 enemies. I have a current variable at the top of my game.js file var currRound = 1; var EnemiesKilled = 0; Every time I kill an enemy I increment up the variable then in one of the collision handlers I do if EnemiesKilled == 20 then show some text newLevel.setText("Woo!! Round " + currRound + "!"); and restart the round via setTimeout(function() { game.state.start(game.state.current); }, 1000); The thing is, it whipes the variable of EnemiesKilled. How can I keep that variable so I always know how many enemies the player has killed?
  9. Could use some help/assistance

    Hey guys, I am fairly new to the Phaser.io game engine and so far I like it. I am making a game and have ran into some issues maybe you guys can help me or even show me some examples. Right now my goal is to make a screen box. So when an object interacts with another object a question box pops up and it has a question with buttons that represent possible answers. I am stuck on the making a box pop up with it happens. Any help is appreciated, -Fellow Dev
  10. [WIP] Runner Of Shadows

    This is my first game in Phaser.io to be published. This is a endless runner game, you can also submit your score in the leaderboard and beat other's highscore! You need to be fast as ninja because of obstacles and fast shurikens that will come to you, beware in the platforms, other platforms will get destroy. I have plans to add more in my game like Mini Games, Power Ups, Shop, etc... Play Now: Runner Of Shadows Enjoy! More Coming Soon... Also visit: http://oncollision.cf/ A Social Networking Website that I made. - CharlesCraft50
  11. New dev need help

    Hello everybody, I'm new at coding with phaser.io. I'm trying it on this first artistic project : http://94.23.13.72/agitprog/ On my computer, the animation is not fluid, but i can't understand why... Could you help me? My code looks like this: //PHASER var game = new Phaser.Game( parseInt($('#home-content-wrapper').css('width'))*80/100, parseInt($('#home-content-wrapper').css('height')), Phaser.AUTO, 'home-content-wrapper', { preload: preload, create: create, update: update, render: render }); function preload () { game.load.image('cercle_rouge', 'images/cercle_rouge1.svg.png'); game.load.image('triangle_bleu', 'images/triangle_bleu.svg.png'); game.load.image('barre_rouge', 'images/barre_rouge.svg.png'); game.load.image('carre_bleu', 'images/carre_bleu.svg.png'); game.load.image('barre_jaune', 'images/barre_jaune.svg.png'); game.load.image('rectangle_jaune', 'images/rectangle_jaune.svg.png'); } rotate_triangle = false; function create () { game.physics.startSystem(Phaser.Physics.ARCADE); var canvas_height = window_height - 220; var canvas_width = window_width * 80 / 100; //CERCLE ROUGE cercle_rouge = game.add.sprite(game.world.centerX, canvas_height*20/100, 'cercle_rouge'); cercle_rouge.anchor.setTo(0.5, 0.5); cercle_rouge.scale.setTo(0.45,0.45); //TRIANGLE BLEU triangle_bleu = game.add.sprite(canvas_width*18/100, canvas_height*19/100, 'triangle_bleu'); triangle_bleu.anchor.setTo(0.5, 0.5); triangle_bleu.scale.setTo(0.5,0.5); //BARRE ROUGE barre_rouge = game.add.sprite(canvas_width*10/100, canvas_height*38/100, 'barre_rouge'); barre_rouge.anchor.setTo(0, 0); barre_rouge.scale.setTo(0.5,0.5); //CARRE BLEU carre_bleu = game.add.sprite(canvas_width*21/100, canvas_height*60/100, 'carre_bleu'); carre_bleu.anchor.setTo(0, 0); carre_bleu.scale.setTo(0.5,0.5); //BARRE JAUNE barre_jaune = game.add.sprite(canvas_width*10/100, canvas_height*70/100, 'barre_jaune'); barre_jaune.anchor.setTo(0, 0); barre_jaune.scale.setTo(0.5,0.5); //RECTANGLE JAUNE rectangle_jaune = game.add.sprite(canvas_width*80/100, canvas_height*15/100, 'rectangle_jaune'); rectangle_jaune.anchor.setTo(0, 0); rectangle_jaune.scale.setTo(0.5,0.5); game.physics.enable([rectangle_jaune, barre_jaune, carre_bleu, barre_rouge, cercle_rouge ], Phaser.Physics.ARCADE); cercle_rouge.body.collideWorldBounds = true; cercle_rouge.body.bounce.set(1); //cercle_rouge.body.gravity.set(0, 180); carre_bleu.body.collideWorldBounds = true; carre_bleu.body.bounce.set(1); barre_rouge.body.collideWorldBounds = true; barre_rouge.body.bounce.set(1); //rectangle_jaune.body.velocity.setTo(-8, -8); //rectangle_jaune.body.collideWorldBounds = true; //rectangle_jaune.body.bounce.set(1);*/ setTimeout(animate_canvas, 3000); } function update() { if (rotate_triangle) triangle_bleu.angle += 0.1; // Note: Due to a bug in Chrome the following doesn't work atm: // sprite.angle++; // See: https://code.google.com/p/chromium/issues/detail?id=306851 } function render() { //game.debug.spriteInfo(triangle_bleu, 32, 32); // game.debug.text('angularVelocity: ' + sprite.body.angularVelocity, 32, 200); // game.debug.text('angularAcceleration: ' + sprite.body.angularAcceleration, 32, 232); // game.debug.text('angularDrag: ' + sprite.body.angularDrag, 32, 264); // game.debug.text('deltaZ: ' + sprite.body.deltaZ(), 32, 296); } animate_canvas = function(){ cercle_rouge.body.velocity.setTo(8, 8); barre_rouge.body.velocity.setTo(8, -8); carre_bleu.body.velocity.setTo(9, 0); rotate_triangle = true; } stop_canvas = function(){ cercle_rouge.body.velocity.setTo(0, 0); barre_rouge.body.velocity.setTo(0, 0); carre_bleu.body.velocity.setTo(0, 0); rotate_triangle = false; }
  12. Multiple Keys At Once

    I want multiple keys at once. If I use D + shift, the player will stop, how to fix it? SHIFT is to sprint the player and D is to walk the player on right side. This is my code: (game.input.keyboard.isDown(Phaser.Keyboard.A)) { if(carDriveV != 0) { car_1.body.velocity.x = -50; car_1.animations.play('c_drive'); } else if (boatDrive != 0) { boat.body.velocity.x = -50; facing = 'left'; boat.animations.play('boat_move_l'); } else { player.body.velocity.x = -50; if (facing != 'left') { player.animations.play('left'); facing = 'left'; } } } else if (game.input.keyboard.isDown(Phaser.Keyboard.D)) { if(carDriveV != 0) { car_1.body.velocity.x = 200; car_1.animations.play('c_drive'); } else if (boatDrive != 0) { boat.body.velocity.x = 50; facing = 'right'; boat.animations.play('boat_move_r'); } else { player.body.velocity.x = 50; if (facing != 'right') { player.animations.play('right'); facing = 'right'; } } } else if (game.input.keyboard.isDown(Phaser.Keyboard.SHIFT)) { if(carDriveV != 0) { carDriveV = 0; player.loadTexture('player'); game.camera.follow(player); player.body.x = car_1.body.x+130; } else if (boatDrive != 0) { } else { if (facing == 'left') { player.animations.play('sprint_left'); facing = 'left'; player.body.velocity.x = -150; } else { player.animations.play('sprint_right'); facing = 'right'; player.body.velocity.x = 150; } } }
  13. I'm a computing student and part of my course, I have to build a software for my final year project and I decided to create a web browser multiplayer game. So I decided to use phaserio and wanted to buy a book to learn it. the question is should i buy Interphase? or will interphase 2 be release this month? if its gonna be out this month, then probably its better to just wait? or any opinions? i only have pretty much 2 months to build the project so time does matter. what you guys think? suggestions?
  14. Hi we are a team of enthusiastic game builders, who are looking to make a difference in the gaming world. We are now looking for a talented individual who can help us in shaping the gaming world. I'm always confused what kind of job description would best catch the interest of a fronted game developer (phaser.io). Some points which I noted are: Good to mention about the company Mention the tech stack Mention the salary And ofcourse details about the job Please have a look and let me know if this seems intriguing. About Us: Based in Berlin, the creative capital of Europe, we produce casual instant win games to harness the convergence between lottery­ and casino­gaming. We believe that our players can have the best gaming experience if the team behind the games work in small, autonomous groups and control the whole process ­ from ideation to execution. This approach, together with a relentless focus on quality, has already allowed our games to achieve a run­rate of 20M+ within three months of going live. And now is your chance to be a part of our success story. Your Role: We’re looking for a frontend developer with a passion for development and new technology. If creating amazing user experiences for millions of player to enjoy is something that excites you, then this is the right opportunity for you. Us being an early stage startup, you will work closely with the core team of the company and are expected to have the entrepreneurial spirit with a "getting things done" attitude. Your Responsibilities: ● Work in a small team to design and create HTML5 games. ● Implement and maintain game clients. ● Create and maintain documentation. ● Maintain, iterate, and improve rolled out games. ● Keep up to date with new technologies and push us to adopt and evolve our technologies with such innovations. Must-­have Skills: ● Proficient with JavaScript. ● Great experience working with HTML5. ● Knowledge of ECMAScript 6. ● Knowledge of OOP and Design Patterns. ● Ability to write clean code. Nice-­to-­have Skills: ● Experience with libraries such as React.js, Pixi.js, Phaser.io. ● Knowledge of modern CSS. ● Work experience in game development, visually rich applications, or advertising industry. ● Experience working in agile project environments. Our Offer: ● An ultra­creative work environment. ● Access to all the modern tools of trade you will need. ● Long­term perspective towards our work and our biggest asset, our team! ● Flexible office hours. ● International company. No two employees from the same country, so far. ● Flat company hierarchy. The Salary Range would be approx. 50000 EUR You know that you are the right candidate we are looking for? Just mail us here and let’s get talking!
  15. I want to create a dynamic interfaces for items in an inventory. I need the items to be button to view that item. And want that button to calla function with the item id as an argument. inventory[index].button = game.add.button(inventory[index].x - (1030/2), inventory[index].y, 'equipmentButton', this.EquipItem, this); ... EquipItem: function(index) { };
  16. [Phaser] Mind the Gap!

    Hello All, This is my latest game called "Mind the Gap". The player needs to throw the disk and reach the end of the game area while avoiding the moving blocks. Here are some screens: And the live game: http://netgfx.com/trunk/games/mindthegap/ I hope you like it. Let me know what you think!
  17. How to make elements inside a group collide?

    Hi guys, Im creating this game using phaser.io. Can someone show me how to make objects inside a group collide with each other. Right now when i do, //board is the group and it has many elements //Floor is where all the elements fall to game.physics.arcade.collide(this.board, this.floor); All the elements inside the group stack on top of each other when they hit the floor at the same position. In other words the stack builds at one position, the latest one hiding the previous element and not upwards in the sense one on top of another at a higher position. How can i make the stack build upwards? If you could just show me how to make elements inside a group collide would be great. Thanks.
  18. Refresh chainedTween

    I have this chainedTween working fine: followPlayer: function() { //var path is recalculated ... var chainedTween = game.add.tween(this.enemy); for (var i = 1; i < path.length; i++) { chainedTween.to({ x: path[0] * this.tileSize, y: path[1] * this.tileSize }, 400 + Math.random() * 200); } chainedTween.start(); } Basically its an enemy following the player. Now I need to "refresh" the tween everytime the player moves. Since the player moves using keyboard keys, the keyboard key isDown event, besides moving the player, also calls the "followPlayer" function. So I added "game.tweens.removeFrom(this.enemy, true);" in order to refresh the tween, but the result was that the enemy don't move while the keyboard key is down, starting to move only when its released.
  19. phaser.io + cloud9 help(noob)

    Can someone please explain to me like I'm 5 years old how to make phaser.io run with cloud9? I've already cloned the github repos. into cloud9, but I'm not sure how I can host a server through that? I'm a google chrombook so I'm not able to download any type of .exe that would allow me to locally host a server.
  20. Hello guys, I'm here to show you my final project of my bachelor degree in Computer Engineering. The name of the project is Spectrum, and is a fully HTML5 based video game console that will run games in HTML5. The idea is the same of OUYA, but, with a different approach of systems and hardware. First, because it's a portable (ok, will be) and it's running on a Linux embedded in the Raspberry Pi platform, using Qt to handle with low level programming and the rest it's the good Tri-Force: HTML5 + JS + CSS. It's designed to run with ANY frameworks and engines released in the game market, so be free to develop your game as you wish! More information are comming and I'll keep you guys informed! In this video, I'm testing the controllers feedback, and it's running without lag, 100% of immediate response! I'm using melonJS but it's planning to be developed a "game" using Phaser and one other framework, to prove that my SDK and platform are generics! Here my site: www.grindsoft.com.br (pt-br only sorry ... I'll change this soon) Thank you for watching! https://www.youtube.com/watch?v=Xq0-rD18RNU