Author Topic: Grouping the ASCII symbols?  (Read 39050 times)

Etinarg

  • Rogueliker
  • ***
  • Posts: 424
  • Karma: +1/-1
  • Idea archivist and game tinkerer.
    • View Profile
    • Gedankenweber Blog (German)
Re: Grouping the ASCII symbols?
« Reply #15 on: July 26, 2010, 08:05:33 AM »
At the moment I render my game to a graphical context, so I'm free to choose colors. Only questions of tradition, usability and such are to be guidelines.

Also, I'm not really working on a specific game right now. The question I pose here are kind of research. I have never made an ASCII based game so far, only tile based games. Actually I made tiles for ASCII based games, like in my Iso-Angband try ;) So there is a lot of things about ASCII that I want to learn first.

Do you have links to the "extremely pretty" settings, or game suggestions for such research? I'd like to take a look, to learn what works well, or how the people use ASCII and colors to the best effect.

jocke the beast

  • Rogueliker
  • ***
  • Posts: 103
  • Karma: +0/-0
    • View Profile
Re: Grouping the ASCII symbols?
« Reply #16 on: July 26, 2010, 02:52:33 PM »
I suggest you check out Brogue, it's ascii and beautiful :)
It's also very funny to play if you havn't already.


http://sites.google.com/site/broguegame/
« Last Edit: July 26, 2010, 02:57:07 PM by jocke the beast »

Etinarg

  • Rogueliker
  • ***
  • Posts: 424
  • Karma: +1/-1
  • Idea archivist and game tinkerer.
    • View Profile
    • Gedankenweber Blog (German)
Re: Grouping the ASCII symbols?
« Reply #17 on: July 30, 2010, 10:07:17 AM »
Thank you for the suggestion! Looks interesting, although I think someone told me that I should not use background colors other than black with my project ...

I think I have now found a set of 16 colors that are somewhat good looking and well distinguishable. I don't want to go beyond 16 colors for my experiments.

I'm working on assignments of symbols and game elements, and found that is is somewhat tricky.

aBeing

  • Newcomer
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Grouping the ASCII symbols?
« Reply #18 on: August 02, 2010, 05:50:31 PM »
Going beyond the normal terminal colours means using a different display library than the standard and easily portable curses.
I am not sure if you mean to include ncurses or not, but ncurses supports, dependent on terminal capabilities, both more than sixteen colors as well as redefining colors by specifying arbitrary RGB values.  That is in addition to the other attributes many terminals support such as standout, dim, bold, reverse, underline, etc.

Of course, if one chose the ncurses library to provide portability, then to make the display both aesthetic and functional on the widest variety of terminals one would need to pride some sort of fall-back strategy.

I redefine my colors to be a little better suited to my world, but I try to keep them roughly in-line with the standard eight terminal colors and their brighter variants so in the case that I cannot redefine colors on some terminal I do not get a really bizarre looking map.  To nicely support more than sixteen colors I just use a bitmask on the palette index to strip it down to the correct size for that terminal.  Since I know that color 23 will fall back to 7 in sixteen color mode as well as eight color mode I make sure that color 23 is similar (or at least will make sense) as color 7.  I only redefine the standard eight and brights to make them "nicer" but if the terminal doesn't support that it's no problem.

By the by, I'm a RL developer who has recently come out of the closet.  I've been harboring ideas and code snippets for years, nay decades, and just recently decided to do something about it.  Hence, this is my first post ever to the RL community on any fora or newsgroup despite having read r.g.r.d for too many years to count.

getter77

  • Protector of the Temple
  • Global Moderator
  • Rogueliker
  • *****
  • Posts: 4957
  • Karma: +4/-1
    • View Profile
Re: Grouping the ASCII symbols?
« Reply #19 on: August 03, 2010, 01:11:40 AM »
Welcome to the Temple aBeing---it'll be interesting to see what you come to cook up an think up!   8)
Brian Emre Jeffears
Aspiring Designer/Programmer/Composer
In Training

Darren Grey

  • Rogueliker
  • ***
  • Posts: 2027
  • Karma: +0/-0
  • It is pitch black. You are likely to eat someone.
    • View Profile
    • Games of Grey
Re: Grouping the ASCII symbols?
« Reply #20 on: August 05, 2010, 09:18:33 PM »
Nice approach, aBeing.  Most people consider working in 256 colours with ncurses to a painful experience, especially where portability is concerned, but your idea is quite sensible.

Good to see another dev popping up - let us know about your projects some time  :)

Etinarg

  • Rogueliker
  • ***
  • Posts: 424
  • Karma: +1/-1
  • Idea archivist and game tinkerer.
    • View Profile
    • Gedankenweber Blog (German)
Re: Grouping the ASCII symbols?
« Reply #21 on: August 06, 2010, 11:33:04 AM »
I found a few symbols that are not 7 bit ASCII, but seemed available on many systems: « » ± ¥ £

Are there known problems with those? I mean, systems which are still in use, and cannot display those?

Bear

  • Rogueliker
  • ***
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: Grouping the ASCII symbols?
« Reply #22 on: September 27, 2010, 05:40:53 PM »

Etinarg

  • Rogueliker
  • ***
  • Posts: 424
  • Karma: +1/-1
  • Idea archivist and game tinkerer.
    • View Profile
    • Gedankenweber Blog (German)
Re: Grouping the ASCII symbols?
« Reply #23 on: September 28, 2010, 08:02:27 AM »
Besides these technical aspects, you still need fonts with the required glyphs. Unicode inside the program will not help much if the font used for display does not have the glyph.

Problem is that many fonts are platform specific, and almost all fonts are lacking some glyphs - and if you as a programmer do not know which glyphs will be lacking on which system, you have a problem if you use those for something important.

This was why I asked about the glyphs shown above. I think those are in most fonts, but I'm not sure. Under the hood my roguelike game kit uses unicode, but that doesn't help much with the glyph availability problem of the fonts.

Bear

  • Rogueliker
  • ***
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: Grouping the ASCII symbols?
« Reply #24 on: September 28, 2010, 04:32:56 PM »
While there are a lot of fonts that don't have those (or any non-ascii) glyphs, as far as I know there are very few systems which, by default, use such a font in their default setup for term programs.  In any Unicode locale, I'd be comfortable with assuming AT LEAST all of latin-1 and latin-2, plus most of the operators from the mathematics area.

RogueMaster

  • Rogueliker
  • ***
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Re: Grouping the ASCII symbols?
« Reply #25 on: October 18, 2010, 06:39:19 PM »
I agree on the ~ water idea. The * is a wall treasure in Angband, I believe, and I seem to remember the essence thing from Tome, too. I assume both the ~ and the * can be color coded to make the use clear (water should be blueish).

The numbers for the shops I found confusing too. Maybe I will rearrange that.

Thanks for the feedback that helps a bit to sort my symbols :)

For water cells, you can use the ASCII character number "247". That is a duble "~": "≈". That is used in Dwarf Fortress and looks better since it makes the water pool to look more dense.
Also, I found some roguelikes that uses the "~" to represent bandages.

Etinarg

  • Rogueliker
  • ***
  • Posts: 424
  • Karma: +1/-1
  • Idea archivist and game tinkerer.
    • View Profile
    • Gedankenweber Blog (German)
Re: Grouping the ASCII symbols?
« Reply #26 on: October 20, 2010, 09:57:08 AM »
Strictly seen character number 247 is not ASCII. ASCII is only 7 bits, 0...127

It's a nice character for water, just as with all "high" characters suffers the question of portability - if it will display correctly on all systems.

But maybe these problems are now past. It seems a good number of roguelikes use unicode or other sorts of extended character sets with good success.

RogueMaster

  • Rogueliker
  • ***
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Re: Grouping the ASCII symbols?
« Reply #27 on: October 20, 2010, 07:05:20 PM »
Strictly seen character number 247 is not ASCII. ASCII is only 7 bits, 0...127

It's a nice character for water, just as with all "high" characters suffers the question of portability - if it will display correctly on all systems.

But maybe these problems are now past. It seems a good number of roguelikes use unicode or other sorts of extended character sets with good success.


I don't think you have problems with Linux Systems und that character.
I don't have right now installed a penguin on my computer, but you can just ask someone to try a simple program that writes that character on console and tell you if it does exist.

In the other hand, FreeBasic (and surely C too), has a serie of libraries to implement a more advanced version of the simple print or printf, independently of the system font's, unicode, or whatever. The first example that comes to my mind is XFonts (for FreeBasic), and probably FreeType can be usefull too for this purpose, although i never messed up with this last one. And they are 100% portable.

Whatever it be, a blue "~" always (wants to) mean "water cell".
The only problem comes when you use such symbol for bandages or something that has a kind of wave or torsion in it's form. Only color coding, as you say, could save the troubleshoot. ;-)

jocke the beast

  • Rogueliker
  • ***
  • Posts: 103
  • Karma: +0/-0
    • View Profile
Re: Grouping the ASCII symbols?
« Reply #28 on: October 20, 2010, 09:46:15 PM »
Nice to see another one making roguelike-development using FB.
I'm learning as I try but someday (not to far away) I'll give it a go and try to make a roguelike.
Are you developing something right now?

RogueMaster

  • Rogueliker
  • ***
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Re: Grouping the ASCII symbols?
« Reply #29 on: October 21, 2010, 03:47:43 PM »
Nice to see another one making roguelike-development using FB.
I'm learning as I try but someday (not to far away) I'll give it a go and try to make a roguelike.
Are you developing something right now?

Yes. Developing a Roguelike with a "classical" looking (i.e. looking like rogue or larn), but with certain special features that I will not reveal.