Page 1 of 1

Creating a terminal like interface

Posted: Wed May 02, 2012 3:03 pm
by Matt_D
Oh my, this account still works, and I even used my old default password. October 2006 eh, oh my. Remember the heady days of having to cobble together a kana type interface? Ahhh well.

So I played Analogue from steam and noted it was a ren'py game and thought "hey it's been a while, and this terminal here has got me thinking..." also having been spending the last few months planning out an Eclipse Phase style desktop rpg session it's as though multiple thoughts came together.

So after some faffing I managed to get the hang of creating styles for windows, opening windows, closing windows, putting static text and the like in a window where I'd like it. So the very basic level of framework/screen stuff is easy enough to do.

Stop rambling and get on with it you're saying, so the question.

How does one collect input from the "command prompt" (I'm guessing a use of renpy.input, probably inside some kind of class that collects the typed input RecievedCmd which has some kind of style related to it)

So in my command window I have a

bash $ mytypedcommand (press return)

Then guessing I need to send this to some kind of command list interrogator which if it finds the typed command fires off the requested command with whatever variables are listed, or if there's no such command come back with a "no such command located" or some such.

Of course during all this I want all the text going to the "Terminal" window/screen/thingy (screen > window > vbox ? )

So, any pointers?
Summary of questions just in case my rambling has obfuscated them;
- How do I collect input in a console style format from within my "Terminal" window
- How would I pass this to a list of commands
- And finally how do I send my output to the Terminal window

Of course I'll be using the normal ADV mode for all the interaction and maybe NVL mode for "cutscene" type text, maybe image maps/buttons for some other bits and bobs but that's "easy" enough.

But I want to get the layout and such like down first before I start writing (nothing like being in the swing of things then getting hit by the technical issues, I get enough of that at work.)