oakler

Members
  • Content Count

    9
  • Joined

  • Last visited

  • Days Won

    1
  1. Well it has proven very effective with this newbie! I'm learning a lot. Architecture is the hardest thing IMO to wrap one's head around, and your example is helping me a lot. I hope to see the tutorial someday. Thanks!
  2. Looks well-modularized @ivan.popelyshev and I definitely like the ECS approach. Is this a project you have on Github?
  3. Thanks @ivan.popelyshev After having tried my "addChild" approach, I can see how it can become problematic (having to manage removing it from the parent platform and back into the stage, etc.) Side note: I am building the physics behaviors from scratch, because I find most physics engines to be too prescriptive. But I think my question is better for the more-general 2D Coding board. Have a happy New Year!
  4. Challenge solved, but with a different approach. Instead of adding velocity to the player, I simply made the player a child of the platform. I'd still be curious about the above question, or maybe it would be useful to someone else.
  5. Hi, My challenge: I have a platformer in which I have platforms moving based on tweens. When the player lands on a platform, I want to add the velocity of the platform to that of the player, so that the player can move independently, but still be affected by the platform beneath her. The problem is, tweens don't have a velocity property (e.g. vx, vy). They move objects by updating the x and y positions directly. Any help towards the right general approach would be appreciated. Thank you!
  6. Thank you XekeDeath and Rich! This is a huge help. Best
  7. Hi, Is it possible to add text to a group? Or is it limited to only sprites? I tried code like this to no avail: foo = game.add.group();foo.create(0,0,'bar'); // adding a spritefoo.add.text(0, 10, 'some text', { 'font': '22px Helvetica', fill: '#fff' }); // doesn't workIf text can't be added to a group is there some workaround for creating text that can be manipulated along with sprites as part of the same unit? Thank you
  8. Thank you very much XekeDeath. That did the trick!
  9. Hi, Changes to the fontSize style don't seem to work: scoreText = game.add.text(16, 16, 'Score: 0', { fontSize: '22px', fill: '#fff' });The fill-color changes work fine, and I've tried drastically different fontSizes to make sure. I've also tried different browsers: Chrome and Safari for OS X. Anyone else have this issue? Also, I've read through the docs and can't find what styles are (or aren't) supported. Thank you