Fake text mode Snake on Itch.io

  • Nice game! I got to 354 points!
    But what do you mean by fake text mode?

  • It's regular haxeflixel. Each character is represented by two tilemaps, one for the background color, and the foreground characters. So I took code page 437 (like you see in dos or dosbox), and modified it a bit (the characters are 10x15 instead of 9x16 or something else). Also had to be a bit tricky because haxe doesn't deal with characters, and worse yet, they deal with UTF8 strings. I have 256 characters of the ascii + extended sets, which is put into a string. Since I can't get the asciii character codes (to index the characters in the tilemap), I have to get their utf char codes, put them into an array with the index being the ascii code. So one character may have a code of 9621 (or something like that), and then I assign it to index say 178 which is equivalent to whatever 178 is in ascii.

    Anyways it's just a bunch of stuff where I can write text mode text into a regular haxeflixel sprite.

Log in to reply

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.