- Home /
Creating infinite particles with trails.
Hi,
I am creating a 2d space game and would like to create some particles(space dust) in the scene to give the player a sense of movement. The player can move in all directions on a 2d plane so the particles would also need to move in all directions. I have seen this effect done very nicely in an iPhone game called Space Miner Blast
You can see in the video the small white trails that get longer and shorter based on the players velocity.
That's the effect I'm trying to achieve.
Any help would be great. Thanks.
Dan
Answer by Tetrad · Jan 09, 2011 at 09:20 PM
I haven't tried it or anything, but something that would probably make things easier is to consider it conceptually as a particle emitter that's on the player that spawns particles around the player that are the opposite velocity that the player is moving instead of filling the world with particles or anything like that.
Thanks for your quick response. This is the sort of thing I was thinking about. Well I thought about attaching it to the camera but the player would be better so it can directly get it's rotation. I imagined the emitter being twice the size of the screen size which in my head works well if you ship is constantly changing direction but what I can't quite see is how to solve the issue if the player just picks one direction and travels for a great distance. Even though the emitter moves with the player the particles have to look like they are co$$anonymous$$g from off screen from which ever (cont..)
direction the ship is moving. This would mean spawning them from off screen not on screen. I don't want particles to just appear in front of the player. The only way I can imagine it is if the emitter is a child of the ship, position a small distance in front of the ship, off screen. There would need to be some initial particles that have already spawned to fill the screen as well as the ability to spawn more off screen. Does this make sense?
Your answer
Follow this Question
Related Questions
Is there a way to draw particles on a raycast? 2 Answers
Infinite Space in Cube 2 Answers
Smoke Trails in lines 1 Answer
How to Create Shields 2 Answers
Atmospheric re-entry effect 0 Answers