Author Topic: Sprites and Many Instances of a Sprite  (Read 6986 times)

0 Members and 1 Guest are viewing this topic.

Offline The VFX Wizard

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
    • View Profile
Sprites and Many Instances of a Sprite
« 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:
5 Things I hate the most: lists, irony, lists, repitition, typos, and the Oxford comma

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6267
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Sprites and Many Instances of a Sprite
« Reply #1 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/
/e

Offline johnbchron

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +1/-0
  • RiskALungForDiving
    • View Profile
Re: Sprites and Many Instances of a Sprite
« Reply #2 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?)
Just a dude who is really bored in school... and a huge nerd.
Click here to give me an internet!
 <a href="http://www.freebiebitcoin.com">Earn free bitcoin</a>

Offline The VFX Wizard

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
    • View Profile
Re: Sprites and Many Instances of a Sprite
« Reply #3 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)
5 Things I hate the most: lists, irony, lists, repitition, typos, and the Oxford comma

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6267
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Sprites and Many Instances of a Sprite
« Reply #4 on: March 15, 2018, 05:59:00 pm »
/e

Offline The VFX Wizard

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
    • View Profile
Re: Sprites and Many Instances of a Sprite
« Reply #5 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?
5 Things I hate the most: lists, irony, lists, repitition, typos, and the Oxford comma