Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Munchor on January 07, 2011, 09:44:22 am
-
Hey, I know that some of you have made games with pausing systems that work with a key to pause the game.
How does that work? How do you do it?
I wanted to implement it in uPong and was wondering how.
Thanks much!
-
If getkey(Y)
Repeat getkey(X)
End:End
?
-
If getkey(Y)
Repeat getkey(X)
End:End
?
If getKey(9)
Repeat getKey(9)
End:End
For the ENTER Key... I have to try it yet, thanks.
EDIT: It doesn't work, probably it is only getting the getKey, no actualing stopping the game.
-
don't do it with the same key ( it will directly exit from the loop )
try it
If getkey(9)
While getkey-9
End:End
-
don't do it with the same key ( it will directly exit from the loop )
try it
If getkey(9)
While getkey-9
End:End
That works more or less :S It pauses the game, but when I put it back on, it only lasts 1 second and then is paused again :S
-
hmmm ok try this :P
!If getkey-9
Repeat getkey-9
End:End
-
This is what I do -
While getkey(0)
Dispgraph[r]
End
Repeat getKey(0)
Dispgraph[r]
End
-
I use:
If getKey(45
Repeat getKey
DispGraph[r]
End
End
-
I use APD command for the "pause"
-
me:
Repeat getkey(0)
Dispgraph[r]
End
Repeat getKey(0)-1
Dispgraph[r]
End
-
Me:
Repeat getkey-9
Dispgraphrr
End
You don't really need anything more complicated.
-
I use APD command for the "pause"
What's that?
This is what I do -
While getkey(0)
Dispgraph[r]
End
Repeat getKey(0)
Dispgraph[r]
End
This is pretty much what I use. It's really nice because it doesn't go forward when the button's still held down. Plus you can use the second loop to do some nice effects.
-
@Deep_Thought: Me too.
@Michael_Lee: Yours works perfectly! Thank you very much. +1
-
@Michael_Lee: Yours works perfectly! Thank you very much. +1
Can I have a +1 too for being awesome?
-
you can also make a teacher key by doing this if you don't have greyscale for the second method in parentheses.
If getkey(X)
Repeat getkey(X) and getkey(Y)
(Here you can set the contrast to 0 or do this)
Copy(L6,L3,768)
ClrDraw
End
Copy(L3,L6,768)
-
you can also make a teacher key by doing this if you don't have greyscale for the second method in parentheses.
If getkey(X)
Repeat getkey(X) and getkey(Y)
(Here you can set the contrast to 0 or do this)
Copy(L6,L3,768)
ClrDraw
End
Copy(L3,L6,768)
You gave me a great idea!! How to change the contrast in Axe? I only have a little text saying "Paused", I want to change the contrast, it would be cool.
-
If you are using Greyscale, then you can do
If getkey(X)
Copy(L1-56,L5,56
Copy(L6,L1-56,768
Rect(0,0,96,64
Repeat getkey(x)
Dispgraphrr
End
Copy(L1-56,L6,768
Copy(L5,L1-56,56
End
Or
Shade(0)
EDIT: Accidentally answered your question, Scout.
-
If you are using Greyscale, then you can do
Copy(L1-56,L5,56
Copy(L6,L1-56
Rect(0,0,96,64
Dispgraphrr
Or
Shade(0)
Uh, accidentally answered your question, Scout.
But I'm not using a greyscale, so the second one :D
-
Okay then. What project is this for?
-
Okay then. What project is this for?
uPong. However, I'm probably adding greysacle...
-
Rather than Shade(0)
Use APD !!!
If getkey(9)
sub(SD)
End
...
Lbl SD
Asm(3E01D303FB76FDCB09A6C9)
Return
-
Thanks for that code. I've wanted to add a APD function for a while.
-
Rather than Shade(0)
Use APD !!!
If getkey(9)
sub(SD)
End
...
Lbl SD
Asm(3E01D303FB76FDCB09A6C9)
Return
You'll lose all of your data in L1 if you go into APD.
-
Couldn't you do L1->DispGraph to avoid that? Or possibly Copy(L1,L6,768)? Not entirely sure how APD works...
-
I think APD overwrites L1 with a bitmap image of the screen. You'd have to copy your data elsewhere first, because storing L1 in L6 after APD would just result in a corrupted version of the same thing being written to the buffer.
-
why copy the buffer if you just use APD ?
-
Here's what I do:
If getKey(Key)
While getKey(Key)
End
Repeat getKey(Key)
End
While getKey(Key)
End
End
-
Nice :)