Search the Community

Showing results for tags 'phaser 3'.



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
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • 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 127 results

  1. Is it possible to reference the object I just created inside the arrow function to set the tint? I've tried using this but that just references the Scene.
  2. Hi there, I'm working on musical educational App (Phaser 3) where audio samples (notes) must be plaeyd in sequential mode. But when I leave page (game is running yet) and back in a few seconds I listen to all sounds simultaneously. It looks like they were accumulated in WebAudio buffer(?). I could stop playback if I know how to detect that my App (or Apps page) is active (in focus). Porobably its very simple thing, but I didn't find an answere, so I would be gratiful for any advice. video
  3. I wanted to know if it's possible to load an animated sprite in preload() and use it in preload(). Essentially I am trying to get an animal to run across the screen to mark the progression of loading. I have a simple graphic rectangle setup as a basic loading bar right now. If I try to update the position of the sprite with this.dog.x it throws an error that x is not a property.
  4. Just finished a math practice quest game for kids in Phaser 3. Any feedback would be handy, especially bugfinding! here's the link: https://play.google.com/apps/testing/com.mathquest.pp cheers, pp
  5. I am new to integrating tiled into phaser. Watched a bunch of tutorials and read a lot and followed instructions but my project just doesn't work the way it should... In Tiled, I added a Boolean property to each tile for collides: true. In phaser set it to setCollisionByProperty and.... no collision happens. I added debugging code, shows that there are tiles to collide with, my submarine is debugged and is showing a body, I have put my layer and sub on the same layer... still no collision. I've updated to the most recent versions of both Phaser 3 and Tiled... still no love. My sub should not cross into the islands area. My sub starts at my starting point placed in the objects layer, so I got that going for me. Any help would be greatly appreciated as this issue is destroying my productivity on this project. MapExplore.js
  6. // Flash player red let tintTween = this.tweens.add({ targets: this.player, duration: 200, tint: 0xff0000, callbackScope: this, onComplete: function(tween, sprites) { // Return to original color this.player.clearTint(); } }); This code is making my player sprite flash black and go back to normal, why is it not flashing red?
  7. I created a tool alongside Gammafp which could be useful for Phaser 3 users. Gammafp thought of how useful a free Atlas Packer would be for Phaser users. The tool can create atlas.json files from imported spritesheets and sprites. It was very recently developed so you could expect to run into some issues, please let us know! How to use: - You can import sprites or spritesheets depending of your resources. - You can add more sprites or spritesheets too if you missed any file or wish to combine animations. - Once the pictures are correctly displayed, you can click the save button. - This will download a .zip file containing both the sprite files and .JSON file set up. - Done! LINK FOR THE ONLINE TOOL Important: There's an animator section but it's far from complete, this section will be further developed depending on the reception and feedback of this tool! Gammafp programmed the tool and I made the art for most icons!
  8. Hello friends, I am new to the forum, I would like you to help me solve a slightly urgent problem, I am putting together a game with Phaser, I try to collide one image with another, until there is easy, the problem arises because one of the bodies has an animation with a tween, and when making a collision with another body, don't do it, keep going down, has someone happened to you ?, I show you the code var config = { type: Phaser.AUTO, width: 1200, height: 675, parent: 'Fondo', transparent: true, pixelArt: true, physics: { default: 'arcade', arcade: { gravity: { y: 1000 }, debug: false } }, scene: { preload: preload, create: create, update: update } }; var player; var cursors; var cofreup; var stars; var fondo; var platforms; var plataforma2; var colup; var suelo; var move = 0; var game = new Phaser.Game(config); function preload() { this.load.image('star', '../juego4/img/star.png'); this.load.image('fondo1', '../juego4/img/bg.png'); this.load.image('colision', '../juego4/img/plataformas/colision.png'); this.load.image('colision2', '../juego4/img/plataformas/colision.png'); this.load.image('plataforma1', '../juego4/img/plataformas/img-07.png'); this.load.image('plataforma2', '../juego4/img/plataformas/img-08.png'); this.load.image('cofre1', '../juego4//img/plataformas/img-15.png'); this.load.image('baul', '../juego4/img/plataformas/img-16.png'); this.load.image('ground', '../juego4/img/platform.png'); this.load.spritesheet('dude', '../juego4/img/dude.png', { frameWidth: 64, frameHeight: 98 }); } function create() { suelo = this.physics.add.staticGroup(); suelo.create(1, 690, 'ground').setScale(100, 1).refreshBody(); //colisiones// col = this.physics.add.staticGroup(); //*baul col.create(500, 570, 'colision').setScale(12, 2).refreshBody(); //*plataformas col.create(80, 170, 'colision').setScale(15, 2).refreshBody(); col.create(610, 370, 'colision').setScale(25, 2).refreshBody(); col.create(650, 150, 'colision').setScale(25, 2).refreshBody(); col.create(80, 476, 'colision').setScale(12, 2).refreshBody(); col.create(350, 280, 'colision').setScale(12, 2).refreshBody(); col.create(1100, 180, 'colision').setScale(12, 2).refreshBody(); col.create(980, 475, 'colision').setScale(12, 2).refreshBody(); //*cofres btn = this.physics.add.staticGroup(); btn.create(800, 570, 'colision').setScale(12, 2).refreshBody(); //*plataformas //Colisiones movieminto// //baul cofre = this.physics.add.staticGroup(); cofre.create(500, 610, 'baul'); //Plataformas grandes platforms = this.physics.add.staticGroup(); platforms.create(600, 400, 'plataforma1'); platforms.create(50, 200, 'plataforma1'); platforms.create(650, 180, 'plataforma1'); //Plataformas pequeñas platforms2 = this.physics.add.staticGroup(); platforms2.create(80, 500, 'plataforma2'); platforms2.create(350, 300, 'plataforma2'); platforms2.create(1100, 200, 'plataforma2'); platforms2.create(980, 500, 'plataforma2'); //Imagen cofres // cofreup = this.add.image(250, 500, 'cofre1'); this.tweens.add({ targets: cofreup, y: 100, paused: false, physics: true, collider: true, duration: 5000, ease: 'Sine.easeInOut', yoyo: true }); //Muñecos player = this.physics.add.sprite(100, 10, 'dude'); player.setBounce(0.1); player.setCollideWorldBounds(true); //Animacion personaje this.anims.create({ key: 'left', frames: this.anims.generateFrameNumbers('dude', { start: 0, end: 3 }), frameRate: 10, repeat: -1 }); this.anims.create({ key: 'turn', frames: [{ key: 'dude', frame: 4 }], frameRate: 12 }); this.anims.create({ key: 'right', frames: this.anims.generateFrameNumbers('dude', { start: 6, end: 8 }), frameRate: 10, repeat: -1 }); cursors = this.input.keyboard.createCursorKeys(); stars = this.physics.add.group({ key: 'star', repeat: 11, setXY: { x: 12, y: 0, stepX: 70 } }); stars.children.iterate(function (child) { child.setBounceY(Phaser.Math.FloatBetween(0.4, 0.8)); }); this.physics.add.collider(player, col); this.physics.add.collider(player, suelo); this.physics.add.collider(suelo, cofreup); this.physics.add.collider(stars, suelo); this.physics.add.collider(player, cofreup); this.physics.add.collider(stars, platforms); this.physics.add.overlap(player, stars, collectStar, null, this); this.physics.add.overlap(player, btn, call, null, this); } function update() { if (cursors.left.isDown) { player.setVelocityX(-160); player.anims.play('left', true); } else if (cursors.right.isDown) { player.setVelocityX(160); player.anims.play('right', true); } else { player.setVelocityX(0); player.anims.play('turn'); } if (cursors.up.isDown && player.body.touching.down) { player.setVelocityY(-500); player.anims.play('up', true); } //Animacion Cofre // cofreup.x = 220 + Math.cos(move) * 1; // cofreup.y = 460 + Math.sin(move) * 100; // move += 0.03; } function collectStar(player, star) { star.disableBody(true, true); } function call (player, btn) { Tween.stop(); }
  9. +) I just randomized the number in the image when I clicked +) I want to add a click event, so the size of the image changes random
  10. I am making UI Components Framework for Phaser 3, that is driven by JSFL-generated jsons and atlases. It means that you can build your UI in Abode Animate, export it with given script, and forget about manual code positioning and building stuff! Please, try it out. https://xense.github.io/phaser-ui-comps-docs/tutorial-showcase.html Docs, examples, tutorials: https://xense.github.io/phaser-ui-comps-docs There are two basic things in this framework. First is ComponentClip, which is a view instance, it is recursively self-build by provided json and atlases. Second is UIComponentPrototype, which is clip controller. It can be easily extended to create any components, windows or whatever you need. Essential meaninig of it is that it doesn't need a clip to exist always. For example, you can change states of a root clip, and child clip can get new clip instances, ore lose them, and nothing bad happen. Some base components are already included UIButton has 4 states, "up", "over", "down", "disable" UIButtonSelect same as button, but behaves like checkbox, has 8 states, by adding "_select" suffix to UIButton's states when selected. UIButtonRadio Selectable buttons, that can be grouped to select only one of them. UIButtonDraggable same as UIButton, but also emits drag event, drag bounds can be self externally. UIScrollBar vertical or horisontal bar with draggable thumb and prev/next buttons. UIProgressBar Setup only start and end elements positions, scale, rotation or alpha, and this component will interpolate them according to provided progress value. UIScrollPanel Helper for scrolling any element with UIScrollBar. UIContainer Base container component to add other dynamically created components inside. Can be easily extended to create any types of lists, for example. I'm still working on new components and extending existing functionality. Tell me, would you use it, what other components you may need, and whatever you think about it. Any feedback is appreciated! Also I'll be thankful for any collaboration. Available at GitHub and npm
  11. Hey everyone, I looked around for details on this but I am trying to determine the difference between the Physic types: Arcade, Impact, Matter to see what would be best for my type of game or to experiment with. I read in the Dev blogs that "Arcade" was meant for very simple physics in a game, while somewhere else I read that "Matter" was meant for debugging... I would like to know what the real differences are and which would make the most sense for a given game type. Does anyone know what the differences between the Physic types are? Thanks!!!
  12. I am making a top down zombie shooter and I am using the moveToObject function for the zombies to follow the player but as you can see, as soon as the player walks behind a wall the zombies get stuck. Is there an easy way to fix this issue?
  13. We just released full support for Spine in our Quest AI IDE. Quest is the simplest way to start building games and Playable ads that runs on Phaser 3. Simply .zip up your spine projects and import them into Quest to start using your animations in timelines. Trigger any animation, change skins, or add attachments to slots, all without writing a single line of code. We're super proud to be able to integrate with Spine and make animations way more robust in our platform (been months in the making for us). It's totally free to make an account to start building some really fun stuff (we make most of our money off enterprise accounts). Thanks for checking it out and would love any feedback!Sign-up:https://www.quest.ai/pricingTutorial:https://www.quest.ai/tutorials/spine- Andrewco-founder of Quest AI
  14. Hi, I am new to coding and phaser 3. Here is what I am trying to do- I am have a world map that is draggable, and I want to add markers on the map of the cities I want to add. The cities are all stored in an array, myCities2. I have a plan to add a lot of cities and adding them through a function or loop will make it a lot easier than applying each city individually. Each city will link to a "demo scene" where the city name, city image and other relevant information will be passed and the city can be explored. I have build a lot of this in another file but each city and click event hast to be copy pasted and so on creating hundreds and hundres of lines of code and repetition, I am sure there is a better way and I know coding has a solution, as my coding friends tell me. Efficient code is my goal here. I have tried forEach(), and for loops but can't get them to add the images to the container with the map - as the map is dragged the cities need to be dragged along with it... Any suggestions? Thanks, Your help is greatly appreciated. myCities.js
  15. Hello guys, I lost my other html5gamedevs account @Nicholls but I want to share with you guys my new contribution to Phaser 3, a web component to integrate Phaser with any other Framework (Angular, React, Vue.js, etc): https://github.com/proyecto26/ion-phaser This is very useful because you don't need to manipulate the DOM directly using ids and you can use Phaser like any other component. From the GitHub repo you can find some examples, also check from Codepen too: https://codepen.io/jdnichollsc/full/oRrwKM Regards, Nicholls
  16. Looking for someone/team to help us create templates in Quest.ai. We're an IDE that works on Phaser 3 where we easily create timeline animations, sprite sheets, audio sheets, simple interactions, etc. We offer templates that our customers can customize by using us. Finding it hard to create templates and work on the product at the same time so looking for help. Ideally looking for someone or a team that has multiple existing game projects that can be repurposed into templates for our system. This is absolutely a paying a gig where we pay up front for you to create it in Quest in a way that our users can reuse it. Might not be for all but hoping to find someone with many games behind their belts. www.quest.ai I'm the head of design /co-founder of Quest. I can potentially help with the design / reskinning of things depending on the projects. Thank you and please reach out ASAP as we're looking to produce these soon. This also isn't a 1 person fits the position type thing. We'll have to review your game experience and concepts before starting. Thanks and really looking forward to working on collaboration on some fun stuff. (Attaching an example of a design I have that needs to be coded in Quest)
  17. I am starting out with Phaser/ Phaser 3, so bear with me. I am trying to make a mobile game with viking ship going up a river. the ship will always be moving forward, I wish to have a virtual tiller which the user will touch and drag to angle the ship left and right. I.e Changing the angle which the tiller is displayed on the screen, the more severe the angle the faster the boat will turn. Currently I change direction with the arrow keys on the keyboard. I tried adding it as a button, but got the error message add.button is not a function. Can anyone suggest where to begin this process? i.e add the tiller and allow it to tilt (I will be recording it's angle to determine how much to turn the boat). Attached is a image of the what I mean by tilting.
  18. Hello, I am making a top down zombie shooter in Phaser 3. I am using the moveToObject function to make zombies follow the player. Now I want to make healthbars for the zombies. I have read that you can use containers to make the enemies and healthbars move together but I am having trouble to move the container with moveToObject. Is it possible to move a container with the moveToObject function or should I use something else instead?
  19. I am trying to invoke getConnectedScores method in facebook instant games plugin in phaser this.facebook.once('getleaderboard', function (leaderboard) { this.leaderboard = leaderboard; console.log(leaderboard); leaderboard.getPlayerScore(); this.leaderboard.on('getconnectedscores', function (score) { console.log(score); }, this); this.leaderboard.getConnectedScores(); }, this); this.facebook.getLeaderboard('Omi-game');
  20. I have an enemy with a health bar. I want the health bar to move with the enemy. To do this I have made a container like this: var container = scene.add.container(x, y, [enemy, healthBar]); This work just as expected, the problem is when I try to move the container with moveToObject like this: scene.physics.moveToObject(container, player, speed); This does not work at all. How do I solve this?
  21. hi guys I have a Construct 2 Project i want to transfer it to phaser 3 any idea ! hope someone can help asap thank you so much
  22. I recently made a pop-up menu for my game which pops up after pushing a button. The problem is now that I need to figure out how to make a function that closes the menu. Here is the code: this.input.keyboard.once("keydown_D", event => { var StoreWindow = this.add.image(0, 0, 'StoreWindow').setOrigin(0); var backbutton = this.add.image(32, 34, 'backbutton', 0).setOrigin(0).setInteractive(); var testButton = this.add.image(64, 110, 'testButton', 0).setOrigin(0).setInteractive(); var storeContainer = this.add.container(32, 70, [ StoreWindow, backbutton, testButton]); storeContainer.setInteractive(new Phaser.Geom.Rectangle(0, 0, StoreWindow.width, StoreWindow.height), Phaser.Geom.Rectangle.Contains); this.input.setDraggable(storeContainer); storeContainer.on('drag', function (pointer, dragX, dragY) { this.x = dragX; this.y = dragY; backbutton.on('pointerup', function (storeContainer) { this.deletecontainer(true); }, this); }) .setScrollFactor(0) .setDepth(30);
  23. I've seen a gantt chart with a planned "phaser 2 to 3 migration guide" but now it seems to be deleted. I have a lot of 2.x code and I would love to migrate to 3.x in an ordered way. So, will there be any migration guide or should I just start seeing the examples and tutorials and figure out the best way to do it? It's nice to have such amazing library!
  24. I am creating a game in phaser 3 where I need to work with texture atlas. There are no useful tutorial available online and I have no idea how to even start. So here are my questions. 1) How to load a JSON atlas and draw images from it? 2) How to randomly select a texture from the atlas and draw it? Note : While packing my textures I selected JSON array option. Some tutorials which I found online. LoadingTextures RandomTexture AddingAtlas
  25. Hi! I'm doing a school assignment about Phaser and I was wondering can someone explain the differences in Phaser 2 and Phaser 3 physics engines? Phaser 2 has: Arcade, P2 and Ninja physics and I know pretty much the differences in them. Phaser 3 has: Arcade, Impact, Matter and Multi physics, I guess the arcade is the same as in Phaser 2, but what about impact and matter? Can someone smarter than me explain how these work? Thank you in advance!