Page 1 of 1

New to Lua and LOVE... interactive console?

Posted: Fri Aug 21, 2015 6:39 am
by kidfingers
I heard Lua is interactive. Is there some kind of interactive console available for LOVE games to try stuff in? :crazy:

Re: New to Lua and LOVE... interactive console?

Posted: Fri Aug 21, 2015 7:09 am
by ivan
Lua is an interpreted language.
This means that code can be evaluated after you start your program using "loadstring".
That's probably how the "interactive demo" works on the Lua website.
Sure, with Love2D you can just pass the keyboard input to "loadstring".

Re: New to Lua and LOVE... interactive console?

Posted: Sat Aug 22, 2015 3:17 pm
by Robin
You'll want to use a library for that, there are a few published on these forums. They're usually called debugging consoles.

Re: New to Lua and LOVE... interactive console?

Posted: Sun Aug 23, 2015 5:05 pm
by ejmr
I agree with Robin, and just wanted to add here is one library I have used in the past which was both easy and pleasant to use:

https://github.com/hamsterready/love-console