KSP-KOS / KOS

Fully programmable autopilot mod for KSP. Originally By Nivekk
Other
697 stars 230 forks source link

Support for drawing simple graphics. #1981

Open eberkain opened 7 years ago

eberkain commented 7 years ago

We should be able to create something like this with kOS.
http://i.imgur.com/JoLF1vz.gif?1

Dunbaratu commented 7 years ago

So many good ideas, so little time to implement them.

I agree that this would be good. We could even emulate vector graphics displays of the era.

I've been thinking of this in the back of my mind but not implementing it yet because other bigger things keep happening with the mod.

The basic implementation in Unity would be this: Unity has a type called RenderTexture, which functions as a Texture2D but lets you draw primitives like lines and polygons into it. We could basically paint the terminal with one of these as the background behind the text letters.

Then the primitives would be objects like VECDRAW.

eberkain commented 7 years ago

I was doing something thinking about it and I don't see a way to make it also work over telnet.

Dunbaratu commented 7 years ago

Yeah there's pretty much no way to display it over telnet unless you have a terminal emulator that can do some of the more sophisticated terminal stuff that came out in the end of the era of terminals.

There were some terminals that could do pixel graphics by having you send escape sequences that define things like start x,y, end x,y, color, to draw a line. But making emulation support for them was never popular and people probably won't have terminal programs these days that can do them.

There's also a GUI system coming out in the next kOS release (who knows when) and it may make sense to just allow the drawing of graphics on that instead of the terminal screen (but I do kind of like it being on the terminal screen... not sure which is best.).

eberkain commented 7 years ago

I was unable to find a telnet client that had any kind of support for drawing graphics.

Dunbaratu commented 7 years ago

There are some old X11 applications for Linux or Mac that do it. (Not so much telnet clients, as terminals in which you run the telnet command-line program).

But yeah I doubt it would be worth trying to support it today. People believed the claim that you can only do text over a socket command line like ssh or telnet, and although it wasn't true it was widely believed enough that graphics terminals didn't get much traction. Most people making telnet clients were doing so under the impression that if they can mimic a text terminal, their job was done. The terminals that could do graphics were never popular enough for much software to be written for them. Just as they were coming onto the scene, the X11 window system was gaining traction making them sort of pointless.

That being said, there was one really really OLD graphics terminal standard from the 1970's by Techtronix that you really don't want to use - like you couldn't erase one line - you had to erase the whole screen or erase nothing at all. (It operated on the etch-a-sketch principle.) This was because of a fascinating but now obsolete technology they invented that actually took advantage of the "ghost" effect on a CRT screen.

zakukai commented 6 years ago

I'd really love to see this one get implemented. I think it'd be reasonable to implement it in a way that doesn't work over telnet (though I think it'd be fun to actually support ReGIS). Another possibility would be to serve terminal sessions via HTTP and web page logic, rather than telnet - then users will be able to remote-control kOS (graphics and all) without having to install a terminal program if they haven't got one. I like the aesthetic aspect of kOS, I actually would love to see various obsolete display technologies implemented in kOS as configurable options for each CPU part. For instance, the options could include:

All the graphical displays would be locked to a particular CRT size, display resolution, and data rate - so a particular "model" of terminal provides a stable "target platform" for people writing scripts. (Resizing the terminal window in the KSP UI would scale the whole display, but not change the number of character cells or pixels from kOS's perspective.)

I know talk is cheap, until or unless I'm prepared to implement this stuff myself... But I guess the short version is, actually, yes, I would like to use a Tektronix in KSP. :)