Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me



Go Back   Dev Hardware ForumsSOFTWAREProgramming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #31  
Old January 23rd, 2012, 09:45 PM
rianbay812 rianbay812 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Jan 2012
Posts: 2 rianbay812 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 52 sec
Reputation Power: 0
Snake!

SNAKE

Been messing around with my calculator since I got it this year and figured out how to make snake. Quite a challenge, but a good use of a snow-day!

Lemme know what you think!
Also Lemme know if it doesn't work, I hope I copied everything correctly.

Quote:
KEY GLOSSARY

The ∟ symbol can be found under 2nd-List>OPS. After that type the name SNAKE or TAIL using the alpha's

SetUpEditor is under the STAT menu

Anything with the word "pxl" in it is found under 2nd-Prgm>POINTS

Pretty much everything else you can find in the catalog (2nd-0)


Also note that quotes and parantheses don't need to be closed

Quote:
: prgmSNAKE
:SetUpEditor ∟TAIL
:SetUpEditor ∟SNAKE
: DelVar ∟Tail
: prgmGRAPH
:ClrHome
:Output(1,1,"SNAKE
:Output(2,1,"----------------
:Output(3,1,"PRESS ANY KEY
:Repeat K
:getKey->K
:End
:ClrHome
:Lbl 01
:Menu("OPTIONS","PLAY",1,"HIGH SCORE",2,"HOW TO PLAY",3
:Lbl 3
:ClrHome
:Output(1,1,"SELF EXPLANATORY
:Pause
:Goto 01
:Lbl 2
:ClrHome
:Output(1,1,"HIGH SCORE:
:Output(2,1,∟SNAKE(1)
:Stop
:Lbl 1
: prgmGRAPH
:Line(0,-1,94,-1
:Line(0,0,0,-63
:Line(0,-53,95,-53
:Line(94,0,94,-64
:1.01->∟TAIL(1)
:2.01->A
:0->T
:26->Θ
:-3->N
:Lbl A
:N+4->N
:Pxl-Off(100fPart(A),iPart(A
:Repeat pxl-Test(-D-1,C)‡1
:randInt(-2,-52)->D
:randInt(2,94)->C
:End
:Pt-On(C,D
:Text(57,40,N
:While 1
:If 100fPart(A)=(-D-1) and iPart(A)=C
:Goto A
:If pxl-Test(100fPart(A),iPart(A))=1
:Goto LO
:Pxl-On(100fPart(A),iPart(A
:getKey->K
:If K‡0
:K->Θ
:A-1(Θ=24)-.01(Θ=25)+1(Θ=26)+.01(Θ=34)->A
:∟Tail(dim(∟TAIL->T
:augment({A},∟TAIL)->∟TAIL
:If N<dim(∟TAIL
:Then
:Pxl-Off(100fPart(T),iPart(T
:N->dim(∟TAIL
:End
:End
:Lbl LO
:If N>∟SNAKE(1)
:N->∟SNAKE(1)
:ClrHome
: Disp "YOU LOSE
: Disp ""
:Output(2,1,"HIGH SCORE:
:Output(2,13,∟Snake(1)
:Stop
That's the main program!

Quote:
prgmGRAPH
:ClrDraw
:CoordOff
:AxesOff
:LabelOff
: DelVar Y1
: DelVar Y2
:0->Xmin
:1->▲X
:-63->Ymin
:1->▲Y


The first 4 are found under 2nd-Zoom,
The Y1 and Y2 are found under VARS>Y-VARS>Function
The Xmin, Ymin, ▲X, and ▲Y are found under VARS>Window.

Again, Let me know if this doesn't work for you!!

-Brian

Reply With Quote
  Trader Rating: 0 · #32  
Old February 28th, 2012, 10:36 AM
calcgamesrfun calcgamesrfun is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 1 calcgamesrfun User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 4 sec
Reputation Power: 0
Quick Update

Quote:
Originally Posted by rianbay812
SNAKE


I'm having a problem with one of the lines from the main program of SNAKE.

:If N>∟SNAKE(1)



I'm getting an "invalid DIM" error. it happens sporadically, and every time I die. I don't know if there is an error that will appear after this one is resolved, but for now that is the only one. Anyway, any help would be appreciated.

Edit--

Okay, it looks as though the error is coming from the High Scores. When I die in the program is when i get the error. Also, when I try and view the high scores (of which there are none) i get the error as well. Were you experiencing difficulty with the high scores?

Last edited by Dngrsone : February 28th, 2012 at 11:00 AM. Reason: fixed quote, spelling errors

Reply With Quote
  Trader Rating: 0 · #33  
Old March 18th, 2012, 09:25 PM
Nardis18 Nardis18 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Mar 2012
Posts: 1 Nardis18 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 44 sec
Reputation Power: 0
Black jack error fixes

To fix the bust error, you need to put X>21 rule in first, or else it will never reach the command. The program is set up like a multiple choice question. If the first solution is not correct, then it will skip that solution, and move along down the list. I like your version of the blackjack program, but it can be expanded much further. In mine, the user will get a bonus if they land on 21, and will lose 2*W if the computer arrives at 21. You can even add a choice at the beginning where if the user is out of money, it will display and game over screen, and display high scores. Makes the game feel more "fun" I'd say.

Reply With Quote
  Trader Rating: 0 · #34  
Old April 28th, 2012, 11:39 AM
Majestas Majestas is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 1 Majestas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 43 sec
Reputation Power: 0
I'm new to all of this programming stuff and I have been working really hard on my own version of a guessing game. How can I create a high score board or something because my friends and I all compete to get the least amount of tries to get the number. Right now I have a 3 way tie with 7 tries. That's impressive since it is a random number between 1 and 1000. So does anyone know how to make a leader board or something.

Reply With Quote
  Trader Rating: 0 · #35  
Old June 22nd, 2012, 03:30 PM
rianbay812 rianbay812 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Jan 2012
Posts: 2 rianbay812 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 52 sec
Reputation Power: 0
Leaderboard

For an easy to read leaderboard (which won't interfere with other programs), Store your information into a list.

Lists are stored in this format:
{0,0,0}->LHS
When returning a list it will give you the value
{0,0,0}

You can also store individual values (when a value exists in that place already)
So using the data already given above,
2->LHS(2)
which will return
{0,2,0}

With that said....

If your score is stored as the variable S, use a system of checks to determine if it is the high score, then put it in if it is!

Here's a sample; LHS(1) is the high score, LHS(2) is the second highest:

:SetUpEditor LHS (L is found under the list menu, HS are Alphas)
:If S<LHS(1)
:Then
:LHS(1)->LHS(2)
:S->LHS(1)
: DelVar S
:End
:If S<LHS(2)
:S->LHS(2)

Hope this helps. Any other questions just ask!

Reply With Quote
  Trader Rating: 0 · #36  
Old October 30th, 2012, 04:24 PM
Drra Drra is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Posts: 2 Drra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 12 m 55 sec
Reputation Power: 0
I'm new to here.. Have been searching around for a while looking for programs to get for my computer. Found this one and typed it in.. Noticed a few bugs.

I fixed it up and want to post it... but since I'm new... I can't do like... anything... Soooo I'll get it to you asap.

Reply With Quote
  Trader Rating: 0 · #37  
Old October 30th, 2012, 04:27 PM
Drra Drra is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Posts: 2 Drra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 12 m 55 sec
Reputation Power: 0
My Version

Lbl 1
Menu("WELCOME","NEW",2,"RESTORE",A,"EXIT",C)
Lbl A
Menu("RESTORE","GAME 1",3,"GAME 2",4,"GAME 3",5,"GAME 4",6,"GAME 5",7)
Lbl 3
Q->Z
Goto B
Lbl 4
P->Z
Goto B
Lbl 5
O->Z
Goto B
Lbl 6
N->Z
Goto B
Lbl 7
M->Z
Goto B
Lbl 2
5->Z (because you need a starting number)
(zero)->X
Menu("WELCOME","PLAY",B,"EXIT",C)
Lbl C
Stop
Lbl B
Disp "MONEY:",Z
Input "BET:",W
If W<1
Then
Disp "BET HIGHER!"
Pause
Goto B
Else
If W>Z
Then
Disp "NOT ENOUGH FUNDS!"
Pause
Goto B
Else
(zero)->V
(zero)->U
(zero)->T
(zero)->S
(zero)->L
randInt(1,11)->V
randInt(1,11)->U
V+U->X
If X>21
Then
Disp "BUST!"
Z-W->Z
(zero)->X
Pause
ClrHome
Goto J
Else
ClrHome
Goto J
Lbl J
Menu("PLAY","HIT",D,"STAY",E,"SPLIT",I,"CARD COUNT",F,"FUNDS",G,"EXIT",H)
Lbl I
If V╪U (not equal to)
Then
Goto J
Else
If V=U
Then
2W->W
randInt(1,11)->T
V+T->X
randInt(1,11)->S
U+S->L
Disp "CARDS",V,T
Disp "CARDS",U,S
Disp "CARD TOTAL:",X,L
Pause
ClrHome
If L>X
Then
L->X
Goto E
Else
If X>L
Then
Goto E
Lbl H
Goto C
Lbl G
Disp "MONEY:",Z
Pause
ClrHome
Goto J
Lbl F
Disp "CARDS:",V,U,"CARD TOTAL:",X
Pause
ClrHome
Goto J
Lbl D
randInt(1,11)+X->X
Disp "CARDS:",X
Pause
ClrHome
Goto J
Lbl E
randInt(1,11)->K
randInt(1,11)->R
K+R->Y
If X=21
Then
Disp "BLACKJACK!"
Disp "YOUR CARDS:",X
Disp "COMP CARDS:",Y
Pause
ClrHome
Z+W->Z
(zero)->X
Goto B
Else
If X>21
Then
Disp "BUST!"
Disp "YOUR CARDS:",X
Disp "COMP CARDS:",Y
Pause
ClrHome
Z-W->Z
(zero)->X
Goto B
Else
If Y≥X
Then
Disp "YOU LOST!"
Disp "YOUR CARDS:",X
Disp "COMP CARDS:",Y
Pause
ClrHome
Z-W->Z
(zero)->X
Goto B
Else
If Y<X
Then
Disp "YOU WON!"
Disp "YOUR CARDS:",X
Disp "COMP CARDS:",Y
Pause
ClrHome
Z+W->Z
(zero)->X
Goto B
Lbl Z
Menu("SAVE","GAME 1",8,"GAME 2",9,"GAME 3",10,"GAME 4",11,"GAME 5",12)
Lbl 8
Z->Q
Goto 13
Lbl 9
Z->P
Goto 13
Lbl 10
Z->O
Goto 13
Lbl 11
Z->N
Goto 13
Lbl 12
Z->M
Goto 13
Lbl 13
Menu("CONTINUE?",B,"EXIT",C)


Still working on a saving feature (mine says-using the previous one- data type error)

anyone wanna help?

Last edited by Drra : October 30th, 2012 at 10:45 PM. Reason: incorrect coding

Reply With Quote
  Trader Rating: 0 · #38  
Old February 13th, 2013, 05:57 PM
dallas4299 dallas4299 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 3 dallas4299 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 11 sec
Reputation Power: 0
iBuild v1.0!!!!!

Hey I made A game and its pretty fun. your a pixel and you can build things and save worlds heres the code:

:"iBuild v1.0!
Menu("iBuild v1.0!","Begin Game",BE,"Exit Game",EX

Lbl EX
ClrHome
ClrDraw
Stop

Lbl BE
ClrDraw
AxesOff
ClrHome
1üA
1üB
Pxl-On(A,B

Repeat K=45
getKeyüK

If K=24 and not(pxl-Test(A,B-1))
Then
B-1üB
If B=0
1üB
Pxl-Off(A,B+1
Pxl-On(A,B
End

If K=25 and not(pxl-Test(A-1,B))
Then
A-1üA
If A=0
1üA
Pxl-Off(A+1,B
Pxl-On(A,B
End

If K=26 and not(pxl-Test(A,B+1))
Then
B+1üB
If B=94
93üB
Pxl-Off(A,B-1
Pxl-On(A,B
End

If K=34 and not(pxl-Test(A+1,B))
Then
A+1üA
If A=62
61üA
Pxl-Off(A-1,B
Pxl-On(A,B
End

If K=42
Pxl-On(A-1,B-1

If K=43
Pxl-On(A-1,B

If K=44
Pxl-On(A-1,B+1

If K=52
Pxl-On(A,B-1

If K=54
Pxl-On(A,B+1

If K=62
Pxl-On(A+1,B-1

If K=63
Pxl-On(A+1,B

If K=64
Pxl-On(A+1,B+1

If K=72
Pxl-Off(A-1,B-1

If K=73
Pxl-Off(A-1,B

If K=74
Pxl-Off(A-1,B+1

If K=82
Pxl-Off(A,B-1

If K=84
Pxl-Off(A,B+1

If K=92
Pxl-Off(A+1,B-1

If K=93
Pxl-Off(A+1,B

If K=94
Pxl-Off(A+1,B+1

If K=31
Then
StorePic 0
AüáTC(1)
BüáTC(2)
End

If K=41
Then
ClrDraw
RecallPic 0
áTC(1)üA
áTC(2)üB
Pxl-Off(A,B
Pxl-On(A,B
End

If K=21
prgmIBUILD
End


u can just copy and paste this code into TI-Coder 1.0, save, and play on ur calc!
PS that little "u" thing is the store key:)
PPS when u copy and paste code into ticoder, those "u"s and 'a"s are automatically converted!

Reply With Quote
  Trader Rating: 0 · #39  
Old February 13th, 2013, 06:00 PM
dallas4299 dallas4299 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 3 dallas4299 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 11 sec
Reputation Power: 0
Simple ScoreBoard

you can set up a variable like 'if A>10 then Goto L" where L is being an input storing to a string (names) and you can store the score to either a list or a variable:)

Reply With Quote
  Trader Rating: 0 · #40  
Old February 13th, 2013, 06:06 PM
dallas4299 dallas4299 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 3 dallas4299 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 11 sec
Reputation Power: 0
make sure you are not typing in "LSNAKE" in all alphas. use the little "L" under [2nd][catalog][L]

Reply With Quote
Reply

Viewing: Dev Hardware ForumsSOFTWAREProgramming > Programming BASIC games for the TI-84+


Developer Shed Affiliates

 


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
     
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap