Hey guys,
I have applied the following code for moving the particles in background. But this codes make the game slow in few minutes.
local function onTimer() if pauseGame~=true then local particleSystem = physics.newParticleSystem{ filename = "images/particle.png", radius = math.random( 2, 5 ), imageRadius = math.random( 2, 5 ) } particleSystem.myName = "myParticleSystem" local particleParams = { flags = { "water" }, velocityX = 40, velocityY = 0, color = { 1, 1, 1, 0.4 }, x = math.random( 10, 750 ), y = math.random( 10, 1000 ) } particleSystem:createParticle( particleParams ) end end particletimer=timer.performWithDelay( 1000, onTimer, -1)