String of moving sprites following the player, most efficient way to do it?
问题 I'm working on a JavaScript game using Phaser, where the player picks up blobs and the blobs then follow the player. So there will be a string of sprites following the player's movements, kind of like the "options" in Gradius or the line of balls in the game Zuma. My question is, what is the best way to get this effect? At the moment my method is like this: Keep a large array of x/y positions For each frame update, go to next array index Put the player x/y position in the array at current