Author Topic: Simple Axe Questions  (Read 23704 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
Re: Simple Axe Questions
« Reply #15 on: March 22, 2011, 07:38:51 pm »
Yeah what Runer112 suggested is kinda what Reuben Quest and ROL2 used for earthquake effects.

HOWEVER, keep in mind this doesn't work on the TI-Nspire (it will do nothing) and will not work all the time on WabbitEmu.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Simple Axe Questions
« Reply #16 on: March 22, 2011, 08:16:44 pm »
How do you do collision detection with sprites in Axe?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Simple Axe Questions
« Reply #17 on: March 22, 2011, 08:19:27 pm »
In a monochrome map.  You can store the "physical" objects in both buffers.  Then you can check if there is a pxl on the back buffer at the spot you are moving to.
« Last Edit: March 22, 2011, 08:19:36 pm by Happybobjr »
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Simple Axe Questions
« Reply #18 on: March 22, 2011, 08:23:58 pm »
How do you do collision detection with sprites in Axe?

To detect if two 8x8 sprites are colliding, simple do

If abs(X1-X2)<8 && (abs(Y1-Y2)<8

I'm sure it could be optimized, but its just a demonstration :P

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Simple Axe Questions
« Reply #19 on: March 22, 2011, 08:36:41 pm »
How do you test for an enemy or a wall?
Can you distinguish the two pixels?

EDIT: Oh wait. I'm an idiot.
« Last Edit: March 22, 2011, 08:37:27 pm by Raylin »
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Simple Axe Questions
« Reply #20 on: March 22, 2011, 08:43:00 pm »
Can someone explain what and, or, and xor do in axe?
Not in If statements, but otherwise.  It's not very descriptive in the commands list :P
Vy'o'us pleorsdti thl'e gjaemue

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Simple Axe Questions
« Reply #21 on: March 22, 2011, 08:47:16 pm »
It is the exact same thing though. (methinks)
If you and it, the outcome will be 1 iff both inputs are 1.
If you or it, the outcome will be 1 iff any of the inputs are 1.
If you xor it, the outcome will be 1 iff only one input is 1.


Although I might be completely wrong.
Note:  for those who may not know, in the us,  "iff" stands for, "If and only if"
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Simple Axe Questions
« Reply #22 on: March 22, 2011, 09:13:31 pm »
By the way, I think a few people have gotten confused a bit. This is not the general Axe Q&A thread, this is just a thread that Scout started to ask a few specific questions for his program. If you want to ask short questions, in the future it would probably be better to ask them in the general Axe Q&A thread made for this purpose.


Can someone explain what and, or, and xor do in axe?
Not in If statements, but otherwise.  It's not very descriptive in the commands list :P

I think Wikipedia can explain the bitwise operations better than I can. The examples they give are for 4-bit numbers, whereas Axe uses 16-bit numbers. The and, or, xor, and not() commands only operate on the low 8 bits (the high 8 bits will simply be copied from one of the arguments). The ·, ?, ?, and not()r commands perform the operation on the full 16 bits.
« Last Edit: March 22, 2011, 09:15:18 pm by Runer112 »

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Simple Axe Questions
« Reply #23 on: March 23, 2011, 10:37:23 am »
Runer, I'm afraid I'm not very comfortable with the Axe Q&A topic, since a lot of people are asking questions in the same thread :S

I have one more question:

3. How to get arguments in a label that is a subroutine. I want to call it like sub(DW,"HEY",1 and in the Lbl DW I want to get the arguments. Thanks.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Simple Axe Questions
« Reply #24 on: March 23, 2011, 10:44:41 am »
Runer, I'm afraid I'm not very comfortable with the Axe Q&A topic, since a lot of people are asking questions in the same thread :S

I have one more question:

3. How to get arguments in a label that is a subroutine. I want to call it like sub(DW,"HEY",1 and in the Lbl DW I want to get the arguments. Thanks.

r1 is the first argument, r2 is the second, etc. They're all accessed from VARS > Y-VARS > 3:Polar....
« Last Edit: March 23, 2011, 10:44:50 am by Deep Thought »




Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Simple Axe Questions
« Reply #25 on: March 23, 2011, 10:46:28 am »
Runer, I'm afraid I'm not very comfortable with the Axe Q&A topic, since a lot of people are asking questions in the same thread :S

I have one more question:

3. How to get arguments in a label that is a subroutine. I want to call it like sub(DW,"HEY",1 and in the Lbl DW I want to get the arguments. Thanks.

r1 is the first argument, r2 is the second, etc. They're all accessed from VARS > Y-VARS > 3:Polar....

Woooh thanks seems good help :)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Simple Axe Questions
« Reply #26 on: March 23, 2011, 10:55:48 am »
Btw, it's all in the documentation (commands.html) ;)




Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Simple Axe Questions
« Reply #27 on: March 23, 2011, 12:00:15 pm »
Yeah Deep, thanks.

I have a new question now, is there any way I can extend r1-r6 to 37?

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Simple Axe Questions
« Reply #28 on: March 23, 2011, 12:19:33 pm »
Yeah Deep, thanks.

I have a new question now, is there any way I can extend r1-r6 to 37?

37? What do you mean?

If you mean r7, nope, there's a max of 6 args. When would you use 7?

You can always pass more args as variables, though.
« Last Edit: March 23, 2011, 12:19:52 pm by Deep Thought »




Offline turiqwalrus

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 840
  • Rating: +51/-2
  • Wheeeeeee~!
    • View Profile
Re: Simple Axe Questions
« Reply #29 on: March 23, 2011, 02:19:00 pm »
meh... Somehow, I managed to forget how to display a grayscale sprite :(
anyone?