Author Topic: Cross-platform C# Console output lib, just in time for the 7DRLC  (Read 7452 times)

dscreamer

  • Rogueliker
  • ***
  • Posts: 65
  • Karma: +0/-0
    • View Profile
I think this is relevant enough to post here (and I thought Development was a better fit than Announcements).

I've cleaned up the code I use for c# System.Console output. Like curses, its purpose is to prevent flickering and unnecessary redrawing. I've also used some trickery to get bright colors working correctly on native Linux terminals.

http://code.google.com/p/parabola-console-lib/

I hope someone will find this useful.

deepshock

  • Rogueliker
  • ***
  • Posts: 80
  • Karma: +0/-0
  • May the Voice always ring true in your ears
    • View Profile
    • Email
Re: Cross-platform C# Console output lib, just in time for the 7DRLC
« Reply #1 on: March 23, 2013, 01:41:09 PM »
I certainly did! Thanks, DScreamer. It improved my 7DRL game significantly!

Only one issue: I'd love to see the string length limiter separate strings with newlines into their own strings. It currently doesn't respect newlines and that means anything with them will get truncated in what seems like an arbitrary fashion.

Here's what I originally did to depict information: I had a screen attached to a single string which refreshed each turn and for-looped each panel to add to the string before it wrote the string as one item. Each row was a newline. That layout wasn't as awkward to me but it was certainly awkward to others, so I'm glad you provided a way to deal with that issue. Thanks!
« Last Edit: March 23, 2013, 02:17:36 PM by deepshock »
Bardess- A party-based roguelike work in progress. Currently in beta and miles away from a release state. Feedback is always welcome.

http://roguetemple.com/forums/index.php?topic=2228.0
https://sites.google.com/site/bardesstemp/

guest509

  • Guest
Re: Cross-platform C# Console output lib, just in time for the 7DRLC
« Reply #2 on: March 24, 2013, 02:15:12 AM »
  I can attest to the massive improvements. Good job all.

dscreamer

  • Rogueliker
  • ***
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Re: Cross-platform C# Console output lib, just in time for the 7DRLC
« Reply #3 on: March 24, 2013, 02:12:56 PM »
I certainly did! Thanks, DScreamer. It improved my 7DRL game significantly!

Only one issue: I'd love to see the string length limiter separate strings with newlines into their own strings. It currently doesn't respect newlines and that means anything with them will get truncated in what seems like an arbitrary fashion.

Great! I've added support for carriage returns, newlines, and wrapping. Here's the rundown:
Screen.wordwrap has been added, and defaults to false, which means text will be truncated at the edge of the screen/panel.
Carriage returns, \r, move printing to the start of the current line.
Newlines, \n, move printing to the start of the next line.

New download: http://code.google.com/p/parabola-console-lib/downloads/list

deepshock

  • Rogueliker
  • ***
  • Posts: 80
  • Karma: +0/-0
  • May the Voice always ring true in your ears
    • View Profile
    • Email
Re: Cross-platform C# Console output lib, just in time for the 7DRLC
« Reply #4 on: March 24, 2013, 11:44:33 PM »
Excellent! You'll be credited in the next version of BMGR.
Bardess- A party-based roguelike work in progress. Currently in beta and miles away from a release state. Feedback is always welcome.

http://roguetemple.com/forums/index.php?topic=2228.0
https://sites.google.com/site/bardesstemp/