Have you already read post like "do not call draw functions inside love.update" ?
I already read it ! I think lot of beginners do this kind of mistakes.
Do you think "I'm not a beginner, I don't do this kind of things". Are you really sure ?
What are you call in love.update ?
The goal of the project
Provide a easy to setup way to check if you do bad things (define by yourself and/or per the love policy).
I quickly setup a config for demonstration.
It's not strict, it not raise error, it only print message.
How it run
Technically,
it use the debug.sethook to see function's calls and function's returns.
When it call in a function (it change the current context if the function is defined in config)
When a function is call, it check if this function is watched. if yes it check if it allowed in the current context.
How to use it
You just need to put at the beginning of your love.load function in "main.lua" file :
Code: Select all
require("lce-love-config")
- See if it's normal to have only one message printed for call of print in update
- Show the full call name like "love.graphics.print" instead of "print"
- Forward the debug info table to the handler
- Show more info like like line number in usual error message
- I need to check more with existing love game to see if there is not bug.
- Need to define more the love policy.
- Think about a way to detect callback change (to add missing callbacks)
Download