Join us on Discord!
You can help CodeWalrus stay online by donating here.

grosged Sprites lib stress-testing & experiments [hybrid BASIC]

Started by Dream of Omnimaga, June 07, 2016, 06:55:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dream of Omnimaga

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.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Adriweb

(/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

unregistered

Quote from: DJ Omnimaga on June 07, 2016, 06:55:31 AM
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 ;)

Dream of Omnimaga

#3
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
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

unregistered

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 ?

Dream of Omnimaga

#5
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.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Dream of Omnimaga

#6
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.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Dudeman313

The tiles look cool, but the (character?)sprite looks a bit weird.
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

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-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal