• Content count

  • Joined

  • Last visited

  • Days Won


Ninjadoodle last won the day on January 30 2015

Ninjadoodle had the most liked content!


About Ninjadoodle

  • Rank
    Advanced Member
  • Birthday 07/17/1977

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    New Zealand

Recent Profile Visitors

2,276 profile views
  1. Hi @enpu When I try to set BackgroundColor in the config file, it doesn't seem to have any effect. Setting it in each scene works fine. Am I putting this in the wrong place? system: { backgroundColor: '#ffffff' }, Thank you!
  2. Inserting Sprite into Anim Bug?

    Hi @enpu I'm trying to insert a sprite into an anim class (as if it were a container), but it doesn't display the sprite correctly. It seems like its not putting the sprite at the correct co-ordinates. Let me know if you need more info on this
  3. Hi @bosyeaiue If you're not interested in conventional coding, then Construct 3 is the easiest and most versatile 'Drag and Drop' Game Maker you will ever find. You do need to buy a license tho, but it is completely worth it, as it will allow you to produce HTML5 games very quickly.
  4. Collision Detection Question

    @enpu - Thanks heaps, that's seems a lot better When testing with the playground example code, it works well. When shooting the lasers there is still some visible pixels in-between, but I think that might just be the way I've coded it or some sort of update issue.
  5. Collision Detection Question

    Hi @enpu - So, I've played with the images and did what you suggested, and part of the problem is that I have transparent pixels around the image. I've been trying to use the setting in your new function to set the size of the rect and circle to make it different than the size of the image. Cutting out the transparent pixels makes it work ... however, I need the images with the transparent pixels and adjusting the size using the function properties doesn't seem to work right - the hitTest is very off. Thanks for your help!
  6. Collision Detection Question

    @enpu - Ok sorry I understand - but yeah it's the same. Just tried changing both to the same container but it's still off.
  7. Collision Detection Question

    Hi @enpu Thanks for your reply, but to be honest I'm not really getting it From what I can tell - what I'm doing is no different that what I see on Panda Examples, yet its doesn't seem to work like yours. Might have to play with it some more and see what I can do.
  8. Collision Detection Question

    Hi @enpu Here is my laser class and my enemy class - I've tried different sizes for the circle and rectangle, like in your updated function, but things still seem very off for me. I'm doing the hitTest in the bottom of the Laser class game.createClass('Spinvader', { rot: 2, init: function(x, y) { this.sprite = new game.Sprite('spinvader.png'); this.sprite.position.set(x, y); this.sprite.anchorCenter(); this.sprite.alpha = 0; this.sprite.addTo(; var angle = this.sprite.position.angle(game.scene.playerShip.sprite.position); var distance = this.sprite.position.distance(game.scene.playerShip.sprite.position) - 256; var xPos = this.sprite.position.x + distance * Math.cos(angle); var yPos = this.sprite.position.y + distance * Math.sin(angle); game.Tween.add(this.sprite, { alpha: 1 }, 500, { easing: 'Linear.None' }).start(); this.tween1 = game.Tween.add(this.sprite, { x: xPos, y: yPos }, 2000, { easing: 'Quadratic.In' }).onComplete(function() { game.scene.stageSetup.shake(, 10, 250); this.rot *= -1; }.bind(this)).start(); this.tween2 = game.Tween.add(this.sprite, { x: x, y: y }, 2500, { easing: 'Quadratic.Out' }).onComplete(function() { this.tween1.start(); }.bind(this)).stop(); this.tween1.chain(this.tween2); }, update: function() { this.sprite.rotation += this.rot *; }, remove: function() { game.Tween.stopTweensForObject(this.sprite); game.scene.spinvaders.erase(this); this.sprite.remove(); game.scene.shot ++; game.scene.progressCheck(); } }); game.createClass('Laser', { init: function() { this.sprite = new game.Sprite('laser.png'); this.sprite.position.set(game.scene.playerShip.sprite.x, game.scene.playerShip.sprite.y); this.sprite.anchorCenter(); this.sprite.rotation = game.scene.playerShip.sprite.rotation; this.sprite.addTo(; game.Timer.add(2000, this.remove.bind(this)); }, remove: function() { this.sprite.remove(); game.scene.removeObject(this); }, update: function() { this.sprite.position.x += game.scene.laserSpeed * Math.cos(this.sprite.rotation - (0.5 * Math.PI)) *; this.sprite.position.y += game.scene.laserSpeed * Math.sin(this.sprite.rotation - (0.5 * Math.PI)) *; // Reverse for loop for (var i = game.scene.spinvaders.length - 1; i >= 0; i--) { var enemy = game.scene.spinvaders[i]; if (game.scene.hitTest(this.sprite, enemy.sprite)) { enemy.remove(); this.remove(); } } } });
  9. Collision Detection Question

    @enpu For some reason I'm still not getting precise collision with moving bullets. I'm using the function as in the example, but for some reason, my bullets seem to be hitting / destroying the enemy 'visibly' off by quite a few pixels (visually it looks like 20-40 pixels). I'm not really sure what I'm doing wrong tho. Any ideas on what could be a cause of something like this? PS. My bullets are moving pretty slow but my circular enemies are constantly rotating.
  10. Collision Detection Question

    @enpu - I'm looking through the functions and I can't see anywhere you're actually setting up the circle and rectangle sizes etc. It's late and I might be missing something
  11. Collision Detection Question

    @enpu - Legend, thank you for figuring it out! Just curious - these 'misc' examples - I can't seem to find them in the menu on the left, only through the links you post here. They would be really useful to include for reference
  12. Create sprite at x/y of sprite inside a container

    @enpu - Awesome thanks for this
  13. Font Questions

    HI @greencoder - Sorry BmGlyph is Mac only I'm pretty sure BmFont should be ok, but I haven't used it myself. I haven't tried using setFont(), so there might be a bug?
  14. Font Questions

    Hi @greencoder - For fonts (bitmap text) you’ll need Bitmap Editor like BmGlyph. There are also a few online ones you can use
  15. Collision Detection Question

    Hi @enpu Thank you for the link! I managed to get the function working, but it still doesn't seem to be very precise. Not too sure if I'm using all the values correctly, but the ships still seem to be getting hit quite a few pixels off (visibly). Any chance of getting a simpler way of doing this implemented in Panda (if you want to avoid P2)? Thanks heaps!