Hi guys,
I’ve got this pretty simple function but it’s giving me lag whenever the object collides! This only happens on 60fps but 30 fps just isn’t smooth enough for my game. This is the code:
function functions.floorCollisionDetector(event) if event.other == floor then if event.phase == "began" then score = score + 1 scoreTxt.text = "score: " .. score media.playSound("snd/ball\_pop.wav") end else Runtime:removeEventListener("tap", functions.tapBall) local settings = loadsave.loadTable("bounceSettings.json") if settings.highScore \< score then settings.highScore = score end settings.lastScore = score loadsave.saveTable(settings, "bounceSettings.json") composer.gotoScene("endGameScreen", "fade", 500) end end
Could someone help me?
Kind regards
Bram

