hollowdoor

Members
  • Content Count

    47
  • Joined

  • Last visited

About hollowdoor

  • Rank
    Advanced Member
  1. Would it be too crazy to ask for something like this http://syzygy.st/javascript-coroutines/ as a type of game loop as an option to the normal one.
  2. I want a canvas that is seperate from Phaser, but can be used as a sprite. What I'm thinking: Start phaser Start another canvas mini renderer (this canvas is not in the dom) Move stuff around in the mini renderer When the mini renderer is finished let phaser consume its canvas as a sprite Keep doing steps 3 and 4 I know how I would do it if I were building my own renderer, but I would rather not do that. It would be nice if it can be done with Phaser without using Phaser built in structures, so I can transfer the object to a different framework if I like. In other words I don't want my mini renderer to depend on Phaser, but I still want to use Phaser. Also there is the BitmapData object, but I don't yet know how Phaser consumes those. Are BitmapDatas rerenderable? I'd like to be able to render before every time phaser renders. The docs for BitmapData say: So if you need to dynamically create a Sprite texture then they are a good choice.
  3. So I have an image in a javascript Image object. What would be the best way to add that image to a game?
  4. I guess I could have been more clear. lol I guess I should have said set velocity to 0, or something like that.
  5. If you want the player animation to be still just use the frame property. Like: this.dude.frame = 40;Put that somewhere in your update after an if else condition you like. Like valueerror said. You can check the onFloor() state, and set the sprite frame to whatever you want.
  6. I just finished using this tutorial to make a path, and use saved points in the update to make a sprite follow the path. As it is I have no physics on the sprites, but I just realized the sprite movement has no speed controls. Is there a way to use points from a path like this while updating physics properties? Normally a sprite's x,y is subject to the update with velocity, but the x,y is being set explicitly here. I'm not using gravity. I just think it would be nice to speed up, or slow down the sprite along the path. I don't see velocity working for this. If there is an option that doesn't involve physics I would be fine with that too.
  7. As an addendum it might also be useful to use interpolation on a polygon's points to get smooth curves. Then I can use the original polygon for the physics body. Per the needs of my original question. The polygon would have to have a lot of points, and there would also be a clipping problem with the interpolated lines too. It would be worth it though.
  8. Oh. Here is how to do it. I gotta search the docs better. I can generate my point arrays, and give them to a bitmap data object for a texture. The bitmap data can be used as a sprite, and I can give that same point array to addPolygon of the P2 body of the sprite. How about that? Turns out it's not so hard. Now I don't know if this should be a question warranting a new thread. Is there a way to clip a sprite's image with a polygon? This would be useful to cut every part of the image that's outside of the polygon area. It would allow almost any shape with any texture. Thanks for the help guys.
  9. What about dynamic in game created polygons? I've already found a tutorial on handmade polygons, but I'm looking for a way to use dynamically created ones.
  10. I think I may be wrong about what I mean. Interpolation would be more for tweening. I'm asking if there is a way to use a curve as a shape that can have collision?
  11. What facilities does phaser have for using lines created from interpolation as boundaries for collisions?
  12. You need to use your own implementation. You probably need to stop the normal physics, and use tweens while the sprite climbs. Look at this: Ladders?
  13. On the other hand you can just use regular javascript to play the music after pause.
  14. Better animation events. Don't know how many times I've had trouble with the current animation events because they are not tied to a specific animation.
  15. So that's why I was so confused when I read your post. Well that was dumb of me. I was half asleep when I replied to you. How embarrassing.