Page 1 of 2
Interactive console
Posted: Wed Dec 16, 2009 10:31 am
by genericdave
It was easy enough to make a simple output-only console for love 0.6, but who's satisfied with simple output? Those of us who aren't on windows need a solution like this to get quick debug information and what I've made works well enough for that. However, is it not reasonable to want an awesome interactive console? I've seen a few mentions of various consoles people have made for love, but I have yet to see any posted for general use.
I made a mock-up, but I doubt if it's much good at all. Instructions are in the main.lua file. Anybody have anything better? Post it!
Re: Interactive console
Posted: Wed Dec 16, 2009 10:47 am
by Gaylard
Needs Unicode support.
Re: Interactive console
Posted: Wed Dec 16, 2009 10:53 am
by genericdave
Gaylard wrote:Needs Unicode support.
DAMN YOUR FEIGNED IGNORANCE!
Re: Interactive console
Posted: Thu Dec 17, 2009 6:01 am
by Magitek
Pretty good for a mockup really, slapped it right into my project and its very useful.
Could use a bit of touching up with editing functions (copy/paste/delete etc etc) and such but overall I think it's a keeper thanks
Re: Interactive console
Posted: Thu Dec 17, 2009 9:32 am
by genericdave
Magitek wrote:Could use a bit of touching up with editing functions (copy/paste/delete etc etc) and such
Yeah, we're in agreeance here. Unfortunately, love seems to be a bit lacking in the input department (just take a look at where I shift keys into upper case). copy/paste from the clipboard might not be possible at this point, and I don't even wanna think about selections and mouse handling and whatnot. I can imagine making it into a simple keyboard-only console though. Maybe throw in a few commands so you don't have to write everything as functions within functions. Command history wouldn't be too bad either, and maybe I could even tackle autocompletion at some point (ooh boy, gettin' ahead of myself a bit there).
However, I'd much rather have some uber-programming-god issue forth and declare my code as crap, showing me the way with the holy gift of his amazing console that he wrote in 5 minutes using one hand (left-hand dvorak of course). Any chance of that I wonder?
Re: Interactive console
Posted: Thu Dec 17, 2009 4:21 pm
by Robin
genericdave wrote:(just take a look at where I shift keys into upper case)
Let me introduce to you:
unicode.
You can do
Code: Select all
function love.keypressed(key, unicode)
(...)
unicode is the key you pressed, but it takes Shift into account, for example.
Just a note: I didn't look in your source. Maybe you use it already. In that case: please ignore above post.
Re: Interactive console
Posted: Thu Dec 17, 2009 6:12 pm
by bartbes
genericdave wrote:Command history wouldn't be too bad either [...] However, I'd much rather have some uber-programming-god issue forth and declare my code as crap, showing me the way with the holy gift of his amazing console that he wrote in 5 minutes using one hand (left-hand dvorak of course).
Well, I do have command history in my console..
Re: Interactive console
Posted: Thu Dec 17, 2009 6:33 pm
by Robin
bartbes wrote:Well, I do have command history in my console..
Too bad you only do right-hand dvorak.
Re: Interactive console
Posted: Fri Dec 18, 2009 8:41 am
by genericdave
Robin wrote:bartbes wrote:Well, I do have command history in my console..
Too bad you only do right-hand dvorak.
Well right-hand dvorak is acceptable, I suppose. However, I assume, bartbes, that you console is the one integrated into you little big planet inspired game. Could that be easily reworked and made so that it can be plugged into any project? I think that's the main thing here.
Robin wrote:Let me introduce to you:
unicode.
You can do
Code: Select all
function love.keypressed(key, unicode)
(...)
unicode is the key you pressed, but it takes Shift into account, for example.
Just a note: I didn't look in your source. Maybe you use it already. In that case: please ignore above post.
I had no idea. I remember reading somewhere that unicode support was non-existant. Hey look, there it is, right in the docs where it should be. Nice.
Re: Interactive console
Posted: Fri Dec 18, 2009 12:04 pm
by Robin
genericdave wrote:I remember reading somewhere that unicode support was non-existant.
Lua itself doesn't do unicode itself, and I believe LÖVE didn't have much unicode support at first either.