Jump to content




[1.4/next version] colored output


  • You cannot reply to this topic
15 replies to this topic

#1 notgodsarmy666

  • New Members
  • 22 posts

Posted 13 March 2012 - 11:20 PM

would be neat to change the text-color on the fly.
within the mod (with a program) for each letter...

#2 pieiscool32

  • New Members
  • 44 posts
  • LocationLivonia

Posted 13 March 2012 - 11:23 PM

The program needed might take a while to code, also as far as i know there is no colored text. Also the colored text might cause more lag, because it needs more processing power to run multiple colors.

#3 Neowulf

  • Members
  • 33 posts

Posted 14 March 2012 - 03:06 AM

Nah, shouldn't take much processing to give the option for 16 colors (4bit color palette).
A full 8bit color range would probably spawn entire servers of ascii movie theaters.

#4 kamnxt

  • New Members
  • 80 posts

Posted 25 March 2012 - 02:00 PM

Maybe you could choose one color for the text and one for the background?

#5 Xfel

    Peripheral Designer

  • Members
  • 515 posts

Posted 25 March 2012 - 02:47 PM

One wouldn't need to send the color which each letter processed. It would be enough if you could call "term.background = color.red", and everything written afterwords has red background. If the colors were limited to the 16 default minecraft colors, transferring foreground and background would only need one byte.

#6 Casper7526

    OG of CC

  • Members
  • 362 posts

Posted 25 March 2012 - 03:35 PM

We've had color before it might come back eventually, it was using the minecraft color pallette, but it caused issues with functions in lua itself. However, the biggest fact about color changing is the same thing with graphics. The "asshole" factor.


Lets take Xfel's idea... and use term.color = red (something like that affect)

Then, everything after that is colored red (therefor you only needed to send a small amount of extra data cause you just changed the color.

Well this where the asshole factor comes in when users are given "pretty things"
text = "Hello World"
while true do
term.clear()
term.setCursorPos(1,1)
	 for x = 1, text:len() do
	 term.color = math.random(1,16)
	 write (text:sub(x,x))
	 end
end

Your now sending twice as much data as before for the same amount of text.

Now, this really isn't "too" bad for colors, but it REALLY prevents graphics like people want. Cause imagine if someone used the same setup, but decided to try each PIXEL as a different color.

So all in all, i would say we can expect text foreground coloring in the future, after the issues with lua functions can be resolved, but I don't believe it's a "high" priority item atm.

#7 Liraal

  • New Members
  • 477 posts
  • LocationPoland

Posted 25 March 2012 - 04:01 PM

An idea: make the color change client-side only. So a term.color ran on the computer triggered by one clients alters the color of only one client terminal.

#8 Sebra

  • Members
  • 726 posts

Posted 25 March 2012 - 04:08 PM

bad idea

#9 grinchfox

  • New Members
  • 16 posts

Posted 25 March 2012 - 04:32 PM

Guys is it too hard to send additional 8 bit of color data ? (i mean make terminal use 16 colors) Its not too laggy, look how its done in wiremod's console screen in garrysmod, it was done on lua and its not too laggy for network (only in good usage).

#10 Xfel

    Peripheral Designer

  • Members
  • 515 posts

Posted 26 March 2012 - 08:12 AM

Do you know Remote Desktop Connection? This windows function transmits a whole Computer Screen through the network. And i didn't experience performance problems with it. And that is much more data to be transmitted.

#11 Casper7526

    OG of CC

  • Members
  • 362 posts

Posted 26 March 2012 - 09:25 AM

Now try sharing your remote desktop connection to 20 people at once, see how well you do :o/>

I'm not saying that "when used correctly" it's too much data. I'm saying the "asshole" factor causes this to become a problem.

#12 Amunak

  • Members
  • 7 posts

Posted 26 June 2012 - 11:00 PM

View PostCasper7526, on 26 March 2012 - 09:25 AM, said:

Now try sharing your remote desktop connection to 20 people at once, see how well you do :P/>

I'm not saying that "when used correctly" it's too much data. I'm saying the "asshole" factor causes this to become a problem.

Everything has poor performance if it's written by an asshole :)/> - no reason to not implement colors

#13 Xfel

    Peripheral Designer

  • Members
  • 515 posts

Posted 27 June 2012 - 06:04 PM

Just for your information: in java, a character has TWO of space, but the cc monitor can only display ascii characters, which are only ONE BYTE long. even though minecraft uses utf-encoding to transmit network data, it still means that in half of the cases even a normal ONE-BYTE character needs TWO BYTES. As far as I see, there is one byte that could be used otherwise. Like for colors.

#14 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 27 June 2012 - 06:33 PM

View PostXfel, on 27 June 2012 - 06:04 PM, said:

Just for your information: in java, a character has TWO of space, but the cc monitor can only display ascii characters, which are only ONE BYTE long. even though minecraft uses utf-encoding to transmit network data, it still means that in half of the cases even a normal ONE-BYTE character needs TWO BYTES. As far as I see, there is one byte that could be used otherwise. Like for colors.
Yes, I think someone suggested this before, and it seems a good way to do it. It's pretty efficient, since it uses space that is wasted now.
Let's hope dan adds this :P/>

#15 D3matt

  • Members
  • 830 posts

Posted 29 June 2012 - 12:30 AM

The people saying adding an additional ONE BYTE per character will cause servers to lag into the ground make me laugh.

#16 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 29 June 2012 - 07:25 AM

Agreed. It isn't about network space concerns why it isn't implemented. We will all have to wait and see, but there are no plans to add colours right now.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users