From aa56248e345ca1e0022718c8a9a6d76275968145 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Mon, 18 Oct 2021 23:27:54 -0400 Subject: [PATCH] Add an FPS counter --- main.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.lua b/main.lua index 72e97e1..f54b3c1 100644 --- a/main.lua +++ b/main.lua @@ -78,7 +78,10 @@ function love.draw() if config.gamesettings.display_gamemode == 1 or scene.title == "Title" then love.graphics.setFont(font_3x5_2) love.graphics.setColor(1, 1, 1, 1) - love.graphics.printf(version, 0, 460, 635, "right") + love.graphics.printf( + string.format("%.2f", 1 / love.timer.getAverageDelta()) .. + "fps - " .. version, 0, 460, 635, "right" + ) end love.graphics.pop()