Author Topic: 2-layer ASCII out. Text sprites in (And Pt-On bug).  (Read 4475 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
2-layer ASCII out. Text sprites in (And Pt-On bug).
« on: February 20, 2013, 08:38:25 pm »
On the TI-83 Plus series, when recalling pictures, the white pixels acted as a transparent color. This allowed programmers to use interesting tricks such as dual-layer ASCII sprites and text:

Code: [Select]
Text(-1,0,0,"HELLO"
StorePic 0
Text(-1,0,1,"HELLO"
RecallPic 0


In the example above, bold fonts are displayed with that trick. Although Text erases everything behind it when displayed, recalling it from a picture will not, since the white pixels, as mentionned above, are transparent.

Unfortunately, on the TI-84 Plus C Silver Edition, the transparency was assigned to a different color than white, so if you recall a picture that contains white, that white will erase everything in its path like other colors do. Because Text() still uses opaque backgrounds like on older calculator models, the 2-layer ASCII trick no longer works. :(


In addition to that, those who hoped to use Pt-On icons for color graphics might have to forget it for now. As demonstrated in the screenshot above, a bug was discovered that prevents its colors from being displayed until the program stopped executing completely. This is similar to the Casio PRIZM Locate bug that was present for one year until it got fixed. Hopefully, TI fixes it before the release, but since many TI-83+ and TI-84+ bugs that were discovered since 1999 are still not fixed today, it is not guaranteed that TI will fix it fast. Let's hope for a non-rushed release!


However, there are good news! Take a look at the following animated Cemetech screenshot (runs 25% slower than real calc):


Do you notice how when displaying large fonts, there is no extra white/gray gap on the first row and column of pixels? Well, this means that horizontal and vertical text sprites are still possible!



That said, the viability of such technique for large tilemaps will depend of how fast the Text command is, otherwise it might have to be limited for sprites that never move. Also, due to how the technique works, only 1 color per character can be used. For example, the above sprites to the right of each mockup screenshots use the vertical sprites technique in various ways and are made of 42 characters. You can notice how the colors are horizontally layed out like some Atari 2600 sprites. The smaller sprites use the vertical technique and are made of 14 characters (3 of which are on a separate row), so they could use 14 different colors maximum.

Of course, there are possibilities that the OS change before the final release, so we can't take those tricks for granted, but hopefully we should be able to use them.
« Last Edit: February 21, 2013, 03:40:05 am by DJ_O »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: 2-layer ASCII out. Text sprites in (And Pt-On bug).
« Reply #1 on: April 11, 2013, 04:59:29 am »
Update on text sprites: The following takes about 14 seconds to generate



It isn't too bad considering the calc CPU and large screen, but on calc the sprites are quite small, so I think that this would be more efficient in 160x240 mode, as seen in the mockup screenshot below:



Also the gap between sprites can be removed completely and it's even possible to superpose them (although you waste a little bit of display speed). In my case, I don't use the horizontal technique in the same way as on TI-BASIC Developer, because instead of drawing a character every row, I draw it every 3 row (in this case, "^82T" in green, "!" in brown and a space below.

Of course, with text sprites you end up being stuck with a white background.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: 2-layer ASCII out. Text sprites in (And Pt-On bug).
« Reply #2 on: April 11, 2013, 05:00:09 am »
that is awesome :O
I'm not a nerd but I pretend:

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: 2-layer ASCII out. Text sprites in (And Pt-On bug).
« Reply #3 on: April 11, 2013, 05:01:58 am »
Wow that looks great! Im glad that 2-layer ASCII still works.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: 2-layer ASCII out. Text sprites in (And Pt-On bug).
« Reply #4 on: April 11, 2013, 05:04:28 am »
Yeah, that's really cool indeed. And it's even more awesome.
I'm not a nerd but I pretend:

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: 2-layer ASCII out. Text sprites in (And Pt-On bug).
« Reply #5 on: April 11, 2013, 05:29:35 am »
Wow that looks great! Im glad that 2-layer ASCII still works.
It's not 2-layer ASCII actually, but vertical text sprites D:. Vertical/horizontal text sprites still works because there's no white gap at the top and left of characters, but dual-layer ASCII no longer works because the white created by text backgrounds is no longer considered as transparent in pictures. Recalling the 1st layer erases the 2nd one entirely D: