Skip to content

GoonHouse/monocle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Monocle

Debugging Love2D, in style

Monocle is a way to easily watch things while you play your game. It's easy to implement, and easy to understand. The setup of a basic main.lua file is as follows:

require 'monocle/monocle'
Monocle.new({})

-- The most basic way to watch any expression or variable:
Monocle.watch("FPS", function() return math.floor(1/love.timer.getDelta()) end)

function love.update(dt)
	Monocle.update()
end

function love.draw()
	Monocle.draw()
end

function love.textinput(t)
	Monocle.textinput(t)
end

function love.keypressed(text)
	Monocle.keypressed(text)
end

Easy as that! When the game is run, what you're watching will show up in the top right of the screen.

For more information on how to use Monocle, as well as the official Love2D forum post, look here.

About

An open source debugger for Love2D.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 75.2%
  • Lua 24.8%