1
Programming / Re: BearLibTerminal: a pseudo-terminal window library for roguelike
« on: March 14, 2020, 10:38:53 PM »
It's probably not easily suited to that but there's two possible ways:
1. Implement a font made up of a wide range of pieces which could be put together by the game to resemble that data. That might work for circles and static content like that but it would have some real problems with things like sine waves and at best you'd probably have to only display an approximation of the data. I don't think this would be the best approach.
2. Implement a font made up of a single large character and update this every time you need it to display a custom image. For instance, I use this approach for my mini map - I build an x, y array of pixels based off my map data and what's been explored by the player, write that array to a png file every turn, update the custom font every turn and then display that large single character as the map. It's not the most efficient method but it works. I do a similar thing for my title screen where I display an image which covers the whole screen.
1. Implement a font made up of a wide range of pieces which could be put together by the game to resemble that data. That might work for circles and static content like that but it would have some real problems with things like sine waves and at best you'd probably have to only display an approximation of the data. I don't think this would be the best approach.
2. Implement a font made up of a single large character and update this every time you need it to display a custom image. For instance, I use this approach for my mini map - I build an x, y array of pixels based off my map data and what's been explored by the player, write that array to a png file every turn, update the custom font every turn and then display that large single character as the map. It's not the most efficient method but it works. I do a similar thing for my title screen where I display an image which covers the whole screen.