Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#Actuallaztrezort

Posted 18 January 2013 - 07:54 AM

I am working (in fits and starts) on such an animal, actually.  In my case, I'm using OpenTK and C#, but the concept would be similar.  I based the API loosely on Libtcod (found here http://doryen.eptalys.net/libtcod/), but I also wanted (limited) support for tiles.

 

Basically, for the ASCII glyphs, I use a source texture atlas for the characters and map the positions to ASCII codes.  The shader is very basic, and just colors the fragments based on the alpha channel of the texture.  Once you have that, you can add layers of logic for printing strings, dialog boxes etc.

 

The only real conceptual difference between glyphs & tiles (in my API) is that glyps are given in character coordinates, while tiles are placed in pixel coordinates.

 

In case it helps, you can browse the source here: http://code.google.com/p/sharprl/wiki/Introduction

 

Edit: better link


#1laztrezort

Posted 18 January 2013 - 07:52 AM

I am working (in fits and starts) on such an animal, actually.  In my case, I'm using OpenTK and C#, but the concept would be similar.  I based the API loosely on Libtcod (found here http://doryen.eptalys.net/libtcod/), but I also wanted (limited) support for tiles.

 

Basically, for the ASCII glyphs, I use a source texture atlas for the characters and map the positions to ASCII codes.  The shader is very basic, and just colors the fragments based on the alpha channel of the texture.  Once you have that, you can add layers of logic for printing strings, dialog boxes etc.

 

The only real conceptual difference between glyphs & tiles (in my API) is that glyps are given in character coordinates, while tiles are placed in pixel coordinates.

 

In case it helps, you can browse the source here: http://code.google.com/p/sharprl/


PARTNERS