LOVE Terminal Emulator

Showcase your libraries, tools and other projects that help your fellow love users.
Draetheus
Prole
Posts: 12
Joined: Wed Dec 29, 2010 9:15 pm

LOVE Terminal Emulator

Post by Draetheus »

Hi all! I've always been fascinated with text interfaces, so I decided my next (well first real) game should be an interactive text adventure. In doing this I implemented a complete terminal emulator! As of now its not easily embedable inside another game, however if there is enough interest I might work on that (a la quake terminal perhaps).

Update 3/31/14:
Made some huge improvements to the handling of the terminal and completely changed the tech demo. The terminal is now custom sizable so my demo now showcases how to implement a quake style drop-down terminal. Use the tab key to activate and deactivate the terminal. I have implemented one valid command: set. You can use this to change the values of the bouncing ball object like so:

set ball.xVel 100

The ball has an x, y, r (radius), xVel, yVel values that you can change using the set command. Any other input will just bring up the list of commands.

The one main bug is that the input line is not wrapped to the terminal width like the output is. I will hopefully have this fixed soon.

Update 4/4/14:
This is just about a full featured terminal emulator now! Output scrolling and line breaking is handled better, the input line supports overflow if you type beyond the terminal width, and output text scrolling can be disabled if you don't want it. I also added some basic comments for usability, but it still needs a wiki.

Demo now supports: set outputScrolling [true, false]

Grab it on bitbucket: https://bitbucket.org/draetheus/lovetty
Last edited by Draetheus on Fri Apr 04, 2014 9:38 pm, edited 3 times in total.
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: LOVE Terminal Emulator

Post by Germanunkol »

Hi,

It's looking nice!
I had to open the scripts to find out what you meant by "try killing". :) Coming from Linux, I am used to "killing" being CTRL+X or CTRL+Q or typing q and then enter (for "quit") and none of those worked.

Two other things I'd implement if I were you: You definitely should print something when "help" is entered. Even if it's just a welcome text... it feels weird when no help is printed. Maybe you should wait until you have more commands running though - then you can actually display the commands.
The easter egg appears before I press enter. That's weird - a console should not respond before I press enter.

The typing effect looks really nice. For using it in a "real" terminal kind of way, that would be somewhat annoying, but for a game this can work out really well.

Looking forward to seeing more about your game!
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
Draetheus
Prole
Posts: 12
Joined: Wed Dec 29, 2010 9:15 pm

Re: LOVE Terminal Emulator

Post by Draetheus »

Thanks for the feedback! I may end up implementing some more keyboard commands, especially copy paste now that LOVE supports grabbing the clipboard.

This is just a tech demo, so basically all it does is echo your input. Its up to the person implementing it in their game what commands to listen for and parse. Also that's the point of the easter egg: to do something you don't expect. My game is going to be a very out of the box text adventure with lots of whacky OMG moments. :D
User avatar
vynom
Prole
Posts: 28
Joined: Sat Oct 05, 2013 4:42 pm
Location: Teh Interwebz
Contact:

Re: LOVE Terminal Emulator

Post by vynom »

I too thought it was a little odd that the easter egg started running before I pressed return, also random text and then entering the command worked too.

I was contemplating something like this as the "ships computer" for my game, so I threw it into the game using my set font, looked good! Was actually pretty simple to integrate, just localized terminal, and the callbacks in main.lua.

I like the simplicity of the design, maybe use a list and commands as keys so you can get the most out of the commands. :nyu:
Draetheus
Prole
Posts: 12
Joined: Wed Dec 29, 2010 9:15 pm

Re: LOVE Terminal Emulator

Post by Draetheus »

Shameless self promotion bump for my update! I'm also calling the project LOVETTY now. :awesome:
neptune12100
Prole
Posts: 1
Joined: Tue Apr 01, 2014 2:12 pm

Re: LOVE Terminal Emulator

Post by neptune12100 »

Gonna have to try this after I get LÖVE 0.9.0 compiled.
User avatar
Izzo
Prole
Posts: 15
Joined: Wed Dec 26, 2012 10:56 pm
Location: Aberystwyth, Uk

Re: LOVE Terminal Emulator

Post by Izzo »

This terminal is a great idea and it can be very useful not only for end-users but as a development tool as well. For instance logging/printing (especially with the current version of love for android which doesn't have console output) or debugging your game.
Draetheus
Prole
Posts: 12
Joined: Wed Dec 29, 2010 9:15 pm

Re: LOVE Terminal Emulator

Post by Draetheus »

Izzo wrote:This terminal is a great idea and it can be very useful not only for end-users but as a development tool as well. For instance logging/printing (especially with the current version of love for android which doesn't have console output) or debugging your game.
There is currently no way to make it function as an output only device like a debugging console, however if there is demand I could make the appropriate changes. I'm thinking about putting it up on bitbucket if enough people want to use it.
Draetheus
Prole
Posts: 12
Joined: Wed Dec 29, 2010 9:15 pm

Re: LOVE Terminal Emulator

Post by Draetheus »

Bump for update, nearing production ready I think!
User avatar
WAWAWA
Prole
Posts: 32
Joined: Fri Aug 13, 2021 5:10 pm

Re: LOVE Terminal Emulator

Post by WAWAWA »

The link no longer works.
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests