http://calcg.org/newlogo2.png Not Logged in.
Login | Register

General Discussion Board \ Calculator Discussion \ Timer?

Click here to log in (you must be logged in to post comments).

AuthorComment
jmasta
Probe
Posted: 16 May 2006
15:33 GMT
Total Posts: 2
i was just thinkin about making some sortof Wario Ware game for the TI-84 and i wanted to know if there was some way to make a time limit for each mini game, like 10 seconds or something. credit will be given if it all works out. THX! :img19:
threefingeredguy
Ghost
avatar
Posted: 16 May 2006
19:18 GMT
Total Posts: 1189
Any good WarioWare game should be made in Assembly, in which case you can just fire an interrupt once every second. In basic, you can use the 84+'s built-in clock. On the 83+/SE, you just have to loop a certain number of times.

---
Someone call for an exterminator?
Hydralisk5201
Wraith
avatar
Posted: 16 May 2006
19:32 GMT
Total Posts: 576
umm the easiest way to do this is putting
For([any variable],[beggining of timer],[end of timer]
WARNING THIS DOES NOT GO BY SECONDS!!!
it goes by iterations...
from my experience, 250 iterations {for(x,1,250} is about ten seconds. but thats a frekin long time, buddy!!!
neways at the end of each mini game, put an [end] at the end, which will end end the coding. heres a little example.
:For(X,1,250 ;like i said any variable (letter)
:getkey->K ;getkey reads for a key press and names it as
a number, i will put the format below. you must
store it in a different variable to get a result
from it
:If K=24 ;"if the variable you stored from the getkey = 24
(left Dpad button)"
:ldfjl;djfl;da ;watever happens from pressing the button
:If K=26 ;"if the variable you stored form the getkey = 26
(right Dpad button)
:aldjfl;djafdj ;watever happens from pressing the button
:end ;end of the For( loop. stops here until the timer is
fully done.

for is also useful for moving items on the home screen.
persay, you want to move the letter A from the left to the middle, youd do this

"A"-> Strn1 ;stores anything into a strin and will look like
watevers inside the " "'s when called upon
For(A,1,8 ;the beggining of the for( loop. note that each
iteration of the loop, it stores the next
number in the timeline (starting from the first to
the last) into the variable.
output(4,A,Strn1 ;outputs the string at this specific spot on the
screen
clrhome ;clears the screen each timeso that the A's dont
form a line across the screen
end ;this is the end

output( uses it in format like this-
1
2
3
4
5
6
7
8

blocks as rows. you put the row fist. then comes the columns

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

there are 16 rows from left to right
the for( loop said above will continuously add A+1 from the begging of the numbers
For(A,*1*,8
to the end of the numbers
For(A,1,*8*
so it will do this to the variable
(first number)->A
does watever
end
A+1->A
(so now its 2)
does watever
end
etc etc
so using the variable thats being changed in the output.
output(4,*A*,strn1
therefore the letter moves.
but watch out, the letter will not delete its last spot.
do this
If A>1
output(4,A-1," "
so that it deletes the "A" behind itself
just put the coding mentioned above to learn yourself how to use
For( loops.

---
Flintlock Durden says "The things you eat end up eating you"
jmasta
Probe
Posted: 17 May 2006
15:39 GMT
Total Posts: 2
okay cool ill try it THX!
Hydralisk5201
Wraith
avatar
Posted: 17 May 2006
16:35 GMT
Total Posts: 576
haha np

---
Flintlock Durden says "The things you eat end up eating you"
Nintendork
Probe
Posted: 18 May 2006
13:31 GMT
Total Posts:

Edit
Two words:

JcGames

Or is that one word? Anyway, it's a Warioware-like BASIC game.





Portal | My Account | Register | Lost Password or Username | TOS | Disclaimer | Help | Site Search | File Archives Copyright © 2002-2019 CalcG.org