Difference between revisions of "Donut"

Line 29: Line 29:
 
function love.draw()
 
function love.draw()
 
debug.draw()
 
debug.draw()
 +
-- you could also use debug.draw(xoffset, yoffset) to move the message if you're using a cam
 
end
 
end
 
</source>
 
</source>
Line 39: Line 40:
  
 
* [https://github.com/Kasoki/Donut/zipball/master Download from my master-branch]
 
* [https://github.com/Kasoki/Donut/zipball/master Download from my master-branch]
 +
* [https://github.com/Kasoki/Donut/zipball/v0.1.2 Download v0.1.2]
 
* [https://github.com/Kasoki/Donut/zipball/v0.1.1 Download v0.1.1]
 
* [https://github.com/Kasoki/Donut/zipball/v0.1.1 Download v0.1.1]
 
* [https://github.com/Kasoki/Donut/zipball/v0.1 Download v0.1]
 
* [https://github.com/Kasoki/Donut/zipball/v0.1 Download v0.1]

Revision as of 17:58, 21 February 2012

Donut is a simplified debug message control system for LÖVE.

Debug message control system? wth???

You're able to add debug messages like this:

Donut library screenshot

Usage

require("donut")

function love.load()
	debug = Donut.init(10, 10)
	fps = debug.add("FPS")
	random = debug.add("Random")
end

function love.update(dt)
	debug.update(fps, love.timer.getFPS())
	debug.update(random, math.random(0, 100))
end

function love.keypressed(key, unicode)
	if key == "s" then -- show/hide with "s"
		debug.toggle()
	end
end

function love.draw()
	debug.draw()
	-- you could also use debug.draw(xoffset, yoffset) to move the message if you're using a cam
end

Documentation

coming soon...

Download

Sourcecode

See Also