Author Topic: 4 level grayscale with 97 sprites drawn every frame  (Read 12302 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
4 level grayscale with 97 sprites drawn every frame
« on: May 09, 2010, 03:51:04 am »
Ok, so I know updating a tilemap every frame when you want grayscale is not really a good idea, since there are much faster ways to have grayscale, but I just thought I would share this with you as it shows how fast Axe parser can be.

Nearly flickerless 4 level grayscale with 97 sprites being drawn EVERY frame!

In the following program, you control a square that blinks back and forth from light gray to dark gray and cannot go outside the screen. To increase the delay (which is absent by default) press + and to decrease it press -. Should be useful to calibrate the grayscale with your calc.

The screenshot shows it in action in 6 MHz and 15 MHz mode
« Last Edit: May 09, 2010, 03:55:11 am by DJ Omnimaga »

Offline Galandros

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1140
  • Rating: +42/-10
    • View Profile
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #1 on: May 09, 2010, 06:14:54 am »
Amazing. Speed with ease to code. I think when Axe Parser comes to the final features, lots of games will be coded in Axe Parser instead of "hand coded" assembly.

Imagine what a good tile mapper can do. We can do action games with Axe Parser with no doubts. Manipulating around 10 enemies, animated sprites, it is great.
« Last Edit: May 09, 2010, 06:15:59 am by Galandros »
Hobbing in calculator projects.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #2 on: May 09, 2010, 12:28:43 pm »
Somehow I also feel TI-BASIC popularity will drop quite a bit with Axe, since a lot of BASIC coders now use Axe a lot. However I think there'll still be a few BASIC and ASM coders in the future, like with 68K calcs.

And yeah seeing how fast this renders in 6 MHz mode, I am even more confident about Axe potential.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #3 on: May 09, 2010, 12:35:04 pm »
Nah, I don't think popularity of BASIC or asm will go down.  You still need asm to make really large games and things that require even more speed.  And BASIC still has advantages like floating point numbers and it is still easier than Axe since it doesn't need pointers.  You can't make a math program on Axe nor can you make a 3D raycaster (yet).
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline mapar007

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 550
  • Rating: +28/-5
  • The Great Mata Mata
    • View Profile
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #4 on: May 09, 2010, 01:46:15 pm »
Maybe a compiler that converts axe->asm text instructions, to allow for hand-optimizing :P

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #5 on: May 09, 2010, 02:19:36 pm »
And maybe we could write it in Axe :O Hehe, maybe we could eventualy write the Axe compiler in Axe ;) the possibilities are endless!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #6 on: May 09, 2010, 02:27:23 pm »
Actually in BASIC larger games are possible too, while abusing asm libs. Example: I doubt you can fit Illusiat 13 in an Axe program. Way too much code and stuff for the engine (especially the menu and battle engine). A RPG in axe would most likely need to be split into multiple prog which are ran from a BASIC program using XCOPY ASM lib.

But I speak from experience after seeing TI-89 BASIC and ASM popularity go down a lot after TIGCC became good. Now ASM is only really used for stuff that requires a lot of speed and TI-BASIC is rarely used anymore either for games, compared to when I joined the community in 2001.

TI-BASIC and ASM will never die, though. Plus Axe programs can be used as ASM libs in BASIC games too, for people who don't feel like coding an entire Axe game

Offline Galandros

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1140
  • Rating: +42/-10
    • View Profile
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #7 on: May 09, 2010, 02:51:32 pm »
Maybe a compiler that converts axe->asm text instructions, to allow for hand-optimizing :P
Or just a disassembler. It would also be cool to use Axe Parser code into assembly.

The only really down to Axe Parser is memory that limits big games.
Or maybe if you provide some commands to read AppsVars from the archive.
But the code limit can be extended to 16KB with APPS. Brandonw knows how to create APPS on the calculator, I think. It might not be recommend thing to do.
« Last Edit: May 09, 2010, 02:54:40 pm by Galandros »
Hobbing in calculator projects.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #8 on: May 09, 2010, 06:58:28 pm »
IIRC it's a bad idea to write directly to flash unless you really know what you're doing. Not to mention repeat compiling to Archive will wear it more quickly. Also, messing up can go really badly. Corrupting you're Archive can never end well...
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #9 on: May 09, 2010, 10:56:46 pm »
True, I still have bad memories about the Illusiat 2002 project incident...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #10 on: May 10, 2010, 03:14:16 am »
Ok so the following is a bit more flickery since I added more stuff, but still fast:


Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #11 on: May 10, 2010, 08:07:57 am »
Scrolling tilemapper next? :).
« Last Edit: May 10, 2010, 08:09:43 am by tr1p1ea »
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #12 on: May 10, 2010, 01:05:37 pm »
Of course!

But I'll probably need to manipulate grayscale in some special way to not have the whole flickering happen while scrolling, because as you can see in that screenshot, when stuff moves around, it looks horrible.

This is why I am glad in some ways that Quigibo added a manual grayscale command, where we can decide when to refresh the screen ourselves :D

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #13 on: May 10, 2010, 03:53:36 pm »
Woah, that's impressive!  Great job DJ! :D

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: 4 level grayscale with 97 sprites drawn every frame
« Reply #14 on: May 10, 2010, 10:58:47 pm »
Thanks!