Search the Community

Showing results for tags 'phaser3'.



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 91 results

  1. Marine

    Get container by name

    I gave the names to my Containers and want to get them using that names(with setName ). For example, I have Container with name 'Container1', 'Container2' ... I want to find the container with 'Container2' name. How can I do that?
  2. Hi all, I am trying to display a character(an extended container) by grouping a collection of body parts(extended Sprites). I have also created a plugin based of of this example to simplify the process. I have traced out the scene, the container, and all of the sprites, and all seems like it should display properly. Everything is properly childed, and everything has the proper texture and frame, but nothing appears on screen. Somewhere between the plugin and my custom classes, something has stopped it from being displayed properly. Does anyone know of something that may be undocumented about any of the thing's I've done that would break what I'm trying to do, maybe about extending classes?
  3. I'm attempting to clear the path within the update function, you can see below: But for some reason, the path won't clear class Gun extends Phaser.Physics.Matter.Image { constructor(config, scene) { super(config.world, config.x, config.y, null, null, config.options); this.scene = scene; this.ship = this.scene.player this.graphics = this.scene.add.graphics(); this.path = new Phaser.Curves.Path(0, 0); } update() { this.graphics.clear() this.graphics.lineStyle(1, 0xcccccc, 1); this.path.lineTo(this.ship.x, this.ship.y); this.path.lineTo(this.scene.input.mousePointer.x, this.scene.input.mousePointer.y); this.path.draw(this.graphics) } } export default Gun; Here's the live demo - https://codepen.io/jurbank/project/live/AmPBBN/ And the project - https://codepen.io/jurbank/project/editor/AmPBBN Any thoughts? Thanks!
  4. Hi everyone! Before anything I wasn't sure if this was the correct place to post this, please moderators move it as you consider if this should go to some other place like Projects and Demos. https://github.com/damian-pastorini/dwdgame Also, please consider that this is my first implementation ever! I've never used neither Node.js, even less Parcel, Colyseus or Phaser, my world before this first incursion in game development was all about PHP and Magento, so that should give you an idea from where I'm coming. This quite awful but working example took me 75hs, including the time I've used for research and for decide which platform use for the server and the client. After all the research, Node + Colyseus and Phaser 3 looked as the better start point since I was familiar with JS and HTML of course but had zero knowledge about Unity (the other option I would like to use), but I've prefered make the learn curve not so slow. So.... This is a really simple base MMORPG game created based on the Colyseus samples: https://github.com/gamestdio/colyseus-examples And on the Phaser 3 implementation from Jacky Rusly: https://github.com/jackyrusly/jrgame As you will see I've considerable modified how the jrgame was interacting with Socket.io in order to make it works as how the Colyseus example was working, I've thought that was the better way to do it (follow up on server ready samples and break apart the client sorry Jacky!) The game basics are login through DB, loader, scene change, players sync, but nothing like chat, items, or attacks was implemented here (so far). Here's the link to the repo: https://github.com/damian-pastorini/dwdgame Please feel free to create any tickets or pull requests for questions, fixes or improvements, I would love to get good feedback! I don't have a public link to show it yet but I'm planning to create a dev server soon (for now you will need to install it and run it to see it), at the end it will look like: https://jrgame.herokuapp.com But you will see the login screen first which in the server side will connect to the DB and all the players sync was done with Colyseus. I saw comments from people looking for Colyseus integrated with a DB engine (in this case I've chosen MySQL), so at least that part should be useful. I really hope this help more than one person, maybe someone like me who would love to get this as starting point. Best, Damian Reply
  5. Dear community, I would like inform you that "War IOM" v2 have been re-work graphics and added more feature to serve user experience. Here is my banner screenshot: You can access to the website and play it directly on your phone (Chrome mobile, Safari iPhone, iPad) or your Laptop Link to play: https://www.iomgame.com/wariom/ ++++ Game description: The rule to win the game is very simple: buy the soldiers, defeat the enemy army and then destroys the flag. Try to use fireball to wipe out the enemy. The game had the shop to buy new soldier, upgrade soldier and choose the team out. Game data be stored on both user's device and server so never lost data again. ++++ Here is the look and feel of War IOM icon on your Home-screen phone Rumor: You can get double gem receive if you beat the mini boss at level 3. Also win level 3 will give you a lot of Gem, use it to buy new solider and upgrade your army! My facebook page: https://www.facebook.com/Iomgame-245553622715070/ /******** Change log update 08/26 ********/ -- Add new game play for level 6. -- Improve camera. -- Improve game performance. /******** Change log update 08/31 ********/ -- Improve sound load time. No painful for waiting sound loading any more! /******** Change log update 19/09 ********/ -- Add level 7 with new game play. Regards, Gafami .
  6. andrei.nicolae

    Open url in a new new tab Safari

    Hi guys, I've tried multiple solutions found online opening a new tab when a button is hit. buyBtn.on('pointerdown', function (event){ openWindow(myurl); }, this); function openWindow(url) { var result = window.open(url, "_blank") } function openWindow(url) { document.getElementById('newlink').href = url; document.getElementById('newlink').click(); } function openWindow(url) { window.location.assign(url); } This are some of them. All of these solutions work on other browsers, but not on Safari. Does anyone have a working solution for Phaser3? Thank you.
  7. here's the GitHub repo. Highlights dev server with live-reload and auto port finder simple SHOW_ALL style stretch mode Auto spritesheet with spritesmith Image optimization on build streamlined assets loading modular development setup Inside full Making your first Phaser 3 game made into modular code. All feedbacks are welcome.
  8. I am attempting to 'animate' the throwing of a tetromino sprite. The animation is simply the tetromino following a Curve while rotating. Once the 'animation' is done (after the tetromino reaches the end of the Curve) I would like to destroy the tetromino. However, looking at the API documentation for PathFollower, it is not clear to me how to detect when the sprite reaches the end of the Curve. I see a lot of event-related methods, but those seem to be for defining your own custom events rather than detecting set events like doneFollowing or something. For the rotation, I would like to set a callback to rotate the sprite at every point along the curve, but that doesn't seem possible either. Am I missing something in the API doc, or is a Curve/PathFollower approach not ideal for this scenario to begin with? Here is my code so far: const points = [ START_X, START_Y, variableX, variableY, END_X, END_Y ]; export default function ThrowAnimator(args) { let {gameObjectFactory, duration} = args; let curve = new Phaser.Curves.Spline(points); this.animateThrow = function(tetrominoShape) { points; let follower = gameObjectFactory.follower(curve, START_X, START_Y, tetrominoShape + 'Whole'); follower.setRotateToPath(true, 90); follower.startFollow({ duration: duration, yoyo: false, ease: 'Sine.easeInOut', repeat: 0 }); } };
  9. David81

    Help with masks

    Hello everyone, I have a project with Phaser and I'm stuck. I need your help. I have two layers (images) and I want to erase the first layer with the user's action (I do not want to destroy it). I have tried this with the masks but I do not know how to make the mask dynamically drawn by the player. I do not know if you understand me. I'm not good at English. Any clue how can I do this effect? I included an image.
  10. I've created a template to illustrate the concept of levels generated from dynamically loaded tilemaps from a single level scene. Phaser 3 Tilemap & File Pack Project Template Demo Questions and feedback are welcome!
  11. Hey All! I needed to display some dialog boxes in a recent game and the old 9-slice plugin wasn't ported to v3 yet so I wrote one (github repo). I have a live demo here and a gif of it in use follows. Would love to see this get some use outside of my projects so give it a spin. I'm pretty active on the discord and try to check in here weekly so feel free to ping if you have any questions! Happy hacking!
  12. andrei.nicolae

    Zoom in on phone browsers

    Hi guys, I'm new to this and I have an issue in my current working project(it's first in phaser). I want to know how can I zoom in the game when it's opened in a mobile browser? The game is too small and I want to zoom and slide the whole canvas in the browser window. I can do this from outside the canvas but I cannot drag then from the canvas itself. Please help! Thank you.
  13. adeptnix

    Identify objects in collisionstart

    Hi guys, I have different objects in my game, something like this scene.matter.add.image(x, y, 'car'); scene.matter.add.image(x, y, 'cone1'); scene.matter.add.image(x, y, 'man'); And I try identify what kind of objects collides this.matter.world.on('collisionstart', (event, bodyA, bodyB) => { if (bodyA.label === 'car' && bodyB.label === 'cone') { bodyB.cone.body.setTexture('cone2'); } if (bodyA.label === 'cone' && bodyB.label === 'car') { bodyA.cone.body.setTexture('cone2'); } if (bodyA.label === 'man' && bodyB.label === 'cone') { bodyB.cone.body.setTexture('cone1'); } if (bodyA.label === 'cone' && bodyB.label === 'man') { bodyA.cone.body.setTexture('cone1'); } }); But sometimes cone object don't change his texture despite I hit it by a car. If it can help, full code there - https://gitlab.com/grigoriytretyakov/phaser3-racing-car/blob/master/src/Game.js#L172
  14. Titos

    CocoBombo(Android game)

    My first simple and amusing game using phaser framework! Available at google playstore here: https://play.google.com/store/apps/details?id=com.chrisboursis Collect the cocos and avoid the bombs. Use your finger speed and perform all the available combos! Collect the yellow candy to be aggresive --move quicker-- and the blue candy to fly! Can you score 20?
  15. ChrisB

    AtlasXML Problem

    Hi all, since yesterday i am trying to animate my player. Below is the code: preload{ ...... this.load.atlasXML("player", "assets/sprites.png", "assets/sprites.xml"); this.anims.create({ key: "moving", frames: this.anims.generateFrameNames("monkey", { start: 0, end: 9, prefix: "idle", suffix: '.png' }), frameRate: 15, repeat: -1 }); } At create: var player = this.add.sprite(400, 285, "player", "idle0.png").setDisplaySize(55, 55); which works great! But on update where i want to animate my player i am getting this error: Uncaught TypeError: Cannot read property 'frame' of undefined It is like the frames array is not populated when i am creating anims on preload. frames:Array(0) i get at: console.log(this.anims.get("moving")); Any help would be appreciated! Thank you
  16. NoobTW

    Scaling canvas makes text ugly

    Hi, I'm totally new in HTML 5 Games. If I resize my canvas (by calling resize function in preload), those text will become blurry, ugly. Any idea to handle this? Here's the example: https://codepen.io/anon/pen/wxdXKp .
  17. I've just started Phaser 3 development and I noticed there are no buttons, which I found a little odd. Buttons are a very important part of the interactivity of a game. In Phaser 2 I used them all the time for creating menus, select a level, restart level, quit game etc. But ok I understand that you can use a sprite and add .setInteractive() so it will act like a button. The button should change color when on mouse-over and another color when it is pressed down. I'm using a sprite atlas with the different frames for the button faces, and I've tried using the pointerover and pointerout and pointerdown events to change the frame.name of the sprite but this doesn't seem to work. preload: function () { this.load.multiatlas('sprites', 'img/sprite_demo.json', 'img'); }, create: function () { // back Button this.btnback = this.add.sprite(400, 480, 'sprites', 'btn_back').setInteractive(); this.btnback.on('pointerover', function (ptr, x, y) { this.frame.name = 'btn_back_hl'} ); this.btnback.on('pointerout', function (ptr) { this.frame.name = 'btn_back'} ); this.btnback.on('pointerdown', function(event){ this.frame.name = 'btn_back_down'; this.scene.start('mainmenu'); }); }, Changing this.frame.name doesn't seem to do anything, it stays the same frame as when the sprite was created, no interactivity. So how can I make buttons work in Phaser 3?
  18. Pau

    Load tilemap

    Hello, I am trying to load a tilemap json file made with the tiled program. I am looking for phaser 3 equivalent to this phaser 2 code: function preload(){ this.load.image('gameTiles', 'tiles_spritesheet.png'); this.load.tilemap('level1', 'map.json', null, Phaser.Tilemap.TILED_JSON); } function create(){ this.map = this.add.tilemap('level1'); this.map.addTilesetImage('tiles_spritesheet','gameTiles'); this.backgroundLayer = this.map.createLayer('backgroundLayer'); } I have the attached the phaser 2 code, they are a few lines. Thank you! 1-carga-carretera.zip
  19. peevopuff

    Phaser 3 Tilemap setting Origin

    Hey Community! I'm trying out the new Phaser 3 Framework using Tilemaps. I create my tilemaps through Tiled and export them as .json. Since my map doesn't occupy the whole screen, I wanted to center it to the worlds center. I can render every layer to the screen and center them to the world but I can't center their origin properties since they come by default at 0, 0. The strange part is that their values change in the layer object to the ones I want but the layer image stays the same. I've tried using Static or Dynamic layers but there's no difference. Am I missing something? Is anyone else having trouble using: "layer.setOrigin(0.5, 0.5);"? Here's a snapshot of my code:
  20. This plugin will help you build paths for pathfollowers and path tweens. Draw and edit Lines, Bezier Curves, Splines and Ellipses at runtime and export them to Phaser. A useful tool for editing and building paths. Explore your scene while building paths. Draw your path in-game during runtime. Export path as JSON Data. Load them into Phaser and create awesome animations using pathfollowers! Maximum usage of Phaser API. More cool features will be added soon! Demo. Src & Docs NPM Submit an issue
  21. Phoser3 + Mouse Wheel I may be dumb and this already exists but I took some time this evening to sketch out what it'd take to get mousewheel support in v3. A demo is up that works in updated FF and Chrome. I'll circle back and fix the skeleton to work in IE so I can test there at some point since I forgot it doesn't support modules. 🙄 I'm happy to work with folks / take merges but won't be doing any more until I have a chance to think about how it fits in with the existing input model and see if @photonstorm would accept it upstream or if they've already got stuff going to implement it and what his concerns would be. Anyway, felt worth since most of the approach can be pulled out of phaser and applied in isolation. cheers! Edit: OH! if this doesn't work in your browser add a comment and let me know, mouse wheel events are ... pretty reasonable but it felt like there were maybe still some rough edges in how the events were surfaced.
  22. Ad4m

    Picture Packer

    Hi all, I would like to share here a simple python app I'm coding: PicPacker. It's -or will be someday- somehow similar to TexturePacker. It takes same sized images, processes them and yield, as you all has supposed, a single image containing all the others. Also if you specify it you can generate a json to index all images. If you like be my guess and try it, at least for testing purposes ☺️
  23. andrei.nicolae

    Custom Font

    Hi, I want to use a font that I have installed locally on my computer in the game. Can someone help? Thank you.
  24. andrei.nicolae

    Group set origin

    Hi guys, How can you change the anchor of a sprite inside a group? For a sprite outside the group I use this.add.sprite(100,100, 'sprite').setOrigin(0,0); I tried the next code but It didn't work leprosy = this.add.group([{ key: '001_leprosy', setXY: { x: 444, y: 115 }, setOrigin : {x:0, y:0} } ]); Any ideas? Thanks.
  25. Hello everybody! Who knows how to implement endless scrolling of a composite background from different parts that are loaded from the data array? The important point: each part contains an image and text. The array of such parts can be large, so the parts will be loaded by the stack (about 6-10 items). I will be glad to any ideas and suggestions, since I spent a lot of time searching nothing. For clarity, I'm attaching an image. Thanks for any suggestions. Phaser v.3.10.1