* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: Sprites v3, a new ASM lib to enhance TI-84 Plus CE BASIC games  (Read 14796 times)

0 Members and 2 Guests are viewing this topic.

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18907
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
I am fine with that unless it takes like an extra 0.2 seconds (which I doubt)
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18907
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
@grosged I found three major problems in Sprites v3:

-Custom palette creation doesn't work. Any list will give ERR:INVALID DIMENSION, even if I try the example program (MARIO.8xp) provided in the zip file. I can only get Sprites v3 to work with the default palette (0:Asm(prgmPALETTE).

-After using the program, if I quit the home screen then come back to it, garbage appears in it. Can this cause stability issues?

-Once we run out of sprite memory, there is no way to erase or overwrite existing sprites. I can't find any command to do that and simply trying to store a sprite in the same slot as an old sprite will not work (the original copy will remain intact). If erasing 1 sprite is impossible then maybe there should be a command to clear the entire sprite memory?


« Last Edit: May 23, 2016, 07:49:28 am by DJ Omnimaga »
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline grosged

  • Full User
  • Join Date: May 2016
  • Location:
  • Posts: 64
  • Post Rating Ratio: +2/-0
    • grosged
  • Gender: Male
I modified a lot these days...maybe I chose the wrong file when creating the archive
Anyway, Custom Palette is ok in the very last version :
Please upload Sprites v3.1    ( https://tiplanet.org/forum/archives_voir.php?id=549179 )
Inside, you 'll find MARIO.8XP and SQUASH.8XP for testing ;)

Concerning the garbages , don't worry : it's not dangerous, just a little bit of sprites Data
(as the memory area PixelShadow is used)

In fact you can't rewrite over an existing sprite but you can reset all by using PALETTE
When you define a sprite, the program just stores sprites one after the other , and doesn't care of its number (which is just a way for you not to get lost)
Thus when defining sprites the program will associate pointer1 to 1st sprite, pointer2 to 2nd sprite...
the sprite number you put when defining allows you remember which pointer will be used
That's the reason why you have to define sprite 0,1 ,2 ...increasingly

Hope it'll be ok for you :)

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18907
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Oh I see now. I noticed that defining sprites in the wrong order caused a crash, so I figured I should define them in the right order and it worked, but it might be good to specify that in the readme. Also it would be a good idea to make the readme.txt compatible with Windows Notepad since that's what most people use :P . You might also want to explain how to erase all sprite data with PALETTE for those who don't read the forums.

As for the garbage stuff thanks for the info. I guess I can always tell people to quit with CLEAR and have a ClrHome at the end of my program so people aren't too scared.

EDIT: @grosged it seems like you uploaded the wrong version of the program, because it's dated from May 20th and I still get the INVALID DIM error :( EDIT: New version works now thanks :)
« Last Edit: May 23, 2016, 04:26:49 pm by DJ Omnimaga »
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18907
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Update:

This is a demonstration of changing the color palette. The speed is slow because I have to store many large sprites each time, but with 8x8 sprite data it shouldn't be too bad:



Code: [Select]
0:Asm(prgmCLSCREEN

For(Z,1,7

If Z=1 or Z=7:{0,33,32,0,40,1,7,32,8,9,34,74
If Z=2 or Z=6:{0,97,96,0,80,2,7,96,9,10,99,148
If Z=3 or Z=5:{0,161,160,0,120,3,7,160,10,18,165,181
If Z=4:{0,226,224,0,152,4,7,224,11,19,231,255
Asm(prgmPALETTE
"0ZY133333333333333333333333333333AAAAAA3333333333333333333333333AAAAAAAAAA3333333333333333333333AAAAAAAAAAAAA33333333333333333333AAAAAAAAAAA1111333333333333333333AAAAAAAAA1111111133333333333333333AAAAAAAA1111111111333333333333333AAAAAAAA11111111117733333333333333AAAAAAA111111111777773333333333333AAAAAAA111111177777777333333333333AAAAAA1111111777777777733333333333AAAAAA1111111777777774443333333333AAAAAA1111111777777744444333333333AAAAAA1111117777777444444433333333AAAAAA1111117777777444444443333333AAAAAA11111177777774444444993333333AAAAA11111177777744444449999333333AAAAAA1111177777744444449999933333AAAAAA11111177777444444499999933333AAAAA11111177777744444499999953333AAAAAA11111777777444444999999553333AAAAA11111777777444444999999555333AAAAAA11111777774444449999995555333AAAAA111117777774444499999955555333AAAAA11111777774444449999955555533AAAAA111111777774444499999955555533AAAAA111117777744444499999555555533AAAAA1111177777444449999995555555BBBBAAA11BB177777444449BBBBB555BBBB3BB33A111BB377777444449BB33BB55BB333BB33311BBBBB7774444499BB33BB35BB333BB333311BB333774444499BBBBB333BBBB3BB333111BB333374444499BBBB3333BB333BB333111BB333334444499BB3BB333BB33BBBB333333BBB3333333333BB33BB33BB33
Asm(prgmSPRITE
"1ZY1AAA33333333333333333333333333333333AAAAAAA3333333333333333333333333333AAAAAAAAAA333333333333333333333333311111AAAAAAA33333333333333333333333111111111AAAAA33333333333333333333311111111111AAAA333333333333333333337777777111111AAAA333333333333333333777777777711111AAA333333333333333337777777777777111AAA3333333333333333744444447777777111AA3333333333333334444444444447777111AA3333333333333344444444444444777111AA3333333333333444999999944444477711AA3333333333339999999999999444477711AA3333333333399999999999999944477711AA3333333333999995555555999994447711A3333333333999555555555559999444771AA3333333339555555555555555999444711AA3333333355555555555555555599447711A3333333355555555555555555559944771AA3333333555555555555555555559944771A3333333555555555555555555555994471AA3333335555555555555555555555994771A3333335555555555555555555555594471A33333355555555555555555555555994711A3333355555555555555555555555594471A3333355555555555555555555555599471A33333B5555BBBB55555555555555559471A33333BB55BB33BB555555555555BB594771A3333BB35BB33333555555555555335947BBBBB3B333BB3BBB33555555555BBB3394BB333333333BB33BB333555555555BB33347BBBB333333BB33BB335555555555BB33947133BB333333BBBB333333333333BBBB333BBBBB33
Asm(prgmSPRITE
"2271BBBBBBBBBB33BB
Asm(prgmSPRITE
"3Y61BB333B33B3B33B3BB333B3B3B333BB333BB3B3B3B3B3B3B33B3B3B33B3B333B3B3B3BB33B3B3B3B3B33B3B3B333BB333BB33B3B333B3B3B3B3B33B3B3B3333B333B333B3B333B3B3B3B3B33B3B3B3333B333B333B3B3333B33BBB3B33BB33B33BB3333B333B3
Asm(prgmSPRITE
"4I61BB33B3BB3BB33B333BB33B33B33B3B3BB3B3BB3B33BB3B3B3B33B3B333B3B33B3B3B333BB333B3B33B3B3B333BBB3B33BB3B3B33B3B3
Asm(prgmSPRITE
"5ZT32223333333332333332323333233233333323333333233323333323233332332333333233332233332233223232333222323333232233233323232323233223333233223323223332333232323232333233332332323222233323332323232323332333323323232332333233323322332232233333323232332233333333333333333333333333333333333333333333333333333333333322333322333333223332222233333333222223333223333322232222222222222222222233322333332222322333223222222333322333223333322223333222333333223333223332233333332233322223333332233332233322333333322332222222333322333322333223333333223333332223333223333223332223333332233333332233332233332222222233333322333333222333322333322222222333333223332222233333223333223333223333332233222233333332233332233332233333333333333333333333333322333333333333333333333333333333333333333333333332233333333333233332222222223333333323233333333332333332323232333333333232332233223222333323232323333333332233232323333233333323323233333333323332323233332333332323232333333333233323232333323333323232323333333332333322323333323332222222223333
Asm(prgmSPRITE
"6Y723B33B333B33B33BB333BB33BB33B33B33B3B3B3B3B33B3B3B3B33B3B3B33B33B3B3B3B3B3B3B33B3B3B3B33B3B3B33B33B3B3B3B3BBB3B33B3B3B3B33BB33BB3B33B3B3B3B3B3B33B3B3B3B3B33B3B3B33B33B3B3B3B3B3B33B3B3B3B3B33B3B3B33B33B3B3BBB3B3B3B333B33B3B33BB33BB33B33B33B
Asm(prgmSPRITE
"7Z723B3BB33B333B333B3B33B33B333B3B3B33BBB3B33B333B3B33B3B3B3B3B33B33B3B3B3BB3B33B333B3B33B3B3B3B3B33B33B3B3B33B3BB3B333BBB33B3B3BBB3B33B33B3B3B33B3B333B33B3B33BBB3B3B3B33B33B3B33B3B3B333B33B3B33BBB3B3B3B33B33B3B33B3B3BB3B333B3B33B3B3B3B3BB3B333B33B3
Asm(prgmSPRITE
{0,123,2,1,157,2,2,196,29,3,132,38,4,167,38,5,105,71,6,91,187,7,160,187:Asm(prgmSPRITE
0getKey
If Z=4
Then
Repeat getKey
End
End
End
For(Z,0,400:End
0:Asm(prgmCLSCREEN


Sprite display is nearly instant.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline alexgt

  • Just your friendly neighborhood Ninja Stach Fancy Iron Man
  • Super User
  • Join Date: Dec 2014
  • Location: Behind you
  • Posts: 2611
  • Post Rating Ratio: +6/-1
  • Something should go here...
    • /u/alexgt9123
  • Gender: Male
That looks good DJ!
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18907
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Thanks. Here is another example with only 2 sprites (although zoomed in):



EDIT: Question @grosged : How do we store a sprite past Sprite #35? I noticed the string only has 1 space for the sprite number (from 0 to 9 and from A to Z), but what if we get past Z?


Also a feature suggestion I have would be a command to change the home screen text colors (foreground and background). I think you need to enable text colors beforehand but if you had that feature then I wouldn't have to use CE Textlib anymore for the text color. :P
« Last Edit: May 24, 2016, 04:05:27 am by DJ Omnimaga »
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline grosged

  • Full User
  • Join Date: May 2016
  • Location:
  • Posts: 64
  • Post Rating Ratio: +2/-0
    • grosged
  • Gender: Male
Good job !
I answer to your questions:
-It's slow because PALETTE is not optimised. Plus , as PALETTE reset all, you have to define again your sprites each time you modify the palette (I'm thinking of resolving that)
-when defining, the program doesn't care of number of sprite : it'll keep on storing in next place(beside the last stored sprite), whatever number you put. I must admit that 1 character only is not enough to let you remember which sprite you defined...(in v2, with no zoom parameter, that was 2 characters)

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18907
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Thanks. :D

I actually didn't mind the speed since what I did was kinda overkill (eg the It RPG Is logo is very large. The speed drop is due to storing such large strings into Ans. With just small 8x8 sprites the speed would be even faster).

And I see. I didn't know it didn't take the number into account, so I guess that's good for me if I can add more sprites after it :P.

Also yeah a command to change Output() and Text() background and text colors would be nice, since right now on the home screen we are stuck with only black text on white background lol. But it's up to you :)


I also found a bug: The {color:Asm(prgmCLSCREEN syntax doesn't work at all. It still won't redraw the status bar.

Code: [Select]
DispGraph
0:Asm(prgmCLSCREEN

For(Z,1,7

If Z=1 or Z=7:{0,33,32,0,40,1,7,32,8,9,34,74
If Z=2 or Z=6:{0,97,96,0,80,2,7,96,9,10,99,148
If Z=3 or Z=5:{0,161,160,0,120,3,7,160,10,18,165,181
If Z=4:{0,226,224,0,152,4,7,224,11,19,231,255
Asm(prgmPALETTE
"0ZY133333333333333333333333333333AAAAAA3333333333333333333333333AAAAAAAAAA3333333333333333333333AAAAAAAAAAAAA33333333333333333333AAAAAAAAAAA1111333333333333333333AAAAAAAAA1111111133333333333333333AAAAAAAA1111111111333333333333333AAAAAAAA11111111117733333333333333AAAAAAA111111111777773333333333333AAAAAAA111111177777777333333333333AAAAAA1111111777777777733333333333AAAAAA1111111777777774443333333333AAAAAA1111111777777744444333333333AAAAAA1111117777777444444433333333AAAAAA1111117777777444444443333333AAAAAA11111177777774444444993333333AAAAA11111177777744444449999333333AAAAAA1111177777744444449999933333AAAAAA11111177777444444499999933333AAAAA11111177777744444499999953333AAAAAA11111777777444444999999553333AAAAA11111777777444444999999555333AAAAAA11111777774444449999995555333AAAAA111117777774444499999955555333AAAAA11111777774444449999955555533AAAAA111111777774444499999955555533AAAAA111117777744444499999555555533AAAAA1111177777444449999995555555BBBBAAA11BB177777444449BBBBB555BBBB3BB33A111BB377777444449BB33BB55BB333BB33311BBBBB7774444499BB33BB35BB333BB333311BB333774444499BBBBB333BBBB3BB333111BB333374444499BBBB3333BB333BB333111BB333334444499BB3BB333BB33BBBB333333BBB3333333333BB33BB33BB33
Asm(prgmSPRITE
"1ZY1AAA33333333333333333333333333333333AAAAAAA3333333333333333333333333333AAAAAAAAAA333333333333333333333333311111AAAAAAA33333333333333333333333111111111AAAAA33333333333333333333311111111111AAAA333333333333333333337777777111111AAAA333333333333333333777777777711111AAA333333333333333337777777777777111AAA3333333333333333744444447777777111AA3333333333333334444444444447777111AA3333333333333344444444444444777111AA3333333333333444999999944444477711AA3333333333339999999999999444477711AA3333333333399999999999999944477711AA3333333333999995555555999994447711A3333333333999555555555559999444771AA3333333339555555555555555999444711AA3333333355555555555555555599447711A3333333355555555555555555559944771AA3333333555555555555555555559944771A3333333555555555555555555555994471AA3333335555555555555555555555994771A3333335555555555555555555555594471A33333355555555555555555555555994711A3333355555555555555555555555594471A3333355555555555555555555555599471A33333B5555BBBB55555555555555559471A33333BB55BB33BB555555555555BB594771A3333BB35BB33333555555555555335947BBBBB3B333BB3BBB33555555555BBB3394BB333333333BB33BB333555555555BB33347BBBB333333BB33BB335555555555BB33947133BB333333BBBB333333333333BBBB333BBBBB33
Asm(prgmSPRITE
"2271BBBBBBBBBB33BB
Asm(prgmSPRITE
"3Y61BB333B33B3B33B3BB333B3B3B333BB333BB3B3B3B3B3B3B33B3B3B33B3B333B3B3B3BB33B3B3B3B3B33B3B3B333BB333BB33B3B333B3B3B3B3B33B3B3B3333B333B333B3B333B3B3B3B3B33B3B3B3333B333B333B3B3333B33BBB3B33BB33B33BB3333B333B3
Asm(prgmSPRITE
"4I61BB33B3BB3BB33B333BB33B33B33B3B3BB3B3BB3B33BB3B3B3B33B3B333B3B33B3B3B333BB333B3B33B3B3B333BBB3B33BB3B3B33B3B3
Asm(prgmSPRITE
"5ZT32223333333332333332323333233233333323333333233323333323233332332333333233332233332233223232333222323333232233233323232323233223333233223323223332333232323232333233332332323222233323332323232323332333323323232332333233323322332232233333323232332233333333333333333333333333333333333333333333333333333333333322333322333333223332222233333333222223333223333322232222222222222222222233322333332222322333223222222333322333223333322223333222333333223333223332233333332233322223333332233332233322333333322332222222333322333322333223333333223333332223333223333223332223333332233333332233332233332222222233333322333333222333322333322222222333333223332222233333223333223333223333332233222233333332233332233332233333333333333333333333333322333333333333333333333333333333333333333333333332233333333333233332222222223333333323233333333332333332323232333333333232332233223222333323232323333333332233232323333233333323323233333333323332323233332333332323232333333333233323232333323333323232323333333332333322323333323332222222223333
Asm(prgmSPRITE
"6Y723B33B333B33B33BB333BB33BB33B33B33B3B3B3B3B33B3B3B3B33B3B3B33B33B3B3B3B3B3B3B33B3B3B3B33B3B3B33B33B3B3B3B3BBB3B33B3B3B3B33BB33BB3B33B3B3B3B3B3B33B3B3B3B3B33B3B3B33B33B3B3B3B3B3B33B3B3B3B3B33B3B3B33B33B3B3BBB3B3B3B333B33B3B33BB33BB33B33B33B
Asm(prgmSPRITE
"7Z723B3BB33B333B333B3B33B33B333B3B3B33BBB3B33B333B3B33B3B3B3B3B33B33B3B3B3BB3B33B333B3B33B3B3B3B3B33B33B3B3B33B3BB3B333BBB33B3B3BBB3B33B33B3B3B33B3B333B33B3B33BBB3B3B3B33B33B3B33B3B3B333B33B3B33BBB3B3B3B33B33B3B33B3B3BB3B333B3B33B3B3B3B3BB3B333B33B3
Asm(prgmSPRITE
{0,123,2,1,157,2,2,196,29,3,132,38,4,167,38,5,105,71,6,91,187,7,159,187:Asm(prgmSPRITE
0getKey
If Z=4
Then
Repeat getKey
End
End
End
For(Z,0,400:End
0:Asm(prgmCLSCREEN

{58,18,204,204,255
Asm(prgmCLSCREEN
For(Z,0,8
{59+Z,19+Z,202-2Z,202-2Z,24+Z
Asm(prgmCLSCREEN
End
{68,28,184,184,255
Asm(prgmCLSCREEN
TextColor(12)
Text(0,43,"DUE TO JASON VOORHEES
Text(12,43,"REGENERATIVE POWERS,
Text(24,43,"AUTHORITIES FROZE HIM
Text(36,43,"AND BURIED HIM UNDER
Text(48,43,"ICE IN ALASKA. BUT 30
Text(60,43,"YEARS LATER HE MELTED
Text(72,43,"THEN REVIVED AS A
Text(84,43,"WALRUS.
Text(105,43,"OTHER WALRUSES MUST
Text(117,43,"DEFEAT HIM AND HAVE
Text(129,43,"CHOSEN YOU TO DO SO!
Text(141,43,"GO ON AND BEAT JASON!
0getKey
Repeat getKey
End
{255:Asm(prgmCLSCREEN
ClrHome

  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18907
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Question:

If what you say on IRC about the 8 bpp mode gets implemented, then will you implement a text routine or a way to map sprites of our choice to specific characters? Because if 8 bits mode is used then this pretty much makes Text() and Output() unuseable, meaning we would have no text in games using your lib.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline grosged

  • Full User
  • Join Date: May 2016
  • Location:
  • Posts: 64
  • Post Rating Ratio: +2/-0
    • grosged
  • Gender: Male
Yes, I'm working on v3.3 which is now in 8bpp mode (faster rendering)
For example,  a 35*35 zoomed 300% sprite doesn't need 22052 bytes but...  half (11027 bytes only ) !
And instead of 24,4 Kb , 75 Kb are available for storing sprites !
Of course, I'm gonna implement a text routine ;)

For now, I created...
SETTINGS : initialisation (to be put in very beginning of the program) Meanwhile clear screen (256 colors) , go into 8bpp
SPRITE : define/display sprite(s) (possible to chain parameters)
CLSCREEN: clear/display boxes on screen (256 colors, chaining possible)
PALETTE: reset/modify the palette of 36 colors
BACKHOME: convert the 8bpp screen into 16bpp mode, restore staus bar & run indicator (to be put on last line of program , for a neat back to TI-OS ;) )
PRINT : display text, values (to be written)



« Last Edit: May 26, 2016, 04:20:25 pm by grosged »

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18907
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Ah I see. Yeah the issue right now is in 8 bpp mode the Output()/Text() text will be too big. 

I tried making my own font routine with Sprites v3 by creating custom font sprites, but I couldn't figure out how to convert a string into a list efficiently in pure BASIC (speed-wise). I might try again later with rectangles, though.


Of course that might be a bit complicated to implement, though, so if you had an actual font/text routine in the planning stages then perhaps you could use that? Of course you would probably need to create custom fonts or find a public domain font, though.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline grosged

  • Full User
  • Join Date: May 2016
  • Location:
  • Posts: 64
  • Post Rating Ratio: +2/-0
    • grosged
  • Gender: Male
at last, I finally finished writing the display function PRINT !
I decided to use the Amstrad CPC 8x8 font ...so I typed hundreds of binary codes ...ouch !! headache !! haha



Here's how to send parameters to the function :
{x,y:Asm(prgmPRINT
or
{x,y,ink,background:Asm(prgmPRINT
or
{x,y,ink,background,width zoom , height zoom:Asm(prgmPRINT


And now, to display values or strings :

123456:Asm(prgmPRINT
or
"ABCDEF":Asm(prgmPRINT
or
123+789/154:Asm(prgmPRINT

When you omit to send parameters, what you intend to display will be put exactly where you displayed just before.

For example:

1234:Asm(prgmPRINT:"AB":Asm(prgmPRINT

will display "AB34"



« Last Edit: May 31, 2016, 02:40:05 pm by grosged »

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18907
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Wow, it supports separate zooms? O.O Nice. Also are . , : = ! ? -  character supported? :)
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline grosged

  • Full User
  • Join Date: May 2016
  • Location:
  • Posts: 64
  • Post Rating Ratio: +2/-0
    • grosged
  • Gender: Male

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games