 |
The TinTin++ message board
|
 |
| View previous topic :: View next topic |
| Author |
Message |
ixle
Joined: 15 Sep 2011 Posts: 133 Location: United States
|
Posted: Thu Mar 22, 2012 3:06 am Post subject: Set exit color from within Tintin |
|
|
Forgive me if there's already a way to do this, but I would find it useful if I could change the color of the character used for an individual exit link on the map in asciigraphics mode, specifically for making some exits "invisible" without hiding the roomsymbol of the connecting room, but I'm sure there are lots of other uses for colored links, not just rooms.
I think I could accomplish this by editing the map file manually, but would a client option be difficult? |
|
| Back to top |
|
 |
Slysven
Joined: 10 Apr 2011 Posts: 254 Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK
|
Posted: Mon Mar 26, 2012 6:03 pm Post subject: |
|
|
Well, the #MAP COLOR EXIT <color> command sets the color used to draw ALL the exits on the map (for when you have the #MAP FLAG ASCIIGRAPHICS flag set) and you can't get around this by editing the map file manually. I've hacked my personal version by overriding that setting by a per area one - but the code ain't pretty even if the maps are!
I suppose I could take it further and allow for per exit coloration, but I've found the hard way that by allowing for the replacement of the single characters '|', '\', '-', '/' and '|' used to draw the exits with strings of codes representing Unicode characters (to allow purpose draw font glyphs to show the state of an exit direction: "none", "normal", "door", "avoid [locked]") AS WELL as well as multiple color code strings of the <###> form to color each room, that the lines of characters to draw each horizontal line that makes up the actual map display has grown a lot and screen updates are begining to slow for me. I usually run on a widescreen monitor that can draw about 200 characters across the screen but I monitor the lengths of the strings I am trying to "paint" across the display and I have reached nearly 2000 characters to processs before now. I am looking to try and optimise this more before I show it to the world, but coloring each exit will only make this worse I think.
It may be possible to improve this by using a library that enables you to "paint" individual characters on a screen in what ever colors area availible in what ever order is convenient, without worrying about what is around them and then when you have finished building what you want to display, causing it to be shown. This is typically where the "CURSES" library comes in - I have mooted the possiblity of using the NCURSES terminal handling library. This is specifically designed to optimise drawing text based UIs to redraw a screen full of characters in the fastest way for what ever terminal it is attached to - indeed the library is currently maintained I believe by the same person who is the guardian of 'xterm', the granddaddy of many of the virtual terminals that GNU/Linux and Cygwin users of TinTin++ (though not necesserily WinTin++) use. This library also has sub-libraries called Panel and Menu that provide overlapping sub-windows and menubars respectively, both of which could be used to add functionality to the TinTin++ project. For instance, it could eliminate the need to use tmux by some to provide extra information displays, it could also bring in mouse support on suitable systems so you could click on a map room and set that as the destination for a #PATH. To impliment this though would not be a trivial undertaking, and I understand that Mr Scandum would be reluctant to go in this direction - and you have to factor in the overhead of using another block of code that offsets the screen redrawing time that it may achieve - I also realise that for many users, if it ain't broke, there is no need to fix it...
Anyway, that's my two cents worth.  |
|
| Back to top |
|
 |
ixle
Joined: 15 Sep 2011 Posts: 133 Location: United States
|
Posted: Mon Mar 26, 2012 7:28 pm Post subject: |
|
|
| So, I'm not knowledgeable enough to have followed that whole post, but am I correct in saying the jist was "It would not be easy to add functionality for unique exit coloring" ? |
|
| Back to top |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3274
|
Posted: Tue Mar 27, 2012 6:54 am Post subject: |
|
|
| It's possible to add support for this, but I'm not convinced it's absolutely needed at this point. |
|
| Back to top |
|
 |
Slysven
Joined: 10 Apr 2011 Posts: 254 Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK
|
Posted: Tue Mar 27, 2012 9:00 am Post subject: |
|
|
Well, with my tendency to call "a spade" a "portable earth relocation assistance device" I do tend to get detailed too quickly. What I was trying to say is that with the current state of play, if it were done, it would probably slow the system down noticably if it was used a lot...  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
TinTin++ Homepage
Powered by phpBB © 2001, 2002 phpBB Group
|