Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
I found some really neat sprites on reddit that are done in a 1 bit-per-pixel style, but the idea is you can set the color for each sprite. I think it looks really neat:

It also got me thinking that this would be a really good idea for the 84+CSE--you can use colors, but the sprite data will be much smaller this way. Because we currently lack any Hybrid libraries, I set out to designing one of my own. Here are my initial designings:

Ketchup - TI-84+CSE Hybrid BASIC Library
2013, Shaun McFall
Merthsoft Creations

Is lib installed - Checks if the library is insatlled.
               Returns 0 if not, 1 if it is
Update screen - Updates the screen
Clear screen - Clears the screen
   cmd(2,[update screen]
Draw sprite - Draws a sprite on the screen using the given
            coordinates, size, and drawing modes
   cmd(3,x,y,width,draw mode,sprite mode,sprite data,[update screen]
   draw mode:
      0 - xor
      1 - or
      2 - and
      You can also use the xor/or/and tokens
   sprite mode:
      0 - 1bpp paletized.
         sprite data = color,hex string
      1 - 1bpp paletized, using string/list
         sprite data = sprite number
Draw tilemap - Draws a tilemap on the screen using the given
            coods, size, and drawing mode
   cmd(4,x,y,width,height,map x,map y,map width,map height,
      draw mode,sprite mode,map data,[update screen]
   draw mode:
      0 - xor
      1 - or
      2 - and
      You can also use the xor/or/and tokens
   sprite mode:
      0 - 1bpp paletized
         map data = color,hex string, draws just this sprite
      1 - 1bpp paletized, using string/list
         map data = a string that contains numbers and letters
         that map to the index in the string & list.
         0-9 = index 1-10
         A-Z = index 11-37
         theta = index 38
         a-z = index 39-65
String/List sprite data:
When doing a 1bpp paletized sprite/tilemap, you can store all the
sprite and color data into a string and list. For the sake of
simplicity, I've standardized it to str5 and the custom list |LXSPR
or |LZSPR. Right now a max of 65 is supported.
Ideally, you should set this up once when you load up the game, and
you don't need to do it again (unless you need to change the sprites,
The sprite data is a giant hex string of all the sprites. There are
two ways for this data to be stored. Either in normal hex mode, or
in "tifreak truncated" mode. Tifreak truncated mode saves space but
adds complexity by adding an additional character, "G" to the hex
data. This character tells the parser to stop drawing on that line.
This is useful for large sprites, and can help cut down the size.
The color data is a list of colors. If |LXSPR is on the calc, it'll
use 16-bit colors in 5-6-5 color mode. If |LZSPR is on the calc,
it'll use the BASIC colors available.

I have a different idea for colors now, where you'll use a positive number if it's 5-6-5, or a negative for the basic colors (so you'd do -BLUE, for example). Jonimus also suggested using ExecLib instead of a parser hook, which I think seems very smart. I'm still in the design phase, and don't actually know much about making an app, but this is something I will be actively working on, so let me know your thoughts!
I can't wait to see what comes of this, and any screenshots that happen along the way Smile Would be of help for me to make a decent game on the CSE.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum