Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Doug last won the day on February 9

Doug had the most liked content!

About Doug

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. Just following this up. I discovered that it was a plugin "smoothScroll" that I was using. Once I disabled that it worked fine
  2. Hi All. I've just created a Phaser3 game and added it to an asp.net page. When I use the up or down keys the page scrolls rather than the character moving. I understand that this is something to do with event.preventDefault() for keydown, but I can't get it working. It works fine in a basic html page, but not in the asp.net page. Here is the html page that DOES work: <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> <script src="phaser.min.js" type="text/JavaScript"></script> <script sr
  3. Hi Quick one (hopefully). Is using the resolution setting the best way to deal with HDPI screens on mobile? i.e. set the game size to the innerHeight and innerWidth of the screen and then set the "resolution" setting to the devicePixelRatio. It seems to work, but I am getting a bit of a performance lag. I assume just because the higher resolution means that device is working harder rather than because it's not the proper solution? Thanks :) D
  4. Doug

    Changing scenes

    I am sure this is a completely dim question, but I can't find what I'm looking for. I'm using Angular4 with phaser: this.phaserGameConfig = { type: Phaser.WEBGL, width: width, height: height, parent: 'game-play', scene: null }; this.phaserGame = new Phaser.Game(this.phaserGameConfig); this.phaserGame.scene.add('GAME_0_Loading', new GAME_0_Loading(this.phaserGameConfig, this), false); this.phaserGame.scene.add('GAME_1_Welcome', new GAME_1_Welcome(this.phaserGameConfig, this), false); //etc I have around 10
  5. OK, so I think I may have worked out what's going on here, but I'd welcome feedback as to whether I'm correct and how to resolve it please. When I run `ionic serve` my games run perfectly. When I do `ionic build` and open the files directly in a browser they fail. This, I have now realised is a dim mistake because a web server is required to serve phaser games. So if I run a basic python web server in the www build directory with `python -m SimpleHTTPServer` I can then browse to the game in the web browser at http://localhost:8000/ and boom, the games are working. So, the question
  6. Hi All I'm developing a mobile app with ionic framework and Phaser 3 and am having some problems. When I run ionic serve the app opens in the web browser and works fine. However, when I run ionic build I have problems. I know that Phaser loading because I am seeing the following in the console (this is running the version that has problems when I ionic build it): However, I get a black screen rather than any game content. I am including phaser in the index.html file: <script type="text/javascript" src="assets/libs/phaser/phaser.min.js"></script>
  7. Just to follow up on this, I can confirm that @rgk was right. I changed the code to the following and it all works. this.matter.world.remove(this.wireRect); Thanks again
  8. I would probably avoid trying to create the login form etc within Phaser. As @snowbillr has hinted at, this would not be all that easy and you're going to need a workaround. Maybe a better approach would be to create an HTML form within a div with a background so that it looks pretty and as if it's a part of the game, but is actually just pure html, css, JS etc and then create or show the Phaser game instance after the login has been processed.
  9. Thanks very much @samme - I am actually using the latest version of Phaser, but I just had another look at my code. It's pretty complicated in there now and it looks like there was one instance where I wasn't destroying the game properly, but just closing the modal. I've amended it now and so far it appears to have done the trick. So I'll do some more testing. Thank you and sorry for wasting your time if it was this.
  10. @rich Sorry to bother you, but I'm still struggling with this one and it's causing me a lot of headaches. What is the best way to completely remove sound from the DOM please? Thanks!
  11. You're most welcome. I assume you've found the documentation here too: https://photonstorm.github.io/phaser3-docs/list_namespace.html Between the labs and the docs you should have everything you need. Enjoy! It's a great framework.
  12. You are a legend, thanks. I can replicate this working in the example page you sent too Will have a go at implementing in my code as soon as I have a chance. Thanks very much! Greatly appreciated.
  13. Doug

    Hi Rich.  @rgk mentioned that you might be able to please add a "patron" badge to my forum profile?  Thanks very much!

  14. Thanks very much. However, the objects still accept collisions etc and also still show up in debug mode. Have you had this working successfully? Just out of interest, how did you get the "Phazer patron" badge to display (I am a patron, but it's not showing for me)?
  15. Hi Josh I think you're looking for this: http://labs.phaser.io/edit.html?src=src\input\keyboard\keydown.js You just replace `keydown` with `keyup`. e.g. this.input.keyboard.on('keyup_A', function (event) { console.log('Hello from the A Key!'); }); I hope this helps and let me know how you get on D
  • Create New...