snowbillr

Members
  • Content count

    79
  • 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. 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
  2. snowbillr

    Create Sprite In Simple Class

    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.
  3. 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.
  4. snowbillr

    The Democracy Times - game prototype

    This is awesome! Thanks so much for making it open source. Really high quality stuff.
  5. snowbillr

    how do i can create InputField in phaser 3

    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/
  6. snowbillr

    Generic platformer + ES6 / Webpack 4 boilerplate

    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.
  7. snowbillr

    Flipping the sprites of a group

    You'd have to set the property on all of them individually. `this.myGroup.children.each(entity => entity.flipX = true)`
  8. 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
  9. 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.
  10. snowbillr

    Image Animation loading progress

    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).
  11. snowbillr

    UI Elements on Phaser 3

    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.
  12. snowbillr

    UI Elements on Phaser 3

    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.
  13. snowbillr

    Passing Phaser's game object to a class

    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.
  14. snowbillr

    Sprite.update() method is never called

    https://github.com/photonstorm/phaser/pull/3379 and https://github.com/photonstorm/phaser/issues/3378 talk about this issue in more detail
  15. snowbillr

    Is web camera access is possible in phaser 3?

    Phaser 3 is just JavaScript that runs in a user's browser. You can call whatever JavaScript APIs you want in your code. I don't think Phaser 3 provides its own API to access a webcam, but you can hook into the native browser functionality yourself. Take a look at https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Taking_still_photos for an example of how to do so.