sapptime

Members
  • Content count

    7
  • Joined

  • Last visited

About sapptime

  • Rank
    Newbie

Contact Methods

  • Twitter
    thesapper

Recent Profile Visitors

560 profile views
  1. sapptime

    Using Phaser together with React

    You can definitely do something like this. I'd recommend checking out Preact as an alternative to React if you're only going to be using it for Game UI. Pretty much everything you get with React in a package that's ~3kb. The approach I'd recommend is to have a (P)react component that renders your Phaser canvas element, and have that component's shouldComponentUpdate method always return false. That way the game won't reload every time there's a change to the UI and you can take advantage of state changes in your UI without impacting the rendering of the game.
  2. sapptime

    How to call functions stored in an array

    Shouldn't it be command[val](); The way you're doing it above uses the string 'val' instead of the parameter you're passing.
  3. sapptime

    Phaser 2.5 Roadmap (and request for ideas)

    1. Sounds awesome if it doesn't impact the API too much. I'd definitely share your concern about it being too bleeding edge though. 2. Sounds great. 3. Amazing - I've been working with tile maps quite a bit in a game I'm currently working on, I've tried both the Tiled plugin and the built-in, and if it gives any kind of performance boost on mobile, especially when scrolling, it'll be an awesome improvement to have. 4. I could take it or leave it, but I'm not familiar enough with SAT to understand the reasoning behind it. 5. Could take it or leave it at this point, as I know this is the way Lazer is headed anyways. 6. Sounds like a great add on that wouldn't take too much work to do. To sum up, I love the idea of 1,2,3 and 6. 4 and 5 (selfishly) mean less to me, but I'm sure they'd be great additions.
  4. RT @photonstorm: The @StackOverflow Unikong game is made in #phaserjs :) https://t.co/ofoP1mRZDc https://t.co/5h8ZOt7spz

  5. Alternatively, you could flag the enemies for destroying in the forEach, then on your next update, destroy all the ones you flagged.
  6. I would assume that it impacts the foreach loop if you're destroying group memberd during the loop. I haven't tested to be sure, but instead of doing the foreach, I think you'd want to do something like enemies.callAll('someDestroyCheckFunc')...
  7. sapptime

    Share a group between multiple states

    There are actually a couple of ways to do this. You can add the group to the game.stage (persists outside of the game.world), or, you could just not clear the game world when switching states, using game.state.start(newStateName, false, false) and have a group for the game objects and a group for persistent ui objects. When switching states, you'd clear the group with the game objects manually from the state's shutdown method.
  8. sapptime

    Thoughts on consolidating Pixi into Phaser

    1) No 2) Very rarely - in a couple of cases I've added utility methods to some core pixi classes so they trickle down to anything extending them, but these could be easily moved. 3) I mostly manually define the renderer due to the issues mentioned above. I'd say go for it.