Miroku_87 Posted August 24, 2014 Share Posted August 24, 2014 (edited) Hey everyone I've got a strange issue with my game.I'm using Phaser for the first time and I'm trying to recreate Space Invaders as a training. I'm now developing the killing of the aliens by the player. On the world I've got a group containing other groups which are the rows of aliens.Since I can't collide nested groups with self or other groups I made a collision between an array of Alien instances and a group of projectiles. You can see all of my code here:https://github.com/Miroku87/phaser-invaders Unfortunately I find a strange behaviour while the alien rows moves (with the help of a time loop).As you'll see in the video I'm linking below, before one row of aliens moves there's a fraction of second in which all of their bodies are in the left top corner and it's not just a debug render problem because if I shoot at that point I actually kill some alien.Maybe it's a preUpdate issue? I just don't know .__. Here the video:https://db.tt/hTLsWHJg I hope someone will be able to give me some suggestion on where to look to fix this.Thank you in advance! EDIT:Interested lines could be https://github.com/Miroku87/phaser-invaders/blob/master/src/states/Game.js#L57https://github.com/Miroku87/phaser-invaders/blob/master/src/agents/AlienGroup.js#L40 Edited August 24, 2014 by Miroku_87 Link to comment Share on other sites More sharing options...
lewster32 Posted August 24, 2014 Share Posted August 24, 2014 What happens if you add this.moves = false to Alien.js after enabling the body? Since you're only using physics for overlap, it makes sense to disable the physics system from trying to position the aliens. Link to comment Share on other sites More sharing options...
Miroku_87 Posted August 24, 2014 Author Share Posted August 24, 2014 Tried it and unfortunately nothing changes.Maybe the problem is how I move the rows?After all we see the rows on top of the others on the top left corner, not the singular alien. Link to comment Share on other sites More sharing options...
Miroku_87 Posted August 28, 2014 Author Share Posted August 28, 2014 Has anybody ever had the same problem before? Link to comment Share on other sites More sharing options...
Miroku_87 Posted September 1, 2014 Author Share Posted September 1, 2014 anyone really? =\This stuff has got me stuck on the project =( Link to comment Share on other sites More sharing options...
Recommended Posts