Well if you add enough friction, all issues will be settled sooner than later
😄 Looks quite neat, i share your enthusiasm!
W/o friction/gravity - it's a screen saver. With - it made me think of those sand picture frames - where you flip and watch sand grains settle down in water.
Don't you have something to track frames-per-second? I find it quite useful, but doing it right can be tricky. Here is what i do now (sorry for copying Lua, don't have my B/S handy but is trivial to adapt):
FPS_label = director:createLabel {
vAlignment = "top", hAlignment="right", textXScale = 2, textYScale = 2,
textBorderTop = 30, textBorderRight = 70, color = FONT_COLOR, zOrder = 100,
text = ''
}
scene:addChild(FPS_label)
avg_deltaTime = 0.03 -- start value, unimportant
time_to_next_report = 0
function update_fps()
avg_deltaTime = (19 * avg_deltaTime + system.deltaTime) / 20 -- keep running average
time_to_next_report = time_to_next_report - system.deltaTime
if time_to_next_report <= 0 then
time_to_next_report = 1 -- every 1 second
local fps = string.format(avg_deltaTime > 0.101 and '%.1f' or '%.0f', 1/avg_deltaTime)
FPS_label.text = fps
end
end
The interesting parts are keeping (exponential) moving average to stabilize the value - and updating the displayed text less often than every frame (for humane reasons)