Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
How are ASCII games usually implemented? Are they actual text output using extended ASCII like you would write to a console? Or do they draw ASCII characters to a window using a tileset image?

Adbot
ADBOT LOVES YOU

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Yeah I was thinking specifically games with a graphics window like DF and Caves of Qud. I assume they just split the screen up into an X * Y set of tiles and use ASCII graphic tilesets as the graphics.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
I've been experimenting both ways. First I tried a "true" ASCII game where I used ncurses, that was the most simple/direct way to get something up and running that looked like a proper ASCII game but I pretty quickly started running into problems when I wanted to do anything more complex like handling terminal resizing.

I've restarted this time using the SFML library. I still want to have ASCII graphics, so I load in an image containing all the Code Page 437 characters which are parsed into 16x16 individual images and then use a vertex array to create a map of those images indexed by a 2d array. It looks pretty good and I think doing it this way will pay off down the road as you can easily swap out ASCII image sets to use different colours. I figured this is the basic jist of how most ASCII games these days do it, as once you get the basic structure down it's nice to work with a graphics library to get a little fancier with UIs and such.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply