Search the Community

Showing results for tags 'phaser'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 3,368 results

  1. I'm currently working on a project myself. Basically as a hobby. Yet I feel it might have potential someday. Therefor I'm willing to invest in myself and this game by hiring help. The goal is to help and guide me. Not to make the game. Obviously I might be helpful if you can provide snippets or classes when I'm really struggling I guess the skills needed are; Phaser 3 TypeScript webpack something about nodejs; express / socket.io I can pay in various ways. Either just cash (transfer, paypal whatever) or help and guidance in things I'm actually good at; (PHP, hosting, devops).
  2. Hey! Did anybody compare Phaser and pixi for performance? We're going to make isometric game. bottom line is about objects you could render per screen. What do you think? What to choose? Phaser 2, PIXI, or maybe Phaser 3? Need the canvas renderer of course, not webgl. Update: I've the same question in the phaser slack channel. It seems that the PIXI would be better for isometric game then Phaser 2.
  3. Guppy Gem

    Guppy Gem

    Game Link: Guppy Gem About the game: Guppy gem is a maze game where guppy moves through a maze to reach the gem while avoiding moving obstacles. Play the game at http://www.hiteagames.com/ Video Imgur: https://imgur.com/mM9NqUa Youtube: https://youtu.be/SROEl_P29Vg This is my first time making a game. Enjoy!
  4. StarMines is a space shooter inspired by old classics like Asteroids and Omega Race. You are the spaceship pilot in search of magical Bonusoids which can only be found in the endless starmine fields full of dangers. The more Bonusoids you catch, the better their magical forces make your ship. The game should be playable on mobile with touch controls and desktop with keyboard or mouse. I have even tested it with an LG OLED TV, it works πŸ™‚ On touch devices, there are different options for touch controls which you can choose from the top-right pause menu. The game URL: https://smtng.jpkware.com/ New version on Jan 20, 2019: - music and ship upgrade sound added, reduced overall volume - ask for player name when always when starting a new game, changing name will reset progress - automatic 5 second shield for each 4 Bonusoids collected - more info messages on ship upgrades New game play video with music, and showing the new shield: Screenshots: A couple of YouTube videos: The SM:TNG is my ancient StarMines for Java rebooted using the HTML5 and modern tools: Scala JS and Phaser CE. I think the game is complete enough for public release now, but I'll most likely continue to develop it further in the coming months. Eventually, I plan to make it open source under GPL, unless somebody buys an exclusive license with big money πŸ™‚ All kinds of feedback welcome, for example: Does it work well on your browser? I recommend Chrome on Android and Chrome or Edge on Windows, but it should work OK with other browsers as well. Does it maintain 60fps? You can enable the fps meter on top-left corner with this URL: https://smtng.jpkware.com/#fps What do you think about the different control options? What could be improved? Ideas for new enemies, bonuses or weapons which would fit the theme?
  5. Hi, I am working on a phaser project in where the platforms are randomly generated. I followed: but now I'm having an issue making the platforms immovable, getting an undefined error: platforms = game.add.group(); platforms.enableBody = true; for(var i = 0; i < 15; i++){ createUniqueLocation(); } platforms.sort(); function createUniqueLocation(){ do{ var x = game.math.snapTo(game.world.randomX, 32) / 32; var y = game.math.snapTo(game.world.randomY, 32) / 32; if(y > 750){ y = 500; } var idx = (y * 17) + x; } while(locs.indexOf(idx) !== -1); locs.push(idx); platforms.create(x * 32, y * 32, 'platform', game.rnd.integerInRange(0,7)); } I saw something sort of similar where they made a function outside of the phaser canvas, whats the best way to make the platforms immovable? Thanks
  6. playh5

    Crossword Connect

    Hi guys I'm showcasing my phaser game here. It's a game like word scapes. Please enjoy thanks! Game name: Crossword Connect Appstore: https://goo.gl/MEsbW2 Web: https://www.crazygames.com/game/crossword-connect Framework: Phaser CE Looking for a paid work.
  7. B3L7

    Eternity Pilot

    Eternity Pilot is a mobile game made using Phaser 3 and Cordova. It is my first published game and it would have been totally impossible without Phaser and this amazing community! For now it is only available on Android but I am hoping to have an iOS version in the near future. I have a sign up on the site linked below to receive a notification when the iOS version comes out. Play Store https://eternitypilot.com Gameplay Video
  8. I am making a top down RPG styled game using Tiled and Phaser 3. I have already made a map in Tiled for the city and store. Also, I have already set the objects for the location of the store where the player is suppose to go in order to enter the store and the location where the player is supposed to appear. The thing I am having trouble figuring out the code I am suppose to use in order to facilitate this action, as well as going back to city map. One more thing, If there are any other ideas on how to go about this I am all ears.
  9. Xellpher

    Black flashes between game states

    Hi, I've encountered a strage problem while building a little, mostly static mobile game using Intels XDK, Cordova and Phaser (2.4.6). It's targeted at Android and uses the Crosswalk web runtime. I basically followed Matt McFarlands menu tutorial, and created States to do stuff like booting up, loading all assets, showing a splash screen, showing a menu, the levels etc. I'm using one Phaser.Graphics object per State to draw on (my game only needs a few geometric items). Additionaly I'm using the SaveCPU plugin to avoid unnecessary render cycles. Unfortunately removing it doesn't seem to remove the flashing problem. The stage.background is set to white, in the HTML part backgroud colors are also set to white. When moving from one State to the next I nevertheless get strange black flashes after entering the new State. Sometimes they cover the whole viewable area, sometimes they seem to be a black rectangle originating at the canvas center and covering only the lower right quadrant. I only get those flashes on mobile devices, they don't happen in a browser on a PC. I also observed that they seem to appear only after I add the Graphics object to a State, States whithout Graphics objects don't flash. Unfortunately I wasn't able to find out when exactly a flash occurs, but it seems to be either in or before/after init(), preload() or create(). The typical structure of my States looks like that: MyState = function () {} MyState.prototype = { init: function () { game.stage.backgroundColor = "#FFFFFF"; this.graphics = game.make.graphics(0, 0); // do some more stuff, initialise variables etc. }, preload: function () { this.graphics.alpha = 0; this.graphics.width = game.global.canvasWidth; this.graphics.height = game.global.canvasHeight; // do some more stuff }, create: function() { // do some more stuff game.add.existing(this.graphics); // do some more stuff, set up input handlers etc. // graphics fade in game.add.tween(this.graphics).to({alpha: 1}, 1000, Phaser.Easing.Quadratic.Out, true); // rendering was set to 60 FPS in the previous state (probably unnecessarily), // as long as there are active tweens forceRender() of the SaveCPU plugin is called in update() game.global.saveCpu.renderOnFPS = 0; }, update: function () { if (game.global.saveCpu.renderOnFPS === 0 && game.tweens.getAll().length > 0) game.global.saveCpu.forceRender(); }, render: function () { this.graphics.clear(); // draw stuff like menu buttons game pices etc using graphics drawing methods }, // [ ... more methods for state specific stuff ... ] moveToNextState: function (stateName) { // fade out the graphics and move on to the next state game.global.saveCpu.renderOnFPS = 60; var theEndTween = game.add.tween(this.graphics).to({alpha: 0}, 1000, Phaser.Easing.Quadratic.Out, true); theEndTween.onComplete.add(function () { game.state.start(stateName, true, false); }, this); } } So I wonder if anybody has an idea about what causes the flashes and how I may avoid them?
  10. Jacobboogiebear

    Area of screen the slows physics

    I need an area where like half the screen will only do 50% the normal physics calculations! This will be useful for items inside water areas
  11. MC_CatMaster

    Collisions not detecting with Phaser

    I've started using the Coding with Chrome extension to code Phaser on my Chromebook. I've added gravity and I'm trying to detect when things collide using physics.arcade.overlap(), but the function I provide for when it collides is never called. What I do is I make a matrix of objects and then detect collisions between each of them and the player. I think there's a better way to do this with groups but I'll look into that later. Here's my code: var player, map, mapObjs; map = [['b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b'], ['b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b'], ['b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b'], ['b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b'], ['b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b'], ['b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b'], ['b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b'], ['b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b']]; mapObjs = new Array(map[0].length); var game = new Phaser.Game(768, 768, Phaser.AUTO, 'Unnamed Game'); game.state.add('main', { preload: function(e) { game.load.image('background', '{{ file:background.png }}'); game.load.image('player', '{{ file:download.jpeg }}'); game.load.image('block', '{{ file:Brick_Block.png }}'); }, create: function(e) { if (navigator.userAgent == 'CwC sandbox') {game.time.desiredFps = 30;} var backgroundImage = game.add.image(0, 0, 'background'); backgroundImage.width = 768; backgroundImage.height = 768; player = game.add.sprite(50, 100, 'player'); game.physics.startSystem(Phaser.Physics.ARCADE); game.physics.arcade.enable(player); player.body.gravity.y = 9; player.body.bounce.y = 0.1; player.width = 100; player.height = 100; player.body.collideWorldBounds = true; for(var i = 0; i < map[0].length; i++) { mapObjs[i] = []; for(var j = 0; j < map.length; j++) { mapObjs[i][j] = game.add.sprite(32*i, 300+32*j, 'block'); mapObjs[i][j].width = 32; mapObjs[i][j].height = 32; } } }, input_: function(e) { }, update: function(e) { this.input_(e); for(var i = 0; i < mapObjs.length; i++) { for(var j = 0; j < mapObjs[i].length; j++) { game.physics.arcade.overlap(player, mapObjs[i][j], function(object1, object2) { console.log('hi'); // This never happens for some reason even thought the objects are visibly overlapping player.body.gravity.y = 0; player.body.accelerationY = 20; }, null, this); } } }, render: function(e) { }, }, true); game.state.start('main'); The '{{ file:background.png }}' is just the way that the editor references images so you can ignore it.
  12. Hello everyone. I have built a game using Phaser. On game over, the players high score is recorded in a variable (this.inputScore). To submit their high score to the server, the player clicks a button that takes them to an Index.html page where there is a form they fill in. To avoid cheating, I want the high score variable to be passed from the game's JavaScript file (Game.js) to an input value on the form as a read only value. I have created a function (assignValue) inside the Game.js file to execute this task, but because of it's scope I cannot get the function to be read by the Index.html file. When I place the function at the top of the Game.js script (globally) the Index.html reads the function and executes it accordingly (but with a hard-coded value for testing purposes.) How can I get the Index.html file to read my assignValue() function and pass this.inputScore to the input value in Index.html? Any help would be greatly appreciated - still learning. Thanks. Game.js file: //INDEX.HTML READS THE assignValue function BELOW (WITH A HARD CODED VALUE FOR TESTING) AND //APPLIES IT BECAUSE IT IS IN GLOBAL SCOPE. BUT I NEED THE VALUE TO BE A VARIABLE TAKEN FROM THE //assignValue FUNCTION INSIDE THE GAME CODE. SEE GAME CODE BELOW: function assignValue() { document.getElementById("inputScore").value = 127; }; //GAME CODE var CrystalRunner = CrystalRunner || {}; CrystalRunner.GameState = { init: function() { //...code here }, create: function() { //...code here }, update: function() { //..code here //check if the player needs to die if(this.player.top >= this.game.world.height && this.counter === 0 || this.player.left <= 0 && this.counter === 0) { this.gameOver(); } }, gameOver: function(){ this.game.time.events.stop(); this.player.body.enable = false; //..code here this.updateHighscore(); //..code here }, updateHighscore: function(){ this.highScore = +localStorage.getItem('highScore'); if(this.highScore < this.myScore){ this.highScore = this.myScore; this.inputScore = this.highScore; this.congrats = this.game.add.sprite(this.game.world.centerX-193, this.game.world.centerY-20, 'congrats'); this.congrats.inputEnabled = true; this.congrats.fixedToCamera = true; this.submitScoreButton = this.game.add.sprite(this.game.world.centerX-135, this.game.world.centerY+100, 'submitScoreButton'); this.submitScoreButton.inputEnabled = true; this.submitScoreButton.fixedToCamera = true; this.submitScoreButton.events.onInputUp.add(function() { window.location.href = "index1.php"; }, this); } localStorage.setItem('highScore', this.highScore); }, //THE FUNCTION BELOW IS NOT BEING READ BECAUSE OF SCOPE. HOW TO I MAKE INDEX.HTML READ IT? assignValue: function() { document.getElementById("inputScore").value = this.inputScore; }, }; Index.html file: <?php require_once 'dbconnect.php'; ?> <!DOCTYPE html> <html lang="en"> <head> <title>Crystal Candy Game Login</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css"/> <link href="css/style.css" rel="stylesheet"> <script type='text/javascript' src='js/jquery-2.2.3.min.js'></script> <script> $(window).on('load', function() { $('#status').fadeOut(); $('#preloader').delay(350).fadeOut('slow'); $('body').delay(350).css({'overflow':'visible'}); }) </script> </head> <body onload="assignValue()" class="bg"> <div id="preloader"> <div id="status">&nbsp;</div> </div> <div class="wrapper"> <div class="texte"> <header> <h1>SUBMIT YOUR SCORE</h1> <img id="logo" src="assets/images/logo.png"> </header> <p>Submit your highscore and you could stand a chance to win a prize!</p> </div> <div id="main"> <form id="form-style" method="post" action="crystalhandle.php" autocomplete="off"> <div class="form-group"> <label class="header-text"><span>First Name</span></label> <input class="form-control" type="text" id="name" name="username" placeholder="Name" title="Please enter your Firstname" required=""> </div> <div class="form-group"> <label class="header-text"><span>Surname</span></label> <input class="form-control" type="text" id="name" name="surname" placeholder="Surname" title="Please enter your Lastname" required=""> </div> <div class="form-group"> <label class="header-text"><span>Email</span></label> <input class="form-control" type="email" id="email" name="email" placeholder="Mail@example.com" title="Please enter a Valid Email Address" required=""> </div> <div class="form-group"> <label class="header-text"><span>Phone</span></label> <input class="form-control" type="tel" id="name" name="phone" placeholder="Phone" title="Please enter your Phone No" required=""> </div> <div class="form-group"> <label class="header-text"><span>Score</span></label> <input class="form-control" type="tel" id="inputScore" name="score" value="" readonly> </div> <!-- I need the above input value to have the variable from assignValue inserted into it--> <div class="w3ls-btn form-group"> <div class="wthreesubmitaits"> <input type="submit" name="signup" id="reg" class="button" id="next1" value="Send" style="font-family: sans-serif; font-size: 17px; font-weight: bold;" </div> </div> </form> </div> </div> <script type="text/javascript" src="js/phaser.min.js"></script> <!--the below js file is where assignValue() is defined:--> <script type="text/javascript" src="js/states/Game.js"/></script> </body> </html>
  13. Hey Guys I have a few eCards created in Phaser. Chrome 66 update has messed up the music and I need these fixed urgently for Christmas. Please help! Check some of the cards out here: https://ekarda.com/corporate-christmas-ecard/ https://ekarda.com/ekarda-gallery/corporate-holiday-ecards/ I think we have around 10 that need fixing. Please contact me initially via: https://ekarda.com/contact with pricing and suggested turn around time. I need this started immediately and completed QUICKLY as we supply cards for Christmas
  14. quiphop

    [WIP] Bumgineer Demo

    Heya everyone! I've just released my game (demo/beta) It's a sci-fi clicker/rpg/point-and-click adventure about the scientist in a parallel dimension It's available on play Market https://play.google.com/store/apps/details?id=com.quiphop.bumgineer Also You can play it in the browser (mobile-friendly) https://quiphop.itch.io/bumgineer It's absolutely free (screw ads!) I'll appreciate any feedback Enjoy! ps: the game made with Phaser. Thank You Rich for ability to create own worlds
  15. Walk without stepping on the line! The time limit is randomly from 15 seconds to one minute. Extend the record as long as possible.Once the walking distance per meter the earth will be saved (it is supposed to be). Even if the earth is safely saved, you will not get items or proceed to the next level. Even so, you should be happy that the earth was saved anyway.If you step on the line the distance is invalid and it will not be recorded. And the Earth will be destroyed once (it is supposed to be!). https://motquu.itch.io/earth-will-be-saved
  16. Hi everyone, Looking for some advice on the approach to coding multiple powerups/upgrades. I have googled how to do this but most answers are in c#/java or based on unity so I have trouble understanding what there doing. I am making a geometry wars/asteroids clone and I am giving the player upgrades when they defeat a boss or reach certain multipliers/kills. The problem is that I am having to change lots of code and using lots of if statements to see if a powerup has been activated then changing the bullet effect and then having to change the collision function for the bullets hitting the enemies so that each powerup does something different. For example in my powerup file (handles bullet changes when new power is activated and powerup pick ups) I add more if statements to the bullet logic to change for example the bullet speed and texture then I go into the file that handles collisions and make changes to the bullet / enemies function so that if the bullet is a fire bullet for example, the enemies particle effect is changed to red from blue. I know there are better ways to do this but I'm not sure how in javascript (or any language) any help would be really appreciated some code: powerups.js (bullet logic handler function for special bullets) const scene = this.scene; const utils = this.utils; const player = scene.player.sprite; if (bullet && utils.playerDied === false) { if(utils.explodingBullet) { if(utils.specialLevel > 1) { utils.bulletSpeedSpecial = 120; } else { utils.bulletSpeedSpecial = 250; } bullet.setTexture('explodeBullet'); } else if(utils.flameBullet) { utils.bulletSpeedSpecial = 75; bullet.setTexture('orange'); if(utils.specialLevelCheck === false) { utils.specialLevelCheck = true; scene.flameEmitter.explode(); } if(utils.specialLevel > 1) { player.setTexture('playerO'); scene.playerTrailEmitter.setFrame(['white', 'orange']); } } else { bullet.setTexture('bullet'); player.setTexture('player'); scene.playerTrailEmitter.setFrame(['white']); } bullet.fire(player, scene.reticle); utils.lastFiredSpecial = time + utils.bulletSpeedSpecial; scene.physics.add.overlap(scene.baddieGroup, bullet, scene.callBacks.shootingBaddies, null, scene);
  17. I have made a map in Tiled and I have a already generated a JSON. Whenever I try to load the map in Chrome and it load only a black screen. When I went to inspect the website there are warning like: No data found in the Json tilemap from Tiled matching the tileset name "RunItUpCity" Cannot create tilemap layer, invalid layer ID given: Bottom Layer TilemapParser.ParseTiledJSON - Layer compression is unsupported, skipping layer 'Bottom Layer' Also, I got an Error that read: Uncaught Type Error: cannot read property 'setCollisionProperty' of null Does anyone think that there is a problem with the map or the code? Here is the JavaScript code if anyone needs it. const config = { type: Phaser.AUTO, width: 800, height: 600, parent: "game-container", pixelArt: true, physics: { default: "arcade", arcade: { gravity: { y: 0 } } }, scene: { preload: preload, create: create, update: update } }; const game = new Phaser.Game(config); let cursors; let player; let showDebug = false; function preload() { this.load.image("tiles", "../assets/tilesets/RunItUpCity.png"); this.load.tilemapTiledJSON("map", "../assets/tilemaps/GetawayCity.json"); // An atlas is a way to pack multiple images together into one texture. I'm using it to load all // the player animations (walking left, walking right, etc.) in one image. For more info see: // https://labs.phaser.io/view.html?src=src/animation/texture%20atlas%20animation.js // If you don't use an atlas, you can do the same thing with a spritesheet, see: // https://labs.phaser.io/view.html?src=src/animation/single%20sprite%20sheet.js this.load.atlas("atlas", "../assets/atlas/atlas.png", "../assets/atlas/atlas.json"); } function create() { const map = this.make.tilemap({ key: "map" }); // Parameters are the name you gave the tileset in Tiled and then the key of the tileset image in // Phaser's cache (i.e. the name you used in preload) const tileset = map.addTilesetImage("RunitUpCity", "tiles"); // Parameters: layer name (or index) from Tiled, tileset, x, y const belowLayer = map.createStaticLayer("Bottom Layer", tileset, 0, 0); const worldLayer = map.createStaticLayer("Top Layer", tileset, 0, 0); const aboveLayer = map.createStaticLayer("Collision Layer", tileset, 0, 0); aboveLayer.setCollisionByProperty({ collides: true }); // By default, everything gets depth sorted on the screen in the order we created things. Here, we // want the "Above Player" layer to sit on top of the player, so we explicitly give it a depth. // Higher depths will sit on top of lower depth objects. worldLayer.setDepth(10); // Object layers in Tiled let you embed extra info into a map - like a spawn point or custom // collision shapes. In the tmx file, there's an object layer with a point named "Spawn Point" const spawnPoint = map.findObject("Objects", obj => obj.name === "Spawn Point"); Also, I will attach the JSON code to the post because it is 17000+ of code. GetawayCity.json
  18. Pilokio

    Phaser 2 Level switching

    Hi all, I have made a game where once the player reaches the end of it a new level should start but I'm not sure how to do this? I have set up multiple states such as a boot, load, game, main menu and the actual game. Is it possible to set up a state so that will switch to level 2 once the goal is reached? Here is my code for reference, any help is appreciated : (the win state takes the player to a menu that congratulates them, this is where I want the player to press a key and the next level can be loaded) //this game will have only 1 state var music; var score = 0; var scoreString = ''; var scoreText; var playState = { //initiate game settings init: function () { //adapt to screen size, fit all the game this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = true; this.game.physics.startSystem(Phaser.Physics.ARCADE); this.game.physics.arcade.gravity.y = 1000; this.cursors = this.game.input.keyboard.createCursorKeys(); this.game.world.setBounds(0, 0, 360, 700); this.RUNNING_SPEED = 180; this.JUMPING_SPEED = 550; }, //executed after everything is loaded create: function () { this.sfx ={ jump : this.add.audio('jump'), coin: this.game.add.audio('coin') }; music = game.add.audio('lvl1'); music.play(); //Score scoreString = 'Score : '; scoreText = game.add.text(175, 55, scoreString + score, { font: '34px Arial', fill: '#fff' }); scoreText.fixedToCamera = true; this.ground = this.add.sprite(0, 638, 'ground'); this.game.physics.arcade.enable(this.ground); this.ground.body.allowGravity = false; this.ground.body.immovable = true; //Parse the file this.levelData = JSON.parse(this.game.cache.getText('level1')); this.platforms = this.add.group(); this.platforms.enableBody = true; this.levelData.platformData.forEach(function (element) { this.platforms.create(element.x, element.y, 'platform') }, this); this.platforms.setAll('body.immovable', true); this.platforms.setAll('body.allowGravity', false); //fires this.fires = this.add.group(); this.fires.enableBody = true; var fire; this.levelData.fireData.forEach(function (element) { fire = this.fires.create(element.x, element.y, 'fire'); fire.animations.add('fire', [0, 1], 4, true); fire.play('fire'); }, this); this.fires.setAll('body.allowGravity', false); //coins this.coins = this.add.group(); this.coins.enableBody = true; var coin; this.levelData.coinData.forEach(function (element) { coin = this.coins.create(element.x, element.y, 'coin'); coin.animations.add('coin', [0, 1, 2, 3], 8, true); coin.play('coin'); }, this); this.coins.setAll('body.allowGravity', false); //goal this.goal = this.add.sprite(this.levelData.goal.x, this.levelData.goal.y, 'goal'); this.game.physics.arcade.enable(this.goal); this.goal.body.allowGravity = false; //create player this.player = this.add.sprite(10, 545, 'player', 3); this.player.anchor.setTo(0.5); this.player.animations.add('walking', [0, 1, 2, 1], 6, true); this.game.physics.arcade.enable(this.player); this.player.body.collideWorldBounds = true; this.game.camera.follow(this.player); this.barrels = this.add.group(); this.barrels.enableBody = true; this.createBarrel(); this.barrelCreator = this.game.time.events.loop(Phaser.Timer.SECOND * this.levelData.barrelFrequency, this.createBarrel, this); }, update: function () { scoreText.bringToTop(); this.game.physics.arcade.collide(this.player, this.ground); this.game.physics.arcade.collide(this.player, this.platforms); this.game.physics.arcade.collide(this.barrels, this.ground); this.game.physics.arcade.collide(this.barrels, this.platforms); this.game.physics.arcade.overlap(this.player, this.coins, this.collectCoin,null,this); this.game.physics.arcade.overlap(this.player, this.fires, this.killPlayer); this.game.physics.arcade.overlap(this.player, this.barrels, this.killPlayer); this.game.physics.arcade.overlap(this.player, this.goal, this.win); this.player.body.velocity.x = 0; if (this.cursors.left.isDown) { this.player.body.velocity.x = -this.RUNNING_SPEED; this.player.scale.setTo(1, 1); this.player.play('walking'); } else if (this.cursors.right.isDown) { this.player.body.velocity.x = this.RUNNING_SPEED; this.player.scale.setTo(-1, 1); this.player.play('walking') } else { this.player.animations.stop(); this.player.frame = 3; } if (this.cursors.up.isDown && this.player.body.touching.down) { this.sfx.jump.play(); this.player.body.velocity.y = -this.JUMPING_SPEED; } this.barrels.forEach(function (element) { if (element.x < 10 && element.y > 600) { element.kill(); } }) }, collectCoin:function(player, coin){ // Increase the score score += 20; scoreText.text = scoreString + score; this.sfx.coin.play(); coin.kill(); }, killPlayer: function (player, fire) { score = 0; music.stop(); game.state.start('die'); }, win: function (player, goal) { game.state.start('won'); music.stop(); }, createBarrel: function () { //Give me the first dead sprite var barrel = this.barrels.getFirstExists(false); if (!barrel) { barrel = this.barrels.create(0, 0, 'barrel'); } barrel.body.collideWorldBounds = true; barrel.body.bounce.set(1, 0); barrel.reset(this.levelData.goal.x, this.levelData.goal.y); barrel.body.velocity.x = this.levelData.barrelSpeed; } };
  19. Our team is looking for experienced HTML5 developers who are able to join our team immediately as remote freelancers. Duties will range from creating mini games, to full HTML5 games (using Phaser). With this in mind, we need a developer who is dedicated, hard working, extremely knowledgeable and who takes pride in his or her product. The position will start with a few simple minigame projects, and has plenty of room to grow for the right candidate into more work, including full html5 games, conversions and more. Payments are flexible and can be made in fixed, hourly or salary methods. Please note that first we will do a test work with you which will be a fixed pay job. Afterwards we can move to whichever method you would like. Good English speaking and communication is needed so that there is no communication failures. You may be asked to work in some, or all of the following areas. Please note that you do not have to have experience in all of the areas, and that is ok! However, Phaser knowledge is a must. We do not mind people with less experience, they are welcome to apply. Slack: With all projects, we do require a very open communication dialogue. We use Slack for our team conversations. HTML5: You will be converting and/or creating HTML5 games for mobile, tablet, and all platforms. Git Repository: Experience with GIT is a plus, but can train for this. Phaser: Phaser knowledge is a must! You should demonstrate a mastery with all of it’s features, and have titles in your portfolio using the framework. Our games are very small and simple. You will be provided with all the assets and straightforward logic of what has to be done. We concentrate on polish such as tweens, particles and little details that give life to each game. Having an eye for game design and well polished end results are critical! (We can help you achieve it). Once applied, I can explain it to you on what exactly we want here by showing you samples. The three biggest things we look for are excellent communication skills, the ability to not only develop exactly what is given to you, but also contribute new ideas and creative thinking, and finally timeliness. Its absolutely needed that work is always completed on time. Please mention your time zone when applying for the job. Please only apply if you are 100% sure that you can dedicate the time towards it. Please submit your portfolio and hourly wage requirements to jobs by mailing to vivekagrawal57 [at] gmail.com, thanks!
  20. Hello everyone, BlockTanks is a simple and explosive multiplayer tank game. Join other players in a fast-paced and destructive team deathmatch. Collect weapons and defeat the enemy team using strategy, cooperation, or good old-fashioned brute force. Play the game at blocktanks.net Features: Lobby with multiple maps and matches. Power ups like rockets, bombs, and flashbangs. An account system so you can track your stats and level up. Unlockable items such as stickers and decals. Made with Phaser and NodeJS, and hosted on AWS Lightsail.
  21. Hi, I'm new with Phaser, I'm wondering how can I create a group of enemies that appears at the side of the screen in a random Y position between 550px and 745 px, after they appear they need to start to fire to my character Right now I have a function to create the bullets and how they will be fired: createBullets:function(laserToFire,track,offsetX, offsetY, bulletDirection,fireRate,bulletSpeed){ weapon = gameSP.add.weapon(10, laserToFire); weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; weapon.bulletSpeed = bulletSpeed; weapon.fireRate = fireRate; weapon.trackSprite(track, offsetX, offsetY); weapon.fireAngle = bulletDirection;right } So what I'm looking to do is to have each one of my enemies within the group to fire to my character. Thanks in advance.
  22. https://tibibi.herokuapp.com/ This is a prototype for an HTML5 multiplayer game I'm making. This prototype is actually defunct as I'm now starting up a new game--a 3D multiplayer game, in fact. The data and experienced gained from the development of this prototype will be used for the success of the 3D multiplayer game. Some of the technical aspects: Initially, socket.io was used to establish real-time communication between the client and the server, but the ws WebSocket library was then migrated to. A client-server protocol of binary data is primarily used to share game state between the clients and the server. On the client-side, the Phaser game development framework is used to render the game and perform client-side collision detection. On the server-side, a small and simple custom made game headless game engine made with Node.js is used to manage game state and also distribute the game state to the connected game clients. How to play: To move, use the WASD keys. To shoot, aim with the mouse and press the left mouse button in the direction that you want to shoot in. You can shoot and eliminate other connected players, making them respawn after five seconds.
  23. Game Link: Vocab RPG Vocab RPG is an Online RPG about catching Monsters & collecting Vocabulary Cards! Features: Open world with unique zones to explore MMO: Online multiplayer Monsters: Hunt, battle, and catch many unique monsters! Crafting: Collect different resources and use them to craft items & consumables Language Learning: Unlock vocabulary cards! Currently 4 vocabulary languages to choose from: Chinese, German, Japanese, Russian Overview: In Vocab RPG, you have all the elements of a monster-focused RPG: Hunting, fighting, catching, levelling, crafting, etc. But for every action that you take in the game, it will show you a vocabulary card! As a consequence, the more words you know, the stronger you also become in the game. The game starts very slowly with only 3 words unlocked. But as you progress in the game, you can unlock more cards and expand your vocabulary - at your own pace. Difficulties: To take into account different learning preferences, you can pick your challenge by choosing from 4 difficulty settings: - Normal: Wrong answers reduce your monster's attack or consumables (such as potions) by 25%. - Casual: Even if you answer wrong, you will attack and operate at 100% effectiveness. In other words, you see the cards but there is no consequence for answering wrong. - Hardcore: When you answer wrong, your monster's attack will fail! So answering wrong means 0 damage dealt. - Off: I also want people to enjoy this game, even when they are not really in the mood for studying vocabulary cards right now.... select 'Off' and you will not see any vocabulary cards in the game! Platform: Thanks to the power of Phaser 3, you can play this game on any device in your browser. No installation required. The game is mobile optimized, so whether you play on your laptop or phone / tablet, is only a matter of your preference. Game Link: If you are interested in trying the game, you can jump right into it: Vocab RPG Feedback: Any feedback is much appreciated! We also have a Discord server for the game where players are exchanging ideas, reporting bugs, and giving feedback: Vocab RPG Discord Credits: The game uses a lot of CC0 assets (like the monster sprites in this post) from various artists. I keep a list of all used assets here (which is also accessible from directly inside the game): Credits List
  24. BunBunBun

    gunfight.io

    Hi Everyone, GunFight.io - original HTML5 multiplayer game. Select your team Counter-terrorists or Terrorists and have fun! Play Made with: Phaser + NodeJS server framework - custom version of Colyseus scheduled to add: 1) Multi-language support 2) May be bots? 3) Mobile device support. 4) More emotions. Any suggestion and feedback are welcome.
  25. I'm trying to add a bubble-pop spritesheet animation to my game. I have added other sprites fine, and when I add the sprite for the bubble, everything is still good. However, when I go to add the animations, I get an error, "Cannot read property 'add' of undefined. How can I animate the bubble? var config = { type: Phaser.AUTO, width: 1366, height: 768, parent: "canvas", scene: { preload: preload, create: create} }; var game = new Phaser.Game(config); function preload () { this.load.image('freeplayBG', 'images/freeplay-BG.png'); this.load.image('shark', 'images/nice-shark.png'); this.load.spritesheet('bubblePop', 'images/bubble_pop_under_water_spritesheet.png', {frameWidth: 394, frameHeight: 511} ); } function create() { //Set background this.add.image(685, 384, 'freeplayBG'); //Set shark and make draggable var shark = this.add.sprite(200, 300, 'shark').setInteractive(); this.input.setDraggable(shark); this.input.dragDistanceThreshold = 16; this.input.on('drag', function (pointer, gameObject, dragX, dragY) { gameObject.x = dragX; gameObject.y = dragY; }); //create the bubble sprite var bubble = this.add.sprite(700, 300, 'bubblePop'); console.log(bubble); //Sprite {_events: Events, _eventsCount: 0, scene: Scene, type: "Sprite", parentContainer: null, …} console.log(bubble.animations); // undefined console.log(this) //Scene {sys: Systems, game: Game, anims: AnimationManager, cache: CacheManager, plugins: PluginManager, …} bubble.animations.add('pop'); //error happens here bubble.animations.play('pop', 10, false, true);