* 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: grosged Sprites lib stress-testing & experiments  (Read 1191 times)

0 Members and 1 Guest are viewing this topic.

Online xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18522
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
grosged Sprites lib stress-testing & experiments
« on: June 07, 2016, 06:55:31 am »
So I have begun stress-testing grosged's ASM lib for BASIC programmers called sprites, so I'll post my tests and experiments in this topic.

Basically, here I try to push hybrid BASIC to its limits like I did with the CE Textlib thread. Here are my first experiments and discoveries:

1) Sprites v3.2 can display up to 44 sprites at once. If you try to display 45 or more, then none will show up.

2) Trying to display 97 sprites that are 8x8 at 4x zoom in one loop with basic collision/getKey interaction gives a frame rate of approximately 2.7 FPS with over 135 KB of RAM left and only 8 sub-programs.

3) Trying to display 97 glitched up 235x235 pixels in size gives a frame rate of approximately 0.51 FPS under the same setup. This is not practical, but this is to show how fast the lib can display massive graphics.

4) An actual tilemapper using 8x8 sprites scaled up 3x on a 12x8 map grid with scrolling will run at 2 FPS under high RAM conditions.

Based on the results I got at #2, this means that scrolling RPG tilemaps that are 12x8 (like Axe games) might be feasible. However, more complex sprite display such as a tilemapper at #4 proves that maybe 12x8 scrolling might get too slow under low RAM/clogged VAT conditions. Nonetheless, it was fun to try and it proves that maps with fewer tiles shown at once might be able to stay at 2 FPS or higher. Otherwise, a faster solution would be to use 7x6 maps or something. And if you don't want scrolling then you can still have instant tilemap display. The NPCs and event tiles would have to be stored inside the map data and the map data would need to use lists. Having the character centered at any time might  A 999 element list allows a 32x31 tilemap.
« Last Edit: June 07, 2016, 08:16:19 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 Adriweb

  • Full User
  • Join Date: Jan 2015
  • Location: France & Canada
  • Posts: 409
  • Post Rating Ratio: +7/-1
    • Adriweb
    • @Adriweb
    • Adriweb
    • @UC-UIrbk5SuaUCvnV6SQvt-Q
    • /u/Adriweb
    • Adriweb
    • TI-Planet.org
  • Gender: Male
Re: grosged Sprites lib stress-testing & experiments
« Reply #1 on: June 07, 2016, 01:40:03 pm »
(/me advocates for using the AutoTester to help with the job :P)
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

Offline grosged

  • Full User
  • Join Date: May 2016
  • Location:
  • Posts: 63
  • Post Rating Ratio: +2/-0
    • grosged
  • Gender: Male
Re: grosged Sprites lib stress-testing & experiments
« Reply #2 on: June 07, 2016, 03:13:33 pm »
Sprites v3.2 can display up to 44 sprites at once. If you try to display 45 or more, then none will show up.

This afternoon, I came back to the sources...And finally found & put off this bug :)
I also improved a little more the routines CLSCREEN and SPRITE (now you can re-initialise sprites, just when defining sprite "000").
Plus, I added the option in routine PRINT "to return, then next line" (As DJ Omnimaga suggested) : thanks to the bold slash (you know, the one used for fractions, not divisions)

For example,

"Hello world!/Everything's okay ?":Asm(prgmPRINT
will display

Hello world!
Everything's okay?

At this moment, I'm not at home, I'll update Sprites (and instructions.txt files : french/english)  to v3.3 when back home ;)

Online xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18522
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: grosged Sprites lib stress-testing & experiments
« Reply #3 on: June 07, 2016, 03:29:53 pm »
Wouldn't it be better to use another character not used often in a game text such as the multiplication symbol? It's much easier to access in SourceCoder, TokenIDE and the calculator keypad. I am ok with the bold /, though, although I will need to figure out where it's located in TokenIDE.

Nice to see some of those issues fixed, though O.O
« Last Edit: June 07, 2016, 03:33:00 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 grosged

  • Full User
  • Join Date: May 2016
  • Location:
  • Posts: 63
  • Post Rating Ratio: +2/-0
    • grosged
  • Gender: Male
Re: grosged Sprites lib stress-testing & experiments
« Reply #4 on: June 07, 2016, 03:40:46 pm »
The bold slash / I 'm talking about is easily accessible on TI-83 Premium CE



Thanks to the key between [ vars ] and [ ) ] ... How do you proceed on TI84plus CE ?

Online xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18522
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: grosged Sprites lib stress-testing & experiments
« Reply #5 on: June 07, 2016, 03:46:26 pm »
There is no way to access it on the TI-84 Plus CE at all. You have to use an ASM program to access it. It's not even in the catalog menu.
« Last Edit: June 07, 2016, 03:49:06 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)

Online xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18522
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: grosged Sprites lib stress-testing & experiments
« Reply #6 on: June 07, 2016, 10:19:54 pm »
UPDATE:

I have tested with the new Sprites v3.3, which can display up to 85 sprites at once instead of 44. The first screenshot displays 80 tiles in just 1 Asm(prgmSPRITES command:



The second screenshot displays 12x8 in 2 Asm(prgmSPRITES commands:



EDIT: That last screenshot was attempted with every sprite zoomed 7x instead of 3x and I still got 2 FPS, so with smaller maps, larger zoom should not be a problem.
« Last Edit: June 07, 2016, 10:32:58 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 Jkolade936

  • All Around Coolio
  • Super User
  • Join Date: Jan 2016
  • Location: Horseheads, NY
  • Posts: 1515
  • Post Rating Ratio: +9/-1
  • I'm an unknown loner. I try to change that.
    • Jkolade936
    • My Sprites and Walrii Collection
  • Gender: Male
Re: grosged Sprites lib stress-testing & experiments
« Reply #7 on: June 17, 2016, 04:22:39 am »
The tiles look cool, but the (character?)sprite looks a bit weird.
  • Calculators owned: None of them. :'(
Does this qualify as a signature? 
The answer is "Sure."


Online xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18522
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: grosged Sprites lib stress-testing & experiments
« Reply #8 on: June 17, 2016, 06:09:05 am »
Yeah, that's actually the 8x8 :walrii: from Wal-Rush! CE with the wrong colors. I just didn't have enough free time to convert one of my character sprites to Sprites v3.x. Thanks, by the way :)
  • 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)

 


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