Page 1 of 1

love-repl (simple lua console)

Posted: Sun Jan 06, 2013 5:46 am
by ioddly
Hey guys.

Since I couldn't get any of the existing console projects I found to work, I whipped up my own this evening.

Features and misfeatures:

- Boost software license (you don't have to worry about the license or even include it in your documentation)
- Does not override built-in love functions (but does require you to add hooks to draw, keypressed and mousepressed)
- Mouse scrolling
- Basic line editing
- History
- Looks pretty cool because it takes a screenshot of your game, darkens it and then renders the console over it, like so
y189M.png
y189M.png (21.58 KiB) Viewed 439 times
FUvf6.png
FUvf6.png (30.54 KiB) Viewed 439 times
Documentation and code is on GitHub. If you don't care about git, you can just download the main file, save it as repl.lua and require it in your project.

Re: love-repl (simple lua console)

Posted: Wed Dec 04, 2013 6:27 am
by ioddly
A couple folks followed this on GitHub recently, so I felt obligated to tune it up a little. It's now got line editing and a scroll bar. Luxurious! The only major omission right now is word wrapping. Other than that, it's pretty much done.

Re: love-repl (simple lua console)

Posted: Wed Dec 04, 2013 8:55 am
by jjmafiae
looks cool.

Re: love-repl (simple lua console)

Posted: Wed Dec 04, 2013 9:35 am
by veethree
Wouldn't it be simpler to just draw a semi opaque rectangle over the screen instead of the screenshot? Haven't looked at the code or tested it, but that seems like a simpler solution.

Re: love-repl (simple lua console)

Posted: Wed Dec 04, 2013 10:26 pm
by Ranguna259
http://love2d.org/forums/viewtopic.php? ... it=debuger go to the last page for the latest version.