drhayes

Members
  • Content count

    1,303
  • Joined

  • Last visited

  • Days Won

    2

drhayes last won the day on April 14 2016

drhayes had the most liked content!

5 Followers

About drhayes

  • Rank
    Advanced Member
  • Birthday

Contact Methods

  • Website URL
    drhayes.io
  • Twitter
    drhayes

Profile Information

  • Gender
    Not Telling
  • Location
    Austin, TX

Recent Profile Visitors

1,293 profile views
  1. You've got the sprite's constructor wrong. It's not "constructor({game, x, y, key, frame})" it's "constructor(game, x, y, key, frame)". Note the missing curly braces. Your call to super is fine, though.
  2. Don't modify the player's and the rock's positions directly -- change their velocities. If they don't have velocities then they won't overlap/collide correctly.
  3. You're correct -- the main use of modifying a particular function's prototype is to share the memory taken by those functions across a lot of instances of that function's prototype. Not making more than one? Not doing inheritance? Totally a style thing. ( =
  4. It is possible but it's not Phaser-specific. I would start with this HTML Rocks article about capturing audio and video. Now that you have the video you'd need to upload the image somewhere, find the URL, tell Phaser to load it as an asset, wait for it to finish loading, then add it as a Phaser.Image. Or, you could probably grab the image directly and add it to Phaser's Cache yourself instead of bouncing it through the loader. That wouldn't save the user's image, though.
  5. Welcome to the board! It totally depends on the plugin that you're using. I'm sorry the documentation is scarce. You should try reading the code to see what/how they work and talk to Phaser. If the plugin you're working with is, truly, a Phaser.Plugin than you can call "game.plugins.add(PluginClass);" (substitute the main class for your plugin for PluginClass, there) to add it. Check out this example of adding a plugin to a game.
  6. Are you actually requiring Phaser somewhere in your bundle? I wonder if the "right" Phaser stuff isn't getting stuck on the global object? In your console, what happens if you "console.log(Phaser);" yourself, on your page?
  7. The good news is the function you pass to the button's handler is just a function; you can call it whenever you want. Samme's right. onInputUp is a Phaser.Signal, and you could dispatch that signal the same way Phaser does.
  8. BOY did that link redirect to a big ol' phishing attack on my phone. Can we kill this post?
  9. I'm not sure I understand your question. You don't want to use Phaser's method for attaching a callback to a button but want to use your own? You could do what Phaser does and save the callback and the callbackContext in your array as well, more or less like you've got in your code block there. Does that not work?
  10. Try some things: In this file try sticking "console.log(Phaser);" near the top, re-package it, and see what changes in the project where you're using it. Do you see a reference to Phaser getting logged, or something else? How are you testing your components? Is that project including the same version of Phaser that your components use? Based on that webpack.config.js Phaser isn't going to get packaged in your distributed JS file (that's what you want!).
  11. It sounds like you're describing a problem with the intellisense in your editor. Your question is: my editor is not showing the constructor's parameters correctly in a tooltip? That code "this.player = Player.constructor();" won't really do what you want and doesn't make sense. You really do want that first one, "this.player = new Player(this.game, 320, 240, 'sprites', 'player0');" (or whatever). What editor are you using?
  12. Caveat: I don't do TypeScript. That doesn't look right to me, any[]... it's not an array, it's an object: https://github.com/photonstorm/phaser-ce/blob/0c9bef16b98095be79e866fbee778a78e24486c3/src/tilemap/TilemapParser.js#L172 Do you have an object layer in your map called "objects"? What happens if you change its name to "cats"? (change your code, too)
  13. Congrats on launching your game! One of my favorite games for demonstrating how polish looks good on simplicity is Peggle. It's essentially pachinko, but all the little touches (extreme fever, rainbows, particle effects, cheering, fireworks) make it lots of fun. The sounds were kinda loud in my headphones, they should maybe be softer? Another thing to play around with is analytics -- where are people stopping? How far are they getting? You could vary the board per level, add more characters. Slow down their animations. On harder levels certain characters could swap places or have special abilities when clicked. You could add a time component, finish this level in ### seconds.
  14. I most often work on projects bundled with webpack or browserify, so I mostly use Node modules installed via npm. My vote is, yes, please use it! All of mattstyles' info is great for that. Publishing to npm is easier than falling off a log.
  15. Hey, these plugins are great! I'm going to be poring through these later this week. You've also inspired me to get my ass in gear about open-sourcing my own Phaser-related stuff. What does the sprite generator do? Like, okay, the sprite generator probably generates sprites ( ; but what problem is it solving? Why generate sprites on the server instead of in the browser?