August 11, 2020, 12:27:21 pm

The shoutbox is currently out of service. Join us on Discord instead.
You can help CodeWalrus stay online by donating here.

WARNING: DO NOT UPGRADE your TI-83 Premium CE or TI-84 Plus CE to OS 5.5.1 and higher. It removes all compatibility with most games and removes ASM/C programming! DOWNGRADING IS IMPOSSIBLE. BE WARNED! Likewise, do NOT update your TI-Nspire CX past OS 4.5.0, else using Ndless and ASM/C programs will be impossible.

Sprites v3, a new ASM lib to enhance TI-84 Plus CE BASIC games [tutorial]

Started by DJ Omnimaga, May 16, 2016, 12:42:15 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Darn that looks so epic. Makes me want a CE just to try haha.
ceci n'est pas une signature

DJ Omnimaga

DJ Omnimaga

On a side note: Even though you now have your own font routine, you should warn users in the readme to not use Output() after setting sprites, because Output() will corrupt the sprite data. I assume it's the same for any display command that modifies the RAM in which the sprites are stored.

Also, can the text routine display both strings (eg "HELLO WORLD") and variable content (eg L1(21))?


Yes,  8bpp mode will make you use only the custom font/routine display, and Output/ClrHome/ClrDraw/Disp ...will have to be forgotten (otherwise it could corrupt)

And yes, we can display variable contents:


DJ Omnimaga

Ah ok, I'm fine with it personally, now that there is an easy way to use custom text. I would have made my own font routine in Basic using the lib but that would have been quite slow :P

Also nice to see we can use variables :)

Also, the fact we can zoom width and height separately means we could use stretched text to mimic Atari 2600 games :P

DJ Omnimaga

OMG it's out! O.O

I'll definitively give it a try in a few minutes. :) I can't wait to try the new features and update my game (and of course check if there are new bugs to report :P)

Also I see it's now open source. :) There is a problem with the zip file, though:

!   C:\Users\DJOmnimaga\Desktop\Sprites_v3.2\ Cannot create Sprites v3.2\Sources...\palette.asm
!   The system cannot find the path specified.
!   C:\Users\DJOmnimaga\Desktop\Sprites_v3.2\ Cannot create Sprites v3.2\Sources...\clscreen.asm
!   The system cannot find the path specified.
!   C:\Users\DJOmnimaga\Desktop\Sprites_v3.2\ Cannot create Sprites v3.2\Sources...\sprite.asm
!   The system cannot find the path specified.
!   C:\Users\DJOmnimaga\Desktop\Sprites_v3.2\ Cannot create Sprites v3.2\Sources...\print.asm
!   The system cannot find the path specified.
!   C:\Users\DJOmnimaga\Desktop\Sprites_v3.2\ Cannot create Sprites v3.2\Sources...\backhome.asm
!   The system cannot find the path specified.
!   C:\Users\DJOmnimaga\Desktop\Sprites_v3.2\ Cannot create Sprites v3.2\Sources...\settings.asm
!   The system cannot find the path specified.
!   C:\Users\DJOmnimaga\Desktop\Sprites_v3.2\ Cannot create Sprites v3.2\Docs...\Palette_36colors.png
!   The system cannot find the path specified.
!   C:\Users\DJOmnimaga\Desktop\Sprites_v3.2\ Cannot create Sprites v3.2\Docs...\256_colors.png
!   The system cannot find the path specified.
!   C:\Users\DJOmnimaga\Desktop\Sprites_v3.2\ Cannot create Sprites v3.2\Docs...\Instructions.txt
!   The system cannot find the path specified.
!   C:\Users\DJOmnimaga\Desktop\Sprites_v3.2\ Cannot create Sprites v3.2\Demos...\DEMO.8Xp
!   The system cannot find the path specified.
!   C:\Users\DJOmnimaga\Desktop\Sprites_v3.2\ Cannot create Sprites v3.2\Demos...\SQUASH.8Xp
!   The system cannot find the path specified.

Renaming the Demo..., Sources... and Docs... folder to Demo, Sources and Docs fixed the problem.

EDIT: It seems you got the order of the default palette wrong. You put yellow first, but yellow should come between cyan and white. :P

Suggestion @grosged :

-Make BACKHOME so that if you use "+":Asm(prgmBACKHOME it only erases the sprite data without switching back to 16bpp.
-Maybe merge BACKHOME with SETTINGS to reduce the amount of sub-programs.


Okay, thank you for testing :)

I'm modifying the folders name ;)
I'm gonna change the order of colors (had a doubt!)
And merging SETTINGS/BACKHOME is a good idea :)

EDIT: when using SourceCoder, black color is coded 3, right ?
So, what color should be represented by 0 ?

Re-EDIT : I've just thought of an easier way to erase automatically  sprites data, that would happen when defining sprites :

Just when the routine meets "000,... as header ! ;)

DJ Omnimaga

From what I could gather, SourceCoder colors are the following:

1=Blue (10 in pure BASIC and CE Textlib)
2=Red (11)
3=Black (12)
4=Magenta (13)
5=Green (14)
6=Orange (15)
7=Brown (16)
8=Navy Blue (17)
9=Cyan (18)
A=Yellow (19)
B=White (20)
C=Light Gray (21)
D=Medium Gray (22)
E=Gray (23)
F=Dark Gray (24)
G=Transparent (or Teal in CE Textlib if you use color code 25)

Basically, for some reasons 0 doesn't seem to have any color assigned to it. That's unless I am wrong, but that's what I noticed  when converting sprites.

And yeah maybe you could make sprites data overwrite the sprite behind when it meets the header, but wouldn't it cause empty gaps to be left behind if the former sprite was larger?

Also I am curious about if it would be easy to allow people to setup text settings and display the text in one single PRINT command? That would require storing the string into Str1 or  something, though, unless you used the "150,232,255,224,2,HELLO WORLD":Asm(prgmPRINT syntax (which would draw HELLO WORLD at 150,232 coordinates, with color 255 and background color 224 and 2x zoom. Or would that be much slower to process?

The other idea I had for text would be to assign one character or token as a line break. For example, If you draw text at 10,20, once the routine encounters the asterisk * character in the string, it would draw the rest at 10,28 instead, and 10,36 if another * is encountered and so on.


Sprites v3.2 updated (palette ok now, folders too)
I've been trying to improve again, this afternoon...but it seems I can't go further....have to pause or writing something else, another project  9_9

DJ Omnimaga

It's fine. Sprites is already excellent already. I can't wait to make elaborate games with it :3=

DJ Omnimaga

On a side note, I might update my tutorial in the first post into an English version of the readme. I wonder if it could be included with future zip files @grosged since there are probably a bunvh of people who would like to download this lib, but cannot speak French?

DJ Omnimaga

Cool thanks a lot. :D

You should upload to Cemetech and ticalc archives for more visibility. I hope this library becomes popular among BASIC programmers in the future. :)

I hope to have time next week to make a game with this library :3=

DJ Omnimaga

Hi @grosged , I have some bad news:

I found a fatal bug in version 3.2 of Sprites: Basically, Sprite #0 no longer works and if it is less than 7x3 pixels large at 4x zoom, then Sprite #1 will not work either. Instead, 4x4 green squares will show up.

This is my code:



With the code above, Sprite #0 is a green square but Sprite #1 and higher works fine. If I make Sprite #0 smaller, however, Sprite #1 will not work anymore.

Powered by EzPortal