Author Topic: Online PNG/GIF/BMP/etc. to TI.Image converter (sprites/images on the Nspire)  (Read 26518 times)

0 Members and 1 Guest are viewing this topic.

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: Online PNG to TI.Image converter (sprites/images on the Nspire)
« Reply #15 on: May 29, 2011, 02:41:34 pm »
Nice. How big is a full screen (well not really full, but taking all available space) image? Since we got 64 MB of RAM, hopefully for sprites size shouldn't be a concern, although compression would definitively be welcome for complex games with over 200 sprites.

What is the Nspire color depth anyway? I know on the Nspire Click/Touchpad it's 16 shades of gray and the Casio PRIZM 65536 colors (with the ability to switch in 8 colors mode)
The available space is 318*212 pixels (what an unpractical resolution I have to say, multiples of 8 would've been a lot better). It's 15-bit color, with 1 alpha bit. Not sure for the non-CX calculators though.
« Last Edit: May 29, 2011, 02:42:46 pm by hoffa »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Online PNG to TI.Image converter (sprites/images on the Nspire)
« Reply #16 on: May 29, 2011, 02:45:57 pm »
Thanks for the info. Hopefully this shouldn't make games too hard to make, although I am a bit concerned about how to draw images and sprites in softwares like paint that supports 2, 4, 8, 16 and 24 bit color depths but not 15. I hope it won't make it too hard to convert stuff. Granted, the quality drop shouldn't be as noticeable as someone converting an image from 8 bit to 6 or 7 bits, but I know for certain people quality is extremly important, and they might hate if certain image colors they think as important suddently appeared  in different colors on their TI-Nspire.

Oh well... at least TI finally added colors to their calcs. I'm also glad they opened them to Lua dev (now the next step for them is to not try blocking Ndless anymore)

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: Online PNG to TI.Image converter (sprites/images on the Nspire)
« Reply #17 on: May 29, 2011, 02:53:25 pm »
What I meant was that the actual color data of the pixel holds on 15 bits, but there is another bit for alpha. So you might call it 16-bit color (but there are only 2^15 colors), just depends what kind of 16-bit (ARGB?). Any decent program can save in that format. Also as you can see there is not a huge amount of loss in the final result, so I don't think it will be too big of a problem.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Online PNG to TI.Image converter (sprites/images on the Nspire)
« Reply #18 on: May 29, 2011, 02:56:15 pm »
OOh ok I see now. I guess that might be good then. And yeah it shouldn't be a big issue. After all, it's several thousands of colors on a tiny screen. Pixels are very small and the CX screen smaller than the regular TI-Nspire screen, so it's not like a few dithered sprites will hinder quality too much.

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Online PNG to TI.Image converter (sprites/images on the Nspire)
« Reply #19 on: May 29, 2011, 03:02:50 pm »
What is the Nspire color depth anyway? I know on the Nspire Click/Touchpad it's 16 shades of gray and the Casio PRIZM 65536 colors (with the ability to switch in 8 colors mode)
TI refuses to reveal the color depth of the screen (and I think they don't even tell us the size!) but I would guess that it's 16-bit. I think the image format for Lua is 15-bit with one transparency bit.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Online PNG to TI.Image converter (sprites/images on the Nspire)
« Reply #20 on: May 29, 2011, 03:49:47 pm »
The screen itself is 16 bit color, but the Ti.image format can only handle 15 bit color (with the 1 bit alpha).

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: Online image to TI.Image converter (sprites/images on the Nspire)
« Reply #21 on: May 29, 2011, 04:50:16 pm »
I changed the host, it should be a lot faster and now all kinds of image formats are supported. :)
« Last Edit: May 29, 2011, 04:50:33 pm by hoffa »

Offline BrownyTCat

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 420
  • Rating: +37/-8
    • View Profile
I spy TF2!
Also great job implementing IM for more formats.

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
I started playing around with sprites to see how well the Nspire handles tile-based games and games in general. I'll keep the notes updated on the first page (at the bottom of my first message). Right now it seems like the Nspire is very slow with a lot of stuff on the screen.

Offline pianoman

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 426
  • Rating: +24/-0
  • ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫
    • View Profile
Like the 84, or slower?

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
It depends how you use it.
I'm using this format in my game (Block Breaker), and it isn't really slow, while every step I redraw the whole screen.

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
It's usually slow with colored images drawn on the whole screen (i.e. all the gc:drawImage() functions at the end draw on every pixel on the screen). A Mario-like platformer that utilizes every single pixel of the screen might not be very playable (Edit: unless there are a lot of transparent pixels). Those are the current results of years and years of rigorous scientific experiments on the Nspire using Lua.
« Last Edit: May 30, 2011, 04:02:08 pm by hoffa »

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile

I made a very simple tile-based platformer "game" to check out how it runs. With that many tiles, it runs reasonably well. I still got some optimization tricks up my sleeve.

Edit:
I also tried with only black and white sprites (i.e. more transparency), and it does run faster and shouldn't look too ugly.

Edit2:

With more stuff on the screen (and Ash gone), the so-called game is still playable, but nothing great. The problem with platformers is that the whole screen has to be updated after every movement, and fluid movement is somewhat important in those games. I'll now play around with fullscreen Pokemon-like games, where the FPS is not as important (also movement is easier, no acceleration and other stuff).
« Last Edit: May 31, 2011, 07:01:11 am by hoffa »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Hmm that looks nice :D

You should probably move those in another thread, though, so more people see it and it's less off-topic. :P

Also are monochrome images the same format as grayscale/color ones? I wonder what causes the slowdown otherwise?

Offline pianoman

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 426
  • Rating: +24/-0
  • ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫
    • View Profile
Hoffa, is there any way to get an offline converter, or is this only online?