Interactive console

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
genericdave
Citizen
Posts: 53
Joined: Tue Dec 15, 2009 9:08 am

Interactive console

Post 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!
Attachments
interactive.love
(3.33 KiB) Downloaded 377 times
Last edited by genericdave on Thu Dec 17, 2009 8:13 am, edited 1 time in total.
Gaylard
Prole
Posts: 1
Joined: Wed Dec 16, 2009 10:46 am

Re: Interactive console

Post by Gaylard »

Needs Unicode support.
User avatar
genericdave
Citizen
Posts: 53
Joined: Tue Dec 15, 2009 9:08 am

Re: Interactive console

Post by genericdave »

Gaylard wrote:Needs Unicode support.
DAMN YOUR FEIGNED IGNORANCE!
Magitek
Prole
Posts: 48
Joined: Sun Dec 13, 2009 2:23 am

Re: Interactive console

Post 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 :megagrin:
User avatar
genericdave
Citizen
Posts: 53
Joined: Tue Dec 15, 2009 9:08 am

Re: Interactive console

Post 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?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Interactive console

Post 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. :P
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Interactive console

Post 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..
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Interactive console

Post by Robin »

bartbes wrote:Well, I do have command history in my console..
Too bad you only do right-hand dvorak.
Help us help you: attach a .love.
User avatar
genericdave
Citizen
Posts: 53
Joined: Tue Dec 15, 2009 9:08 am

Re: Interactive console

Post 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. :P
:o
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.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Interactive console

Post 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.
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 54 guests