This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
Author Message
Flofloflo


Member


Joined: 07 Nov 2007
Posts: 120

Posted: 14 Sep 2009 12:31:46 pm    Post subject:

Hello,

I saw this game a while back, and I thought hmm... that's easy to make in BASIC on the Ti. Now, I usually don't submit my games because 1) I dunno if anybody cares for simple BASIC games and 2) I don't have a cable that connects my calculator to a computer, and it takes loads of work to write it all down in a text editor. But anyways, this game wasn't extremely big, so I just put it here and if people like it I might consider putting other little games on here.

Btw, since I usually only make my games just for myself, I never bother making a system that tells you you won or lost, it just throws you into the game and you'll probably figure out what your supposed to do... For the clueless: The only thing you can do is jump, any button does this (except for the on-button of course.... )


Code:
clrdraw
fnoff
axesoff
0->Xmin
0->Ymin
62->Ymax
94->Xmax
0->Z
Line(27,20,68,20
line(27,42,68,42
line(26,20,26,42
line(68,20,68,42
line(32,35,46,35
line(52,30,67,30
27->B
32->C
26->K
100->W
pxl-on(K,32
-20->J
;; So far it's all just set-up.

While 1
J+20->J
B->A
C->B
randint(ans-4,39->c
k
for(D,47,27,-1
ans->U
ans-(Z=1)+not(Z or pxl-test(ANS+1,32
pxl-on(ANS,32
if U!=ANS
pxl-off(U,32
Text(1,1,37-D+J

if D>=42:then
pxl-on(A,D-15
else
pxl-on(C,D+25
end
pxl-off(A,D
pxl-on(B,D+5
pxl-off(B,D+20
if not(getkey or ANS=W or ANS = 41
end
ANS->K
if D=26
end
if not(Z) and pxl-test(ANS+1,32
then
1->Z
K-5>W
else
0->Z
100->W
end
K
if ANS !=41
end

Clrdraw
Clrhome
Output(2,1,J+47-D
Output(2,8,"POINTS
Output(1,1,"YOU DIED

Also, I realise I could make my game much faster when I only display pannel A and B, since that's the only two pannels that matter. That way I could also add obstacles. Maybe something I might do sometime soon.

For something completely different: I did a little experiment and figured that if you hold one of the arrow keys, after a while it keeps logging the keypress every 3rd iteration. Is there anybody who has actually used that whole 3rd iteration thing in a BASIC game/program?

-Floris


Last edited by Guest on 17 Sep 2009 12:28:43 pm; edited 1 time in total
Back to top
calc84maniac


Elite


Joined: 22 Jan 2007
Posts: 770

Posted: 14 Sep 2009 02:20:00 pm    Post subject:

Actually, it's not really every third iteration as much as it is a set time delay.
Back to top
ztrumpet


Active Member


Joined: 06 May 2009
Posts: 555

Posted: 14 Sep 2009 03:58:26 pm    Post subject:

Flofloflo wrote:
1) I dunno if anybody cares for simple BASIC games and 2) I don't have a cable that connects my calculator to a computer, and it takes loads of work to write it all down in a text editor.

1) Lots of people care. Smile
2) That takes a ton of time! Good luck getting stuff on the computer. :biggrin:
Flofloflo wrote:
For something completely different: I did a little experiment and figured that if you hold one of the arrow keys, after a while it keeps logging the keypress every 3rd iteration. Is there anybody who has actually used that whole 3rd iteration thing in a BASIC game/program?

The holding keypress thing works with the arrows and the [Del] key.
Back to top
Flofloflo


Member


Joined: 07 Nov 2007
Posts: 120

Posted: 14 Sep 2009 06:26:52 pm    Post subject:

Well.... 1) I honestly can't believe anybody is going to put my little game on his/her calculator and 2) I'd be surprised if the 3rd iteration is in fact based on time, since Ti 83+ doesn't keep track of time??
Back to top
Eeems


Advanced Member


Joined: 25 Jan 2009
Posts: 277

Posted: 14 Sep 2009 06:28:47 pm    Post subject:

well in a sense it does keep track of time. you see the OS loops or something like that, so it will take a certain amount of "loops"
Back to top
BatBlaster


Member


Joined: 10 Oct 2007
Posts: 160

Posted: 16 Sep 2009 05:32:34 am    Post subject:

What type of calculator is this written for. I know, I haven't been here recently, once school starts i start coding again...
Back to top
Flofloflo


Member


Joined: 07 Nov 2007
Posts: 120

Posted: 16 Sep 2009 11:32:00 am    Post subject:

It's Basic, I made it on 83+ but I know for sure ti-83+ games work on 84, don't know if there's much difference with other calculators.
Back to top
Mapar007


Advanced Member


Joined: 04 Oct 2008
Posts: 365

Posted: 16 Sep 2009 02:00:45 pm    Post subject:

83+ games work on 84+, and the other way round, unless you use clock functions/other weird never-used new stuff.
Back to top
BatBlaster


Member


Joined: 10 Oct 2007
Posts: 160

Posted: 16 Sep 2009 08:18:21 pm    Post subject:

I just didn't think variables could be lowercase letters.
Back to top
calc84maniac


Elite


Joined: 22 Jan 2007
Posts: 770

Posted: 16 Sep 2009 08:34:35 pm    Post subject:

BatBlaster wrote:
I just didn't think variables could be lowercase letters.

They can't be lowercase letters, actually. I think Flofloflo just typed in his program by hand without worrying about capitalization.
Back to top
ztrumpet


Active Member


Joined: 06 May 2009
Posts: 555

Posted: 16 Sep 2009 08:37:35 pm    Post subject:

Flofloflo wrote:
Well.... 1) I honestly can't believe anybody is going to put my little game on his/her calculator
Believe it! I just tried this game and it's incredibly fun! It's 340 bytes makes it the smallest game on my calculator, but it is pure fun!
The only question I have is: What makes the game stop?

Edit: One funny thing: If you're high enough, you can jump thru the top! Smile


Last edited by Guest on 16 Sep 2009 08:45:59 pm; edited 1 time in total
Back to top
dxfan101010


Member


Joined: 31 Mar 2008
Posts: 194

Posted: 16 Sep 2009 08:46:37 pm    Post subject:

Great Game but when i miss i dont die. plus you should add score
Back to top
Flofloflo


Member


Joined: 07 Nov 2007
Posts: 120

Posted: 17 Sep 2009 12:06:12 pm    Post subject:

Thank you very much for the feedback.
I hadn't expected that, but as a result, I am gonna update my game.
I'll add highscore, a death system, and I'm working on a different version with half the level size, so you only see the first 2 platforms coming, which should speed up the thing enough to add obstacles.

If somebody knows how to put a text-file on your pc into a calculator-compatible file I might put some more games on here.

-Floris

EDIT: Made alternations:
clrdraw
fnoff
axesoff
0->Xmin
0->Ymin
62->Ymax
94->Xmax
0->Z
Line(27,20,68,20
line(27,42,68,42
line(26,20,26,42
line(68,20,68,42
line(32,35,46,35
line(52,30,67,30
27->B
32->C
26->K
100->W
pxl-on(K,32
-20->J
;; So far it's all just set-up.

While 1
J+20->J
B->A
C->B
randint(ans-4,39->c
k
for(D,47,27,-1
ans->U
ans-(Z=1)+not(Z or pxl-test(ANS+1,32
pxl-on(ANS,32
if U!=ANS
pxl-off(U,32
Text(1,1,47-D+J
if D>=42:then
pxl-on(A,D-15
else
pxl-on(C,D+25
end
pxl-off(A,D
pxl-on(B,D+5
pxl-off(B,D+20
if not(getkey or ANS=W or ANS = 41
end
ANS->K
if D=26
end
if not(Z) and pxl-test(ANS+1,32
then
1->Z
K-5>W
else
0->Z
100->W
end
K
if ANS !=41
end
Clrdraw
Clrhome
Output(1,1,37-D+J
Output(1,8,"POINTS
Output(2,1,"YOU DIED


Last edited by Guest on 17 Sep 2009 12:35:35 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement