A simple library that graphs
Github repo
1) Haha, didn't actually notice thatWetDesertRock wrote:I like it, just added it to my project.
Couple of thoughts:
1) I sense some copy and paste, in your example you have dt in the draw method. It doesn't seem to need to be there.
2) Something happened in my code, and messed up the line width of your graph. Realized you never had a love.graphics.setLineWidth(1) there. Perhaps something like that? I'm also new to love, so not sure if there is a convention I'm missing.
3) I'd enjoy hooking other things (game specific) to the graph. Perhaps an example of how to do this? Wasn't aware I could till I read the source more in depth.
Code: Select all
function updateGraphRandomly(graph, dt, arg)
local val = love.math.random()*arg
fpsGraph.updateGraph(graph, val, "Random: " .. math.floor(val*10)/10, dt)
end
Users browsing this forum: No registered users and 2 guests