Hmm, Id say this is a shape with transformed background and synced with moving. Which is actually a great hack to do and this one particularly looks awesome
I was asking Atilim if we could fill using textureRegions which could have been the way to do things however even that would take up processing cycles.
local cx, cy =0,0local xDir, yDir =1, 1local wd, ht =200, 70local x, y =0, 0
setMask(x,y,wd,ht)--> This is where the magic happenslocal speed =3function move()
cx = cx + speed * xDir
if cx > _W-wd or cx <= -x then xDir = -xDir end
cy = cy + speed * yDir
if cy > _H-ht or cy <= -y then yDir = -yDir end
arrow:setPosition(cx, cy)end
stage:addEventListener(Event.ENTER_FRAME, move)
I think, you have a big white bitmap ,which has a empty rectangular , in front of the background picture. If it is not my opinion will also work Good job.
Let's hope @Atilim now shows us how he does it with a new release....
@ar2rsawseen, yep it is a secret API and in my case not a Bitmap image. It is dynamically created. This came into being as a tablelist view or native controls required clipping/masks or GL_SCISSOR but...
Niiiiice Can you blur the edges? Thinking about a torch light in a cavern...
Have you seen Helsings fire? The ray casting, I think I saw some samples for Flash that created light or shadows using ray casting. There was another articles that used Ray casting to automatically steer a vehicle on a race track (looked like a spider with many legs) Will give ray casting a go and see how it performs.
Comments
Which is actually a great hack to do and this one particularly looks awesome
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Likes: OZApps
Can you blur the edges? Thinking about a torch light in a cavern...
Good job.
@ar2rsawseen, yep it is a secret API and in my case not a Bitmap image. It is dynamically created. This came into being as a tablelist view or native controls required clipping/masks or GL_SCISSOR but...
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps