[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: inkey$ in lua?
- From: "Philippe Lhoste" <PhiLho@...>
- Date: Fri, 31 Oct 2003 09:30:01 +0100 (MET)
> Is there a way to gather single keystrokes from the user in lua?
>
> or perhaps a way to see if any input is waiting without blocking on the
> request?
In base Lua, no way to do this, it is highly dependent on the system you are
running.
For example, you don't use the same way in MS-Dos, in Linux, VMS, Windows or
Mac-OS...
> I want to write a game, but I need the computer to keep working while
> the user
> decides what key top press.
Ah, it remind me of the good old days of Basic programming on 8-bit systems
:-)
In short, depending on what system your game is running (graphical? pure
text?), you probably have to
write a C function to call the correct API/system call, and wrap it for use
in Lua.
Regards.
--
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
Jetzt kostenlos anmelden unter http://www.gmx.net
+++ GMX - die erste Adresse für Mail, Message, More! +++