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

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

Started by Dream of Omnimaga, May 16, 2016, 12:42:15 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Dream of Omnimaga

I fixed your post, since it looks like you clicked Quote instead of modify by accident :P

Also glad to see this added. :) Is the latest version on TI-Planet, 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

unregistered


Dream of Omnimaga

Ah ok, I'll check later :)

Some ideas I have in mind with this lib are direct ports of some of my old games. The main issue is screen size, but the 3x zoom of this lib pretty much fixes the entire problem. The other issue would be how I store map data in some of them, but I can probably switch to a different format since the calc has 150 KB of RAM. Of course I have another project and am busy, though, so I don't know when I would be able to start a new project using this lib (especially a brand new game) :P
  • 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

As it's late (have to go to bed!)
I just write this little message:
"I've just posted SPRITES version 3 on TI-Planet :) "
https://tiplanet.org/forum/viewtopic.php?f=12&t=18433

MateoConLechuga

Nice work grosged! :D Do you have any plans to integrate the seven segment display program into the basic library as well? Also, a graphics converter sounds like it could be quite useful :)

Dream of Omnimaga

Quote from: grosged on May 20, 2016, 08:45:14 PM
As it's late (have to go to bed!)
I just write this little message:
"I've just posted SPRITES version 3 on TI-Planet :) "
https://tiplanet.org/forum/viewtopic.php?f=12&t=18433
Cool, I'll check it out. :) I'll also update this topic to say Sprite v3. :P


EDIT: My only gripe about the zoomed sprites @grosged is that a 8x8 sprite with a 3x zoom takes 9 times more space than without zoom, so basically, we can only use 21 8x8 sprites at a time if we use 3x zoom. Would there be a way in the future to store all sprites at original zoom, but display them 3x larger later, even if it means slower speed? Because I think that would be more efficient, especially for porting certain TI-83+ games like Metroid II and Reuben Quest.
  • 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

@MateoConLechuga, Thanks !

@DJ Omnimaga, perhaps I'll go back to the zoom possibilities later, ...
For now, I've been working on a new option to display boxes, available through CLSCREEN :

{x,y,width,height,color:Asm(prgmCLSCREEN

Here's a screenshot of random boxes :



8)

Dream of Omnimaga

Does that use Mateo C rectangle routine and does it support chaining? That is quite cool :3=
  • 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

That should be a screensaver. Could that be implemented to automatically run after, say, 1 minute of inactivity?
  • 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

Only via ASM hooks I think. And then your calculator would not turn off automatically, resulting into even more battery drainage than if you manually turned if off (unless the screensaver turned the calc off automatically after a while)
  • 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

Quote from: DJ Omnimaga on May 21, 2016, 08:42:12 PM
Does that use Mateo C rectangle routine and does it support chaining? That is quite cool :3=

No, it doesn't use any Mateo's routine. I write all the routines by myself, and yes, I intend to make it support chaining ;)
(I'm also workin' on a zooomed sprite display routine...)

I forgot to mention that CLSCREEN won't be able to use colors from palette, but colors amongst 256 :)

Dream of Omnimaga

Oh I see about ClrScreen, that's fine. :P

How large is the lib so far by the way, with and without CLRSCREEN?
  • 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

Here's the size of the lib :

With CLSCREEN, 969 bytes
Without CLSCREEN, 700 bytes

Let's not forget that the size will soon change as I'm writing the zoomed display routine ;)

Dream of Omnimaga

Cool, maybe this could be the first CE sprite lib that is under or around 1 KB :P (I think smaller ASM programs launches faster with the Asm() command because of the time it takes to be copied in safe Ram)
  • 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

I think the same : that's why , for now, the source of function SPRITE is just one line:

   jp      $e308b5

:)

I'm still thinking about the eventual zoomed display routine...If I choose to add it, it would be located in function SPRITE....then , no more "one line prg" ... This may slow down

Powered by EzPortal