• Content Count

  • Joined

  • Last visited

About CodeToWin

  • Rank
    Advanced Member

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
    Not Telling
  • Location
    United States

Recent Profile Visitors

947 profile views
  1. I visit almost daily, so I'm happy to help
  2. sprite.scale.setTo(x, y); x and y are the integer multiples by which to scale the sprite's size. 2 to double, etc.
  3. when you make a new map in Tiled, it asks you for the tile size. Make sure it's set to 8 x 8
  4. it sounds like there is a mismatch between the size of your map in Tiled and the size of your individual tiles. What is the width and height of your tiles, and what is the width/height of your map?
  5. would someone else be so kind as to check the link to see if it is working for them?
  6. that's just bizarre... I had a buddy test it and it worked for him as well. To be safe I cleared the site cache. Maybe try clearing yours?
  7. Just now i updated the link in the text above to the correct permalink structure (without the % symbols).
  8. I also use Brackets, but I don't use the built in previewer because it doesn't always work properly. I load the index.html page directly into chrome for testing.You will need to set up a web server for this approach. I recommend xampp, as it works well for me. If the tutorials are giving you problems, then here is another approach: start with the example codes. Start with the section on sprites, since they are foundational to game programming. Move on to Input and Arcade physics examples. AT least this way you can see how the framework functions, and perhaps it will clarify whatever is keeping you from the proper tutorials.
  9. @rich thanks for the heads up! It *should* be fixed now. It's funny, the links always worked for me on my desktop and the wife's laptop, so I had no idea there was an issue. Again, thanks!
  10. after you have define the sprite's position, try using sprite.fixedToCamera = true;
  11. check out this tutorial
  12. create: function() { healthBar = this.add.sprite(0, 988, 'healthBar'); maxHealth = this.add.sprite(0, 1000, 'healthBar'); healthBar.anchor.setTo(0,1); healthBar.scale.setTo(1, 0.5); maxHealth.anchor.setTo(0,1); maxHealth.alpha = 0.5; healthBar.fixedToCamera = true; maxHealth.fixedToCamera = true;}bulletHitPlayer: function(player, bullet) {; bullet.kill(); -= 10; healthBar.scale.setTo(, 0.5); if ( <= 0) { player.kill(); } }The above is my simplistic implementation of the health bar. The maxHealthBar outlines the full health and is always visible to let the player know approximately what percentage they are at.
  13. CodeToWin

    States Help

    you're welcome, I hope it's helpful
  14. check out this thread, I think there is some useful information
  15. I think a place to start is here You could have a number of predrawn images that you load (your levels) with the goal to clear them out by clicking the mouse. I don't know about using an arbitrary BMP file. Given that the sizes of these are at least of order 100x100, that's 10,000 clicks just to clear ONE image. I don't think this is feasible for a game. The percentage clear would be the total number of pixels with the "clear" color (white or grey or whatever) divided by the total pixels.