Omnimaga

Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: The VFX Wizard on March 15, 2018, 10:56:41 am

Title: Sprites and Many Instances of a Sprite
Post by: The VFX Wizard on March 15, 2018, 10:56:41 am
I'm new to Axe and I am having trouble finding tutorials for specific areas of Axe. I am currently in the process of recreating the dino jump game from the Chrome browser (if you don't know what I mean disconnect from the internet and you can play the game on Chrome). I need help with storing the cactus's positions. I tried using Ti-Basic syntax for the lists, but it gave me an error. Also, how do I create a hex code for a sprite bigger than 8x8?  Please help.  :w00t:
Title: Re: Sprites and Many Instances of a Sprite
Post by: Eeems on March 15, 2018, 03:28:39 pm
I would suggest reading through the Documentation provided with Axe:

I would also suggest looking at the examples provided with Axe: https://axe.eeems.ca/?p=Examples/
Title: Re: Sprites and Many Instances of a Sprite
Post by: johnbchron on March 15, 2018, 03:43:43 pm
   As for the lists, it is just an area of ram labeled L1-6. It is convenient to use these areas as lists, however because of how large they are and the fact that in any other case it's called a list. You access it the same way you would for other parts of ram, for example if you wanted to access the its 13th byte (you can choose whether to space the items in your list one or two bytes apart, based on whether you need numbers from 0-255 or 0-65535), your syntax would be L1+12 (or 24 if you are using two byte spacing). Be careful when using more than L1 for the reasons explained below however, because some of those areas of ram are used for system things. Refer to the image below, taken from the axe command list.
   As for your sprites, hex codes only are accepted by axe in powers of 16, that I can tell. You can make icons for your programs that are 16x16 and 64 hex characters long, and you can make 8x8 sprites for the Pt-On(, Pt-Off(, and Pt-Change( that are each 16 hex characters long. As far as I know, your best bet is to display multiple sprites right next to each other. It's what I've always done... (did you know that you can store sprites from Pic00000 to PicFFFFF?)
Title: Re: Sprites and Many Instances of a Sprite
Post by: The VFX Wizard on March 15, 2018, 05:45:35 pm
How would I for example create multiple enemies or instances of a sprite and keep up with their positions and variables? (Space Invaders for example)
Title: Re: Sprites and Many Instances of a Sprite
Post by: Eeems on March 15, 2018, 05:59:00 pm
Here is a list of Axe tutorials: http://www.omnimaga.org/axe-language/specific-tutorials-list-%28axe%29/
A specific tutorial that answers your questions can be found here: https://www.omnimaga.org/axe-language/arrays-in-axe-(enemybullet-code-tutorial)/
Title: Re: Sprites and Many Instances of a Sprite
Post by: The VFX Wizard on March 16, 2018, 05:33:53 pm
I have also been working on an Atari Breakout game (https://www.google.com/search?q=atari+breakout&safe=strict&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjQ4LC85fHZAhXDqFkKHThZClcQ_AUICigB&biw=1920&bih=949). How would I when the ball collides on the side of a box as opposed to the top or the bottom?