Author Topic: Getting Started with Axe Parser  (Read 21703 times)

0 Members and 1 Guest are viewing this topic.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Getting Started with Axe Parser
« Reply #15 on: January 22, 2017, 02:52:07 pm »
So, first. Is it possible to store data to a single nib, or nibble of data? If it is possible, how would I do so? This would be very helpful in gamemaking, with things like coins.

The answer can be found in the command list. Just like you can read from a byte address with {PTR} and store to a byte address with →{PTR}, you can read from a nibble address with nib{PTR} (really the iPart( token) and store to a nibble address with →nib{PTR}. As explained in the command list entry, nibble pointers should be multiplied by two, as there are two nibbles in a byte.

And, next. Is there a specific sprite editing tool for making files compatible with the TI-84+? If so, where can I download it? I feel like making nice title screens for games, but I don't know where to look.

For making sprites on-calc, the best tool is certainly tileIt!, a sprite and tilemap editor made especially for Axe. For making sprites off-calc, you have a couple of options. I think one of the best options for Axe is Pixelscape, an online tool also made especially for Axe and with compatibility with tileIt!.

Offline ClayBread

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 12
  • Rating: +0/-0
    • View Profile
Re: Getting Started with Axe Parser
« Reply #16 on: January 22, 2017, 05:25:20 pm »
Alright. Thanks for the help. My mistake with storing to nibbles was trying to put what I wanted to store in brackets. That was likely the problem, but I wanted to make sure I was at least looking in the right place. Also, thanks for the sprite tools. They will be very useful.

Thanks.

Edit (Double post):

Alright. So, another question. Is it possible to clear out a matrix, such that I could store to it once again? This would be very helpful for things like changing levels in a game, or moving to a different section of a map.

Thanks.
« Last Edit: January 24, 2017, 11:44:13 am by ClayBread »

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Getting Started with Axe Parser
« Reply #17 on: January 24, 2017, 03:55:40 pm »
Zeroing a matrix? easy
just do :Fill(PointerToMatrix,Width*Height,0)
That will fill the matrix with zeros.
I'm still around... kind of.

Offline ClayBread

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 12
  • Rating: +0/-0
    • View Profile
Re: Getting Started with Axe Parser
« Reply #18 on: January 24, 2017, 07:55:13 pm »
Oh. I was unaware that you could use matrices in Axe. That's incredibly helpful, though. The tutorial that I looked at to learn Axe never mentioned matrices, even if they are very helpful in some cases. But, if possible, how could I clear memory following a pointer such as GDB1? It would still be helpful to know, because using a pointer as opposed to a matrix could be more efficient in memory. If you have a good solution to this, do tell, please.

Thanks.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Getting Started with Axe Parser
« Reply #19 on: January 24, 2017, 09:07:10 pm »
"Matrices" in Axe generally just mean blocks of data that you treat like a matrix. There is no built-in support for matrices, but given a W*H*Z block of memory pointed to by M, it can be treated like a matrix of width W, height H, and entry size Z. An element (X,Y) can be addressed with Y*W+X*Z+M (note that order of operations in Axe is left-to-right so Y*W+X, not just X, is multiplied by Z).

Offline ClayBread

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 12
  • Rating: +0/-0
    • View Profile
Re: Getting Started with Axe Parser
« Reply #20 on: January 26, 2017, 01:21:29 pm »
That's really helpful, considering the way that Ti-83 BASIC treats matrices. When I was doing BASIC, I disliked how making a matrix would take up so much RAM that the calculator became pretty much unusable. Well, that's nice to know.

Thanks for telling me that.