Hi folks,
when you constantly use transitions, the framerate goes down after a while. This bug exists in all current and beta version. This is kinda a show stopper for me as my whole concept relies on transitions.
Here is a little script that shows the effect in the simulator. I noticed the same on my IPod in my game:
display.setStatusBar( display.HiddenStatusBar )
local tPrevious = system.getTimer()
local millisec, framecount = 0,0
local spr = nil
local onComp, OnComp2
grp = display.newGroup()
onComp = function (target)
transition.to(target, {time=math.random(1500,2000), x = math.random(20,300),y = math.random(20,460), onComplete=OnComp2})
end
OnComp2 = function (target)
transition.to(target, {time=math.random(500,1000), x = math.random(20,300),y = math.random(20,460), onComplete=onComp})
end
for i = 1,30 do
spr = display.newCircle( 0, 0, 16 )
spr:setFillColor(255,0,0,255)
spr.x = math.random(20,300)
spr.y = math.random(20,460)
grp:insert(spr)
transition.to(spr, {time=math.random(500,1000), x = math.random(20,300),y = math.random(20,460), onComplete=onComp})
end
local fpsText = display.newText( “030”, 0, 0, “Verdana-Bold”, 12 )
fpsText:setTextColor( 255,0,255 )
function onFrame(event)
local tDelta = event.time - tPrevious
tPrevious = event.time
framecount = framecount + 1
millisec = millisec + tDelta
if millisec >= 1000 then
fpsText.text = framecount
millisec, framecount = 0,0
end
end
Runtime:addEventListener( “enterFrame”, onFrame )
[import]uid: 5712 topic_id: 832 reply_id: 300832[/import]
[import]uid: 5712 topic_id: 832 reply_id: 2445[/import]