Author Topic: Interesting effect... if it worked.  (Read 7831 times)

0 Members and 1 Guest are viewing this topic.

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: Interesting effect... if it worked.
« Reply #15 on: September 13, 2010, 06:15:13 pm »
Interesting indeed. Calc84, can you explain your code? Like in plain English, so that I may learn?
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 ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Interesting effect... if it worked.
« Reply #16 on: September 13, 2010, 07:39:15 pm »
I've got it. :)
Code: [Select]
:[3844828282443800->Pic1
:[0038444444380000
:[0000382838000000     //Store sprites to Pic1, Pic1+8, and Pic1+16
:0->A->B->C->D->{L1}   //Make A,B,C,D, and the byte at the address of L1 0  (Yes, there is no need for the r there.)
:Fill(L1,23  //Copy those zeros so the first 23 bytes are zero.
:Repeat getKey(15)  //Loop until clear is pressed
:ClrDraw     //I forgot.  Something about the buffer...
:Pt-On({L1+22},{L1+23},Pic1     // Draw the first sprite wherever L1+22 and L1+23 are
:Pt-On({L1+12},{L1+13},Pic1+8  // Draw the second sprite wherever L1+12 and L1+13 are
:Pt-On({L1},{L1+1},Pic1+16 // Draw the third sprite wherever L1 and L1+1 are
:DispGraph  // Draw this on the screen
:Copy(L1+2,L1,22  // Shift all the bytes that were at L1+2 to L1+24 back 2 bytes.  Ex: 1,2,3,4,5,6... becomes 3,4,5,6,?,?...
:C-getKey(2)+getKey(3)->C //C and D control momentum  C is X momentum
+A->A  // A and B control position  A is X position
/32->{L1+22}  // Divide by 32 and store to L1+22.  These fill in at the end of the sequence.
:D-getKey(4)+getKey(1)->D //Pretty much the same as above, but for Y
+B->B
/32->{L1+23}
:End  // End the loop
Pretty slick, huh.  Nice code, Calc! ;D

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: Interesting effect... if it worked.
« Reply #17 on: September 13, 2010, 07:53:16 pm »
I would say it might be cool eventually if someone wrote code examples of a program in BASIC and the same in Axe, so people can see the differences between Axe and BASIC, but my concern is that it may mislead Axe programmers at the same time, because many things done in Axe are not the same thing as in BASIC. Example, "HI"->Str1 in BASIC stores the string HI to string 1 variable, but in Axe, it stores the char "H" at the memory address pointed by Str1 and "I" at the next one, both stored in hex form (0 through 255).

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Interesting effect... if it worked.
« Reply #18 on: September 13, 2010, 07:58:21 pm »
both stored in hex form (0 through 255).
I believe they are stored in ASCII, so H would be 76 and I would be 77. :)

That's probably the most confusing thing about Axe.  {Pointers.} :)

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: Interesting effect... if it worked.
« Reply #19 on: September 13, 2010, 08:20:58 pm »
Yeah that's what I mean. I forgot the codes, though :P

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Interesting effect... if it worked.
« Reply #20 on: September 13, 2010, 08:41:29 pm »
$48 and $49, so 72 and 73 ;D
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Interesting effect... if it worked.
« Reply #21 on: September 13, 2010, 09:14:37 pm »
Oh, right.  Sorry, wrong offset. :P
Thanks for the catch. :)