Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


supertommy last won the day on September 3 2020

supertommy had the most liked content!

About supertommy

  • Rank

Contact Methods

  • Website URL
  • Twitter

Recent Profile Visitors

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

  1. Here’s a work-in-progress of Phaser 3 examples in TypeScript: https://examples.ourcade.co/phaser3-typescript You can make changes in the editor with code complete, static analysis, and more and then test it immediately in the browser. Right now, I am taking the official Phaser 3 examples and turning them into TypeScript with a more modern format. You can also get the examples as a Github repository without the website frontend: https://github.com/ourcade/phaser3-typescript-examples Hope this helps make it easier for people comfortable with webdev or any other dev but new to
  2. Here's a free book for those interested in or looking to start using TypeScript to make Phaser 3 games. It goes through 11 chapters and about 90 pages to make an Infinite Runner game like Jetpack Joyride. It is intended for those slightly more advanced than beginner. I also wrote the free Infinite Jumper in Phaser 3 with Modern JavaScript book that is geared towards beginners! TypeScript tends to help add more safety and clarity to your code by default so that you can make bigger and more complex games. We cover things including enums, basic state machine, infinite scrollin
  3. I just wanted to share this tool to help with designing/styling web font text for Phaser 3. https://ourcade.co/tools/phaser3-text-styler You can adjust various TextStyle properties and see the result rendered in real-time in a Phaser Scene. When it looks good you can just copy the code as needed. Iterating on text styles can be quite slow when you need to reload after each change or go back and forth between the docs and your code. This should help speed that up! There's a built-in color picker, Google Font search, light vs dark background toggle, and more. πŸ€—
  4. What is your 'pixel' key referring to? It doesn't look like the RenderTexture's draw method takes a string for the first argument. You can create an Image or Sprite with the 'pixel' key if it refers to a loaded texture. You should then be able to adjust the scale and pass that instance into rt.draw() Something like: // created in create() const pixel = this.make.image({ key: 'pixel' }, false) // update the scale to get the size you want pixel.setScale(2) // then later in the mouse pointermove handler... rt.draw(pixel, pointer.x, pointer.y)
  5. You'll want to set debug to true in your game config for arcade physics: const config = { type: Phaser.AUTO, physics: { default: 'arcade', arcade: { debug: true } } // other settings... }
  6. Your class should extend Phaser.Scene like this: class mainScene extends Phaser.Scene { // ... }
  7. @tkohey_sad I've been thinking about this and not sure what the best approach is. I have seen bundler & minification extensions for VS Code that would probably work but there's not too many that are widely used. Your method, while manual, is pretty clever
  8. Here's a free book for interested in getting started with modern JavaScript and Phaser 3. You won't need to use NPM or set up any complex build tools. If you've been hesitant or unable to use modern JavaScript because of these web development configuration and tooling hurdles then this book might be perfect for you! You'll just need Google Chrome and Visual Studio Studio. Aside from being an easier way to start using modern JavaScript, the book also goes through creating an infinite jumper game like Doodle Jump. You'll learn everything within the context of modern JavaScrip
  9. Can you share what your code looks like? There could be many reasons why you are seeing this problem.
  10. I personally prefer the EventEmitter method since I feel it keeps things most decoupled. I'm also a big fan of ReactiveX (rxjs), Observables, and Signals πŸ˜… so I might be biased. This is how I would use EventEmitter to pass messages between Scenes: https://blog.ourcade.co/posts/2020/phaser3-how-to-communicate-between-scenes/
  11. The answer from @geocine should solve this just fine πŸ‘ Here's another solution that can be used to implement triple, quadruple, etc jump as well (if so desired πŸ˜…) This is a video of me implementing it in real time:
  12. Have you tried using a RenderTexture? https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.RenderTexture.html I have not tested this but you might be able to create an Image from a Texture Frame and then draw it into the RenderTexture. You might be able to skip creating an Image first if you can resize the Texture Frame but I'm not sure if you can
  13. is you game.js file in the same folder and level as index.html? perhaps show your index.html file; might be some ordering problem?
  14. @callidus using velocityFromRotation looks right but what is the line below it for? // this looks right game.physics.arcade.velocityFromRotation(player.rotation, 400, bullet.body.velocity); // what is this for? bullet.body.velocity.y = -400; I don't think you need that second line. I have an isolated demonstration of the concept here if that might help: https://blog.ourcade.co/posts/2020/fire-bullets-from-facing-direction-phaser-3/
  • Create New...