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

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

Started by DJ Omnimaga, June 07, 2016, 06:55:31 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DJ 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.


(/me advocates for using the AutoTester to help with the job :P)
Co-founder & co-administrator of TI-Planet and Inspired-Lua


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 ;)

DJ Omnimaga

June 07, 2016, 03:29:53 pm #3 Last Edit: June 07, 2016, 03:33:00 pm by DJ Omnimaga
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


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 ?

DJ Omnimaga

June 07, 2016, 03:46:26 pm #5 Last Edit: June 07, 2016, 03:49:06 pm by DJ Omnimaga
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.

DJ Omnimaga

June 07, 2016, 10:19:54 pm #6 Last Edit: June 07, 2016, 10:32:58 pm by DJ Omnimaga

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.


The tiles look cool, but the (character?)sprite looks a bit weird.
Does this qualify as a signature? 
The answer is "Sure."

DJ 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 :)

Powered by EzPortal