snowbillr

Members
  • Content Count

    81
  • Joined

  • Last visited

About snowbillr

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey there! Thanks for posting about this, I'd love to figure out what's going on. Someone actually made a pull request to add the raw-loader to the project (https://github.com/snowbillr/phaser3-webpack-es6-dev-starter/pull/1). I was unable to reproduce the issue though, and when this person cloned the repository freshly, they weren't either. What version of Phaser are you on? Where did the tutorial stop working?
  2. https://github.com/orange-games/phaser-input is a library that works with Phaser 2.x or Phaser CE. It's not built to work with Phaser 3.
  3. Container's don't support nested masks. Not sure if this is what you are trying to do, but if so it isn't really a "bug". https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Container.html
  4. A Sprite's constructor looks like this (https://github.com/photonstorm/phaser/blob/master/src/gameobjects/sprite/Sprite.js#L77) function Sprite (scene, x, y, texture, frame) So wherever you create your Sprite, you'll need to pass in a reference to the scene. This could be anywhere in your codebase, as long as you are able to have a reference to that scene.
  5. snowbillr

    Scene switch

    Here's the list of Scene events that you can listen to: https://github.com/photonstorm/phaser/blob/master/src/plugins/ScenePlugin.js#L66. Looking at the source of the switch method it looks like it calls either `wake` or `start` on the scene you are switching to.
  6. This is awesome! Thanks so much for making it open source. Really high quality stuff.
  7. There's no native Phaser input box. You've got two options: 1. Create an input box from scratch in Phaser. That means drawing the box, listening to keyboard and mouse events on it, updating the box when the user adds or removes characters, knowing if the box has focus, etch. Which is a lot of work. Instead, you are probably better off overlaying some HTML on top of your game with an regular old <input type="text" /> HTML input in it. Here's a tutorial that uses that concept, but isn't quite what you are looking for: https://www.joshmorony.com/creating-a-shop-with-purchasable-items-in-a-phaser-game/
  8. This entry in the changelog explains what the WEBGL_RENDERER and CANVAS_RENDERER flags are used for: https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md#updates-2 (and that they've in fact changed with Phaser 3.7.1). TL;DR When building Phaser yourself you can include/exclude the two renderers with those flags. So if your game only ever runs in Canvas mode, you can exclude the WebGL renderer to reduce your file size.
  9. You'd have to set the property on all of them individually. `this.myGroup.children.each(entity => entity.flipX = true)`
  10. snowbillr

    Tilemap problem

    This is an issue that's due to how the renderer draws tiles to the screen. See https://github.com/photonstorm/phaser/issues/3352 https://github.com/photonstorm/phaser/issues/3229 https://github.com/photonstorm/phaser/issues/842
  11. Kind of a convoluted example of this can be found here https://labs.phaser.io/edit.html?src=src\scenes\change scene from create es6.js. It loads some assets in SceneA and then creates them in SceneD.
  12. Sounds like you want to play an animation during a Loading scene, and then transition to a different scene once all the loading has completed. You can load a spritesheet for the gear before a Scene starts using the scene's config object (see https://labs.phaser.io/view.html?src=src\scenes\scene files payload.js) and use that in a Loading scene. Then once everything has loaded (i.e. the `create` function of your scene gets called) you can switch to a new scene (like this https://labs.phaser.io/edit.html?src=src\scenes\change scene from create.js).
  13. This tutorial isn't for creating a log in screen, but it is for creating an HTML overlay for your game: https://www.joshmorony.com/creating-a-shop-with-purchasable-items-in-a-phaser-game/ So not exactly what you are looking for but it has the same concept.
  14. You could either create your own buttons and text inputs using Phaser's GameObjects and input events, or you could layer some HTML elements over your game and use HTML/CSS/JS to create your log in form. As far as accounts and authentication goes, you'll need to have a server running that holds all that information and logic. This isn't a small task.
  15. FWIW in Phaser 3 you really shouldn't need to use the `game` object at all. Almost everything you do to interact with Phaser should be through your Scene's instance.