Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Quick and easy starfield... — Gideros Forum

Quick and easy starfield...

SinisterSoftSinisterSoft Maintainer
edited June 2016 in Step by step tutorials
Using the new particles system...
w=application:getContentWidth()
h=application:getContentHeight()
application:setBackgroundColor(0)
 
stars=Particles.new()
stars:setPosition(w/2,h/2)
stage:addChild(stars)
 
function gameLoop(e)
	stars:addParticles({{x=0,y=0,size=5,ttl=200,speedX=math.random()-0.5,speedY=math.random()-0.5,decay=1.04}})
end
 
stage:addEventListener(Event.ENTER_FRAME,gameLoop)
http://giderosmobile.com/examples#Graphics/ParticlesStars

Makes:
2016-06-19_17-59-46.png
1275 x 760 - 15K
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
https://deluxepixel.com
+1 -1 (+7 / -0 )Share on Facebook

Comments

Sign In or Register to comment.