• Axe Q&A 5 5
Currently:  

Author Topic: Axe Q&A  (Read 587066 times)

0 Members and 7 Guests are viewing this topic.

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: Axe Q&A
« Reply #1005 on: November 17, 2011, 10:29:14 am »
You have to manually put brackets around each line.  For some odd reason sc doesn't do them, I'm guessing because it merges Axe and BASIC tho they're completely different.
Anyway "PART_1" is the front buffer, "PART_2" is the back.
Once you put the brackets around each line (which is easier to do on a computer btw :P) you could run it through sc again to get the 8xp to send to the calc.  On the first line store a pointer, then use a Copy() or similar to copy to L6 and/or just DispGraph from there.
Vy'o'us pleorsdti thl'e gjaemue

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Axe Q&A
« Reply #1006 on: November 17, 2011, 10:33:48 am »
You have to manually put brackets around each line.  For some odd reason sc doesn't do them, I'm guessing because it merges Axe and BASIC tho they're completely different.
Anyway "PART_1" is the front buffer, "PART_2" is the back.
Once you put the brackets around each line (which is easier to do on a computer btw :P) you could run it through sc again to get the 8xp to send to the calc.  On the first line store a pointer, then use a Copy() or similar to copy to L6 and/or just DispGraph from there.
Okay, I see, but what should I upload again trough sourcecoder? A txt file with that in?


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

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: Axe Q&A
« Reply #1007 on: November 17, 2011, 10:36:15 am »
Just copy/paste the text into the editing window.
(same page where is has the upload box, there's the calc icons off to the side)
« Last Edit: November 17, 2011, 10:36:31 am by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Axe Q&A
« Reply #1008 on: November 17, 2011, 10:39:36 am »
Okay thanks. :) I put dispgraph rr there in also rightaway?
« Last Edit: November 17, 2011, 10:39:54 am by Stefan Bauwens »


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

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: Axe Q&A
« Reply #1009 on: November 17, 2011, 10:45:28 am »
Well, you'd do it something like this:
Spoiler For kind of big:
[FFFFFFFFFFFFFFFFFFFFFFFF]→GDB6
[FFFFFFFFFFFFFFFFFFFFFFFF]
[FFFFFFFFFFFFFFFFFFFFFFFF]
[FFFFFFFFFFFFFFFFFFFFFFFF]
[FFFFFFFFFFFFFFFFFFFFFFFF]
[FFFFFFFFFFFFFFFFFFFFFFFF]
[FFFFFFFFFFFFFFFFFFFFFFFF]
.etc
.same for other buffer, just a different GDB ofc

.one way..
Copy(GDB#,L6,768)
Copy(GDB#,L3,768)
.buffer modifying stuffs, such as a selector in a menu etc
Dispgraphrr

.another way..a bit weird to modify tho
DispGraph(GDB#,GDB#)rr
.(front,back)

There's prolly more ways, those are just examples but yeah :P
« Last Edit: November 17, 2011, 02:22:47 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Axe Q&A
« Reply #1010 on: November 17, 2011, 10:48:05 am »
Thanks a lot. :)
I'm trying it out now.


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Q&A
« Reply #1011 on: November 17, 2011, 09:33:19 pm »
What does "too many blocks" mean? It took me to an else if. Does it have something to do with having 17 else ifs?

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Axe Q&A
« Reply #1012 on: November 17, 2011, 10:28:48 pm »
I believe it does mean that, yes. Are they nested?

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Axe Q&A
« Reply #1013 on: November 18, 2011, 12:23:54 am »
I think even when they're not nested they still add to the block count because the end of each elseif block needs to link to the cumulative end of the entire statement.  But generally, if you're using 17 elseif statements, you're doing something wrong and you should probobly be using some kind of lookup table.  If you really do need them though, you should use a subroutine instead because it will save you tons of bytes:

Code: [Select]
:If <S1>
:  <B1>
:ElseIf <S2>
:  <B2>
:ElseIf <S3>
:  <B3>
:...

Convert this to:

Code: [Select]
:MySub()

:Lbl MySub
:If <S1>
:  <B1>
:  Return
:End
:If <S2>
:  <B2>
:  Return
:End
:If <S3>
:  <B3>
:  Return
:End
:...
« Last Edit: November 18, 2011, 12:26:32 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Q&A
« Reply #1014 on: November 18, 2011, 04:23:04 pm »
Quigibo:

I'm not sure if I need them. There for my levels. Im sure it could be simplified. Ill go get some code.

I created a new if at the 15th elseif to make it work :P
I'll probably just change it to your way unless there's an even better way to do it.

Code: [Select]
If A=1
Text(1,16,"YOU HAVE BEEN GIVEN A GUN."
Text(1,24,"GO AND TEST IT OUT."
Text(1,32,"DESTROY 2 ENEMIES")
ElseIf A=2
Text(1,16,"BATTLE MORE."
Text(1,24,"DEFEAT 6 ENEMIES"
ElseIf A=3
Text(1,16,"THERE ARE 3 ENEMIES"
Text(1,24,"THEY ARE FAST"
ElseIf A=4
Text(1,16,"THE NEW GUN IS READY"
Text(1,24,"BUY THE WEAPON FROM THE"
Text(1,32,"UPGRADE MENU"
ElseIf A=5
Text(1,16,"THERE ARE 10 GUARDS"
Text(1,24,"DEFEAT THEM TO CONTINUE"
ElseIf A=6
Text(1,16,"THIS PLACE HAS ENEMIES THAT"
Text(1,24,"WILL BE AS FAST AS YOU."
Text(1,32,"KILL 4"
ElseIf A=7
Text(1,16,"NOW, BUY THE NEXT WEAPON"
Text(1,24,"FROM THE UPGRADE MENU"
ElseIf A=8
Text(1,16,"GOOD. YOU NOW MUST KILL"
Text(1,24,"10 ENEMIES"
ElseIf A=9
Text(1,16,"UPGRADE MORE."
Text(1,24,"GET THE NEXT GUN"
ElseIf A=10
Text(1,16,"DEFEAT 10 FASTER ENEMIES"
Text(1,24,"USING YOUR NEW WEAPON."
ElseIf A=11
Text(1,16,"DEFEAT 5 MORE ENEMIES"
Text(1,24,"TO CONTINUE"
ElseIf A=12
Text(1,16,"GET THE NEXT GUN"
Text(1,24,"FROM THE UPGRADE MENU"
ElseIf A=13
Text(1,16,"DEFEAT 10 FAST ENEMIES"
Text(1,24,"THEY WILL BE AS FAST AS YOU"
ElseIf A=14
Text(1,16,"DEFEAT 5 MORE ENEMIES"
Text(1,24,"THEY'RE REALLY FAST"
End
If A=15
Text(1,16,"GET THE LAST"
Text(1,24,"FROM THE UPGRADE MENU!"
ElseIf A=16
Text(1,16,"NOW ITS NIGHT TIME."
Text(1,24,"KILL 20 ENEMIES!"
ElseIf A=17
Text(1,16,"MIDNIGHT:"
Text(1,24,"KILL EVERYTHING. ALL 35"
Text(1,32,"THEY ARE SUPER FAST"
End
Text(1,56,"Push On"
Repeat getKey(41)
If getKey(15)
Goto C
End
End
Fix 5
If A=1
GAME(0,2,0,4,3,1
ElseIf A=2
GAME(0,6,0,4,3,1
ElseIf A=3
GAME(0,3,0,4,1,1
ElseIf A=4
GAME(0,0,1,4,3,1
ElseIf A=5
GAME(0,10,1,3,3,1
ElseIf A=6
GAME(0,4,1,1,3,1
ElseIf A=7
GAME(0,0,2,3,3,1
ElseIf A=8
GAME(0,10,2,3,3,1
ElseIf A=9
GAME(0,0,3,3,3,1
ElseIf A=10
GAME(10,0,3,1,3,1
ElseIf A=11
GAME(5,0,3,2,3,1
ElseIf A=12
GAME(0,0,4,2,3,1
ElseIf A=13
GAME(10,0,4,1,3,1
ElseIf A=14
GAME(7,0,4,1,3,2
End
If A=15
GAME(0,0,5,1,3,1
ElseIf A=16
GAME(20,0,5,1,3,2
ElseIf A=17
GAME(35,0,5,1,3,3
« Last Edit: November 18, 2011, 04:27:39 pm by epic7 »

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Axe Q&A
« Reply #1015 on: November 18, 2011, 04:27:35 pm »
I am making an axe game(http://ourl.ca/140510) and as you can see the grayscale isn't anymore so pretty when I move left/right. The screenshot doesn't show it so well.
Anyway, aeTIos said I should use interrupts. But I have no idea what it is and how to use it. So maybe someone could help me
Thanks in advance. :)


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Axe Q&A
« Reply #1016 on: November 18, 2011, 04:32:41 pm »
I have a bit of a problem. So I have a bunch of string pointers stored to Str1, and I'm trying to run the following code:

Text(r1,r2)
Text {W-1*2+Str1}{r}

But it works a few times, then ends up crashing. I've isolated the problem to this segment of code, so if someone could tell me why it's crashing that would be appreciated ^^ It seems to have worked all the other times I've done this.

Also is Text(x,y):Text "Strings" smaller than Text(x,y,"Strings")?

EDIT: It doesn't exactly crash, but it makes the calc turn off and quits the program.
« Last Edit: November 18, 2011, 04:44:43 pm by leafiness0 »
In-progress: Graviter (...)

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: Axe Q&A
« Reply #1017 on: November 20, 2011, 12:54:20 am »
Am I doing this right?
"appvBLARG"→Str1
GetCalc(Str1,123)→oVAR
255→oVAR
!If oVAR-255
.if equal to 255
Disp "Yay"
Else
Disp "Noes"
End
Vy'o'us pleorsdti thl'e gjaemue

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Axe Q&A
« Reply #1018 on: November 20, 2011, 01:56:38 am »
Am I doing this right?
"appvBLARG"→Str1
GetCalc(Str1,123)→oVAR
255→oVAR
!If oVAR-255
.if equal to 255
Disp "Yay"
Else
Disp "Noes"
End


I thought it would be more like

"appvBLARG"→Str1
GetCalc(Str1,123)→oVAR
255→{oVAR}
!If {oVAR}-255
Disp "Yay"
Else
Disp "Noes"
End


Since you treat appvars like areas of free RAM. I'm not certain though.
« Last Edit: November 20, 2011, 01:57:07 am by leafiness0 »
In-progress: Graviter (...)

Offline macweirdo

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-3
    • View Profile
Re: Axe Q&A
« Reply #1019 on: November 20, 2011, 09:42:08 am »
So, say a certain person tried to make a program on their calculator in Axe, but when they made the main loop, they failed at the GetKey= statement and can't quit their program.

What should I, I mean they, do?