Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: DJ Omnimaga on May 09, 2010, 03:51:04 am

Title: 4 level grayscale with 97 sprites drawn every frame
Post by: DJ Omnimaga 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
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: Galandros 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.
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: DJ Omnimaga 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.
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: Quigibo 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).
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: mapar007 on May 09, 2010, 01:46:15 pm
Maybe a compiler that converts axe->asm text instructions, to allow for hand-optimizing :P
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: Builderboy 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!
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: DJ Omnimaga 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
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: Galandros 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.
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: calcdude84se 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...
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: DJ Omnimaga on May 09, 2010, 10:56:46 pm
True, I still have bad memories about the Illusiat 2002 project incident...
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: DJ Omnimaga 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:

Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: tr1p1ea on May 10, 2010, 08:07:57 am
Scrolling tilemapper next? :).
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: DJ Omnimaga 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
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: ztrumpet on May 10, 2010, 03:53:36 pm
Woah, that's impressive!  Great job DJ! :D
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: DJ Omnimaga on May 10, 2010, 10:58:47 pm
Thanks!
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: TIfanx1999 on May 11, 2010, 09:06:03 am
Looking nice! I'm waiting to see how a scrolling tilemap will look as well! :D
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: Quigibo on May 11, 2010, 02:44:03 pm
Just thought I'd mention I wrote a 4 level grayscale routine today for the next version and it seems to work very nicely.  The only problem is that it needs to be initialized before you can start using it, so you need to add one extra command to the top of your code, but the code itself is tiny.
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: DJ Omnimaga on May 11, 2010, 02:44:57 pm
Aaaah good to hear. Will that one also have two separate routines , one for 6 MHz and one for 15 MHz?
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: ztrumpet on May 11, 2010, 04:04:13 pm
That sounds really nice!  I can't wait to see what's possible with it! ;D
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: JustCause on May 13, 2010, 03:54:17 pm
Wow. Axe is just too good. Somehow I get the feeling we'll be seeing some amazing grayscale games in the future.
Title: Re: 4 level grayscale with 97 sprites drawn every frame
Post by: DJ Omnimaga on May 13, 2010, 04:26:00 pm
Yup. One big advantage of Axe over ASM is that you don't need like 30 lines of code to do some simple stuff and can easily do it very fast and on-calc. And I think my program shows it by the fact Axe 0.2.3 doesn't even have a 4 level grayscale routine at all, it has to be done manually

Not only that but Axe introduces you to how calc RAM works without having to learn ASM.