thehankinator Posted December 24, 2015 Share Posted December 24, 2015 I made this FPS simple ticker script to get a better idea of how long and often the frame rate drops. It's pretty rudimentary but works. Just call FPSTicker(). Red line = 0FPS, Yellow line = 30FPS. Horizontal lines are every 60 frames. http://steamcommunity.com/sharedfiles/filedetails/?id=583506145 EDIT: Good god why does the forum always butcher code formatting? #The Hankinator's Ticker of FPS function FPSTicker() if ticker_fps_data == nil then ticker_fps_data = {} end context:SetBlendMode(Blend.Alpha) --vertical bars context:SetColor(0.25,0.25,0.25,1) for i=1,5 do context:DrawLine(60 * i, 0, 60 * i, 60) end --horizontal bars context:SetColor(1,1,0,1) context:DrawLine(0, 30, 300, 30)--30fps context:SetColor(1,0,0,1) context:DrawLine(0, 60, 300, 60)--0fps --performance data context:SetColor(1,1,1,1) table.insert(ticker_fps_data, Time:UPS()) for i = 2, #ticker_fps_data do context:DrawLine(i-1, 60-ticker_fps_data[i-1], i, 60-ticker_fps_data[i]) end if #ticker_fps_data > 300 then table.remove(ticker_fps_data, 1) end end 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.