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
    • 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,275 results

  1. ArcadixInfotech

    box2d collision filtering with phaser

    Hello, Can anybody please tell me how box2d collision filtering works in JavaScript(box2dweb). I need balls to collide with player but not with other balls. There are example out there but they are in c++ or other language. I am newbie in gaming hence a silly question. Thanks.
  2. Vvalent

    [Phaser] HADRON

    You are the Large Hadron Collider, but are you the best Hadron Collider? --- This is my first complete game. It's far from perfect, but I put a good deal of work into it so I hope you guys enjoy it. Any comments or impressions are welcome. Play it here on Desktop or Mobile (recommended): https://ametrine.itch.io/hadron Details: Stack: JS (ES6) + Webpack + Babel Built with Phaser 2 (started development before v3 release) Source repo: https://github.com/JHAvrick/hadron
  3. ArcadixInfotech

    Texture in box2d rope/distance joint

    Hello, Is it possible to give a texture to box2d's rope or distance joint. I can see the joints in draw debug mode, but need something like an actual rope texture. Thanks
  4. I'm trying to create a pie chart with Phaser, using `graphics` to draw each slice of the pie (`graphics.arc(...)`). The problem is that when it renders I get (what I think) an unexpected result. I basically want to draw 3 slices the same size, the code I use looks something like this: function degToRad(degrees) { return (degrees * Math.PI)/180; } var total = 3; var width = 300; for (var i = 0; i < total; i++) { var radius = Math.floor(width / 2); var deg = 360 / total; var start = degToRad(i * deg); var end = degToRad((i + 1) * deg); graphics = game.add.graphics() graphics.beginFill(0xFF0000) graphics.lineStyle(2, 0x000000) graphics.moveTo(0, 0); graphics.arc(0, 0, radius, start, end, false); graphics.endFill() } I've created 3 fiddles to show the difference between a canvas, pixi and phaser based examples, each of them using the same process to draw the slices: canvas: https://jsfiddle.net/oL414v9t/1/ pixi: http://jsfiddle.net/ngma7snq/59/ phaser: https://jsfiddle.net/1ck39fos/1/ Does anyone know why this happens and how can I achieve what I want?
  5. I was trying with Phaser where i saw that this gets some kind of blurred when moving (ingame) Testet it in Canvas & WebGL both had the same result then i tried it to setting `pixelArt` to false in the gameconfig and when i tried it then, it worked smooth, but it seemd that it had activated some kind of antialiasing so it got washed-out but the moving was smooth Phaser 3.8 (Original) Tileset tiles 16x16 (no spaceing / margin) (Extruded) Tileset tiles 16x15 (1px margin / 2px spaceing) Map made with Tiled Vivaldi & Chrome & Windows Edge Tileset Extruder: https://github.com/sporadic-labs/tile-extruder Code Example / Project: https://github.com/hasezoey/phaser-tiled-test Original Question: https://github.com/photonstorm/phaser/issues/3685 (moved to here)
  6. Hi there. Does anyone had a pleasure to build a Facebook Instant Game? I've spent two days trying to scale my Phaser game in the Facebook for Android. Currently scaling works nicely on desktop, in a responsive viewport of the dev console, in the mobile Chrome -- namely everywhere, except the Facebook app. Seems like it just ignores my settings, sprites are displayed at full width, despite the canvas (and game) dimensions are correct. Here are my init and boot scripts, the scaling logic is copypasted from a random gist: // init code FBInstant.initializeAsync().then(function() { FBInstant.setLoadingProgress(50); FBInstant.setLoadingProgress(100); FBInstant.startGameAsync().then(function() { /** Config part */ var FIXED_SIZE = 720; var FIXED_MEASURE = 'Width'; /** Name mapping */ var fixedName = FIXED_MEASURE; var resName = fixedName === 'Height' ? 'Width' : 'Height'; var FIXED_NAME = fixedName.toUpperCase(); var RES_NAME = resName.toUpperCase(); /** Measures of document */ var documentElement = document.documentElement; var documentFixed = window['inner' + fixedName]; var documentRes = window['inner' + resName]; var ratio = documentRes / documentFixed; /** Canvas measures */ var canvasFixed = FIXED_SIZE; var canvasRes = FIXED_SIZE * ratio; var screen = {}; screen['CANVAS_' + FIXED_NAME] = canvasFixed; screen['CANVAS_' + RES_NAME] = canvasRes; console.log(screen.CANVAS_WIDTH); console.log(screen.CANVAS_HEIGHT); game = new Phaser.Game(screen.CANVAS_WIDTH, screen.CANVAS_HEIGHT, Phaser.CANVAS); game.state.add('Boot', Boot); game.state.add('Preload', Preload); game.state.add('GameTitle', GameTitle); game.state.add('Main', Main); game.state.add('GameOver', GameOver); //Start the first state game.state.start('Boot'); }); }); // boot code var Boot = function(game) {}; Boot.prototype = { preload: function() { }, create: function() { this.scale.scaleMode = Phaser.ScaleManager.EXACT_FIT; this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = true; this.game.scale.refresh(); this.game.state.start("Preload"); } } Would appreciate any help!
  7. We are buying a couple of HTML 5 Phaser (preferably Phaser 3) games. It could be of any categories and being Mobile Friendly is a must. If you are interested, plz drop a line and I will contact. Thanks, Yan
  8. Hello, Just a quick question. I want to kill any emitter particles that overlap with a sprite. I've tried: if(this.game.physics.arcade.overlap(this.emitter, this.sprite)) { this.emitter.removeChildAt(0); //and this.emitter.removeChild(); }
  9. Hi guys, We developed a game last year with phaser 2.3.0 and webgl, it worked fine on computer browsers and mobile devices. But since the last update of chrome for android (v53.0.2785.97), the screen is flickering until it becomes totally black, without any error or warning. The issue is present on mobile only, it worked on chrome for android v52, but not v53. We tried to upgrade to phaser 2.6.2, same issue on chrome for android v53. If we use Phaser.CANVAS instead of webgl, it works fine, but we prefer using webgl for performances. Does anyone encounter the same problem? Thanks for your help. Joe K.
  10. Hey everyone, I want to add different buttons with 2 different clickevents. If I add one button it works, if I add another one it doesn't. The Images and sounds are in my Preloader file and i tested them, so they work and aren't the problem. Any Solutions? Thank you! Game.Level0_5 = function(){}; var frido; var back; Game.Level0_5.prototype = { create:function(game){ back = this.add.sprite(game.world.centerX, game.world.centerY, 'hauptkirche'); back.scale.setTo(1.335,1); back.anchor.setTo(0.75, 0.5); frido = this.add.sprite(game.world.centerX, game.world.centerY, 'frido2'); frido.scale.setTo(0.5,0.5); frido.anchor.setTo(2.0, 0.67); this.createButton(game, " Das ist die Hauptkirche.\n \n Die Hauptkirche wurde 1085 erbaut.\n Bis zur Reformation war sie katholisch \n und wurde danach \n im Jahr 1560 evangelisch. \n Im Dreißigjährigen Krieg (1618-1648) \n wurde die Kirche zerstört \n und musste neu gebaut werden. \n \n Frage: \n Wann wurde die Hauptkirche zerstört? ", game.world.centerX +266, game.world.centerY + 155, 268, 900.0,); var button = game.add.button( game.world.centerX+265, game.world.centerY+45, 'aki', function() { this.game.sound.play('correctanswer'); this.state.start('Level1'); }, this, 0, 1, 2, 3); button.anchor.x = .5; button.anchor.y = .5; button.input.useHandCursor = true; }, var btn = game.add.button( game.world.centerX+200, game.world.centerY+60, 'bki', function() { this.game.sound.play('correctanswer'); this.state.start('Level1'); }, this, 0, 1, 2, 3); btn.anchor.x = .5; btn.anchor.y = .5; btn.input.useHandCursor = true; }, update: function(){ }, createButton:function(game, string, x, y, w, h, callback) { var button1 = game.add.button(x, y, 'button1', callback, this, 2, 1, 0); button1.anchor.setTo(0.5, 0.6); button1.width = w; button1.height = h; var txt = game.add.text(button1.x, button1.y, string, { font: 'bold 14px palatino linotype', fill: '#0000000', align:'center', wordWrap: true, wordWrapWidth: 600 }); txt.anchor.setTo(0.5, 1.5); } };
  11. Hi everyone! After one year and a half of hard work, I finally have the great pleasure of introducing my game, On the Way to Nemroth (OWN)! OWN is a deathmatch game in 1v1, 2v2 and 3v3 with fast-paced games under 3min. Gameplay-wise, it's a crossover between MOBAs (you control one hero with a limited skillset) and Brawlers (maps are small, action pretty intense). You can watch the trailer here : The competitive side has been polished, (league system, no random mechanics, depth of gameplay etc.), but you can also play casually in normal or private games. Because games are super short, you can use OWN to fill in idle times (like a League of Legends matchmaking, for example) or you can play more seriously and try to rank up the ladder. Money-wise OWN is 100% free-to-play, 0% pay-to-win and contains no ad. It's pay-to-customize. You will have all heroes for free, and you will win virtual currency and chests as you play. By the way, I've created a promo code which will unlock you 1000 gold coins at registration : PHASER ! And with registration also comes a free legendary chest! Regarding the technologies, OWN uses Phaser and Node for the pvp games, and React for the social part. But enough talking, here are the important links : The game HERE ! Testing the game without registering HERE ! Don't forget to follow us on social medias : Facebook Twitter Youtube Discord
  12. The Issue Text object is getting cut-off / cropped at the top and sometimes on the bottom, when using a custom font with a narrow width. (screenshot attached) The fonts in question work correctly in every other environment, and even work with HTML canvas and the regular getContext method of adding text. So i'm fairly positive the issue is isolated to Phaser using HTML canvas. Possible Cause I think issue is most likely happening due to the way Phaser/PIXI calculates the height of text from the width of letters. Possibly using the width of the widest letter and assuming the height? I tried to work out what the source code is doing. Current Workaround The only workaround i've found is rebuilding the font and adding a wide margin to each letter (so the letter boundaries are more 'square'), then in Phaser splitting a Text object into individual Text objects for letters and calculating their position based on letter width, and manually subtracting a value to change the letter spacing. But even splitting and repositioning doesn't work that well (with any font, not just thin fonts) i have to calculate separate margins for even thinner letters like 'I', 'i', or 'l', or wide letters like 'm' and 'w'. I would rather not use BitmapText as i need to use different font sizes. Solutions Has anybody else encountered this issue? Found a solution or a better work-around? Thanks.
  13. We’ve been working part-time on our own take on the IO game for close to a year. Exocraft is an action/strategy persistent MMO that is focused around more depth and progression than most IO games. You start as a small mining vessel and build up your unique ship using dozens of available parts. Team up with others to mine and battle planetary defenses on a dying alien world for resources, or compete in skirmish-style tournaments to reach the top. The game is built with Phaser-CE on the client and uses a custom server built with Node.js, MongoDB and Redis -- backed by our own GoldFire platform for signup/login, communication, achievements, etc. All players are in the same world, so there are no servers to choose from. As more players come online, the world will dynamically size up and down to fit the number of players and maintain resource balance. You can play now at https://exocraft.io, and any feedback is greatly appreciated!
  14. So i'm trying to switch scenes when a tween is complete, however i get the titular error 'Cannot read property 'start' of undefined' , and i don't know why this is... Here's the code: class StartScreen extends Phaser.Scene{ constructor(){ super({key: "StartScreen"}); } preload() { this.load.image('Logo', 'assets/Logo.png'); this.load.spritesheet('background', 'assets/backs.png' , { frameWidth: 480, frameHeight: 320 }); } create() { this.anims.create({ key: 'stars', frames: this.anims.generateFrameNames('background', { start: 0, end: 127 }), repeat: -1 }); this.add.sprite(1024/2 , 400, 'background').play('stars', true).setScale(2.5); this.logo = this.add.image(1024/2 , 300, 'Logo').setScale(2); this.text = this.add.text(320, 450, 'Push Enter', { font: '50px NES', fill: '#FFF'}); this.enter = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.ENTER); } update(){ if(this.enter.isDown){ this.text.destroy(); this.enter = ''; this.tweens.add({ targets: this.logo, y: 150, duration: 2000, onComplete: this.onCompleteHandler }); } } onCompleteHandler(){ this.scene.start('MainMenu'); } } class MainMenu extends Phaser.Scene{ constructor(){ super({key: "MainMenu"}); } preload() { this.load.image('Logo', 'assets/Logo.png'); this.load.spritesheet('background', 'assets/backs.png' , { frameWidth: 480, frameHeight: 320 }); this.anims.create({ key: 'stars', frames: this.anims.generateFrameNames('background', { start: 0, end: 127 }), repeat: -1 }); this.add.sprite(1024/2 , 400, 'background').play('stars', true).setScale(2.5); this.add.image(150 , 300, 'Logo').setScale(2); } create() { } }
  15. dontHaveName

    disableVisibilityChange in Phaser 3

    Hi, what's an equivalent of stage.disableVisibilityChange in Phaser 3? I don't want to stop all tweens after I switch between tabs.
  16. Mike

    Game list of phaser games

    Edit by Rich (September 2016): Back in 2013 Mike created a web site (below) that allowed Phaser devs to list the games they'd made. You'll find over 400 games created with some of the earliest versions of Phaser. Lots of the links don't work any more, but some do, and it's a really interesting archive. It's not worth submitting your games to the list any longer, however I'm keeping it, and this thread, because people still post new games to this thread even today. If you do this, it's highly likely I'll see it, and add it to the Phaser web site. Mike's original message follows: ------------------------------------------------------------------------------------------------------------------- What I did started from personal need, but decided to share it and maybe improve it if it went bigger. Well since the engine is still new but there is quite a moving and I check every topic, and game that is made I have a phaser game list: http://pgl.ilinov.eu/
  17. this.game.physics.startSystem(Phaser.Physics.P2JS); this.game.physics.p2.setImpactEvents(true); var wallCollisionGroup = this.game.physics.p2.createCollisionGroup(); var playerCollisionGroup = this.game.physics.p2.createCollisionGroup(); var doorCollisionGroup = this.game.physics.p2.createCollisionGroup(); this.game.physics.p2.updateBoundsCollisionGroup(); // I've created all the necessary collisions as in expamle: https://phaser.io/examples/v2/p2-physics/collision-groups and it works perfect. player.body.collides(wallCollisionGroup); player.body.collides(doorCollisionGroup, wrongDoor, this); cursors = this.game.input.keyboard.createCursorKeys(); } wrongDoor() { player.body.velocity.x = 0; player.body.velocity.y = 0; //player.body.setZeroVelocity(); //player.body.velocity.x = -20000; //player.body.velocity.y = -20000; //player.body.static = true; result = 'You last hit: The wall :)'; this.game.displayDialogLine('Message', 'text'); } update() { player.body.velocity.x = 0; player.body.velocity.y = 0; if (cursors.left.isDown) { player.body.velocity.x = -300; } else if (cursors.right.isDown) { player.body.velocity.x = 300; } if (cursors.up.isDown) { player.body.velocity.y = -300; } else if (cursors.down.isDown) { player.body.velocity.y = 300; } } Hello. I'm making a game where player have to reach the right door and created all the necessary collisions and it works almost perfect, except the call back function wrongDoor. I want to create a dialog line when player collides wrong door and make his velocity = 0 while dialog line is on screen, but I can't. Every time player colldes the door dialog line displays on screen but the player sprite still moves. How can I make him stop on collision with door? All the //commented stuff I've tried and it didn't help. I tried to add this function in Update function but it triggers wrongDoor all the time and displays dialog line again and again from the start of the game. I've tried set velocity = -20000 but it doesn't set -20000 velocity, like it doesn't see the player. On screenshots I press up and right buttons so character moves up and right after wrongDoor triggers.
  18. kleepklep

    Seamless Audio Loops in Phaser

    I'm working on a game with seamless background music and figured I'd share my findings to help others. I'm just using Phaser's standard sound.play('', 0, 1, true) code to play loops. (Have since discovered I can also use sound.loopFull()). I didn't want to mess with outside solutions like seamlessLoop.js, which I'm not sure would work across all browsers anyway. Here's the run down on the file formats: OGG - Good for seamless loops in Firefox and Chrome. M4A - Good for seamless loops in iOS. When I first posted this I thought that I was stuck using the Apple Lossless codec (lossless = huge file sizes) because when I used any other M4A generating codec the resulting audio had blank space added at both ends. I wound up using the fre:ac open source audio converter which adds information for gapless playback according to its developer, who was extremely responsive and helpful (Thanks Robert!). Sure enough, the audio played seamlessly on my iPad with much smaller files. MP3 - Not good for seamless loops, but needed for IE. Even if your MP3 has no silence on either end, when the sound is done playing there will be a small audio gap before it loops. There are some techniques like the ones here that seem promising, so if I can overcome this issue I will post the code. Good for all other use cases because all browsers support it and it has the smallest file size of the three formats when exported with reasonable quality settings. So here's what I'm using to load my seamless loop audio. M4A is in a separate conditional because when I put it as the first option Firefox would load it instead of falling back to OGG and not play the sound. I'm loading all my other sounds as MP3s (in a different code block - not shown) to keep my total file size as low as possible. // load seamless intro audio loadLoop('musicIntro', 'intro_music_loop'); function loadLoop(key, file) { if (game.device.iOS || game.device.macOS) { game.load.audio(key, ['sounds/' + file + '.m4a']); } else { // Firefox and Chrome will use OGG // IE11 will fall back to MP3, which will have a small gap at the end before replaying game.load.audio(key, ['sounds/' + file + '.ogg', 'sounds/' + file + '.mp3']); } } Hope someone finds this helpful
  19. Is web camera access is possible in phaser 3? If yes. Any one can, please provide me a sample code. How to use webcam.js plugin with phaser 3 game, To access the system web camera.
  20. Hello Everyone, I'm a developer and eternal student(because in our field things evolve in a blink of eyes ) who has medium-advanced knowledge in Java, JavaScript, Bash scripting and somewhat recently(8 months), experiencing working using repositories, like GitHub, as you can checkout here https://github.com/Lypzis My current project(my final college project), the "Conquer Them All" is a 2d medieval strategy/action game based on the game "1066", I'm using Phaser and ElectronJS to develop. Even though it's a college project, nothing prevents it from growing out of the bounds. I've already started the coding part and used some dummy images for tests, but, since I cannot stick with dummy images forever, I'll need a person creating the design part in parallel. It's not necessary to be an expert( since I'm learning too ), so, if you know your way around with image editing tools like Gimp, Photoshop, Tiled or others and loves to create stuff, you are very welcome to join me! let me know if you're interested and we can exchange some ideas. Thanks for the attention, Lypzis
  21. Oliver77

    [phaser]Solitaire Jump it!

    Hi, I made a simple logic game, soon as App too. I want to publish it, does anyone have a good tip? The graphics could be better, am I right? Thanks for any feedback! Play it : http://mg-otterson.de/fileadmin/solitaire/game.html
  22. Evening Guys Im working on a game for an iso platform that houses several games. This platform handles the loading of assets and sends them back to my game as base64 assets. Im loading in 3 different types of assets: *XML *Sound *TextureAtlas my questions are these: 1) how can i load and play an audio file recieved as a base64 string? 2) how can i load and create a new XML object from a base64 string? 3) how can i create a game.load.atlasXML from base64 strings? any help or notch in the right direction is appreciated. thanks
  23. I would like to show you the game I am working on: Lier.io: https://lier.io It is a multiplayer shooter 2D (platformer) similar to old games like Liero, Soldat or Worms (a little). Game is written in html5 (Phaser 2) and now has not many features now. Playing: - moving soldier: W, A, S, D (can be changed in settings) - aiming & shoting: mouse (mobile playing is not finished yet) It would be great if you could write me what do you thing about it or maybe what problems do you have with the game.
  24. Impossible Snake is a game I've been working on (see posts here and here) and it's now available on the Android playstore. Impossible Snake on Coolmath Games: http://www.coolmath-games.com/0-impossible-snake Impossible Snake on Android Store: https://play.google.com/store/apps/details?id=com.bdrgames.impossiblesnake.ads Impossible Snake on kongregate - http://www.kongregate.com/games/BdRGames/impossible-snake Impossible Snake on newgrounds - http://www.newgrounds.com/portal/view/698543 It is a one-button game, meaning that you control the snake with only single taps on the screen. Every time you tap the snake will toggle between turning clockwise and counter-clockwise. Eat all apples to complete a level, the last three levels are almost impossible.. almost. There is also a VS multiplayer mode, where 2 players can compete on the same device. Player one taps on the top half and player two taps on the bottom half to control their snake. Eat the most apples to win.
  25. Rock Cat

    Nano Niels - Match 3 game

    Hi guys I just wanted to share a match 3 game i made with phaser last year. There are 40 levels no 'pay to win' and its quite difficult. www.nanoniels.com Kind regards Niels