Author |
Message |
|
simplethinker snjwffl
Active Member

Joined: 25 Jul 2006 Posts: 700
|
Posted: 27 Feb 2009 10:09:21 pm Post subject: |
|
|
nitacku wrote: Ed H wrote: Here is a snake program that uses no lists. I wrote this a while ago, and I'm not sure if this is the latest version. It's pretty playable; try it!
Ah, yes. Pxl-test does make this possible.
But I wonder if a snake game can be created without using lists and pxl-test... and matrices as well
You could hard-code it using A-Z & theta, but I'm guessing that's cheating. There has to be some way of keeping track of where the snake has been to know where it will be. |
|
Back to top |
|
|
WikiGuru ADOS (Attention deficit... Oh! Shiny!)
Elite

Joined: 15 Sep 2005 Posts: 923
|
Posted: 28 Feb 2009 12:20:32 am Post subject: |
|
|
But if your snake happened to turn right next to another section of itself, you'd get some unexpected behavior... or if you're running along the edge of an apple/wall. |
|
Back to top |
|
|
simplethinker snjwffl
Active Member

Joined: 25 Jul 2006 Posts: 700
|
Posted: 28 Feb 2009 12:37:08 pm Post subject: |
|
|
WikiGuru wrote: But if your snake happened to turn right next to another section of itself, you'd get some unexpected behavior... or if you're running along the edge of an apple/wall.
That's why you move two pixels at a time, so there's only one set pixel touching the tail.
[edit]Here's a short snake game without lists:
Code: :ClrDraw
:30→H:46→L
:30→T:44→U
:0→D:1→E
:2randInt(1,30→A
:2randInt(1,46→B
:Repeat K=45 or 47<abs(L-47) or 31<abs(H-31
:Pxl-On(H,L
:Pxl-On(H-D,L-E
:Pxl-On(A,B
:If H=A and L=B
:Then
:2randInt(1,30→A
:2randInt(1,46→B
:Else
:T+2pxl-Test(T+1,U)-2pxl-Test(T-1,U→P
:U+2pxl-Test(T,U+1)-2pxl-Test(T,U-1
:Pt-Off(U,-T,3
:Ans→U:P→T
:End
:getKey→K
:If max(Ans={24,25,26,34
:Then
:(Ans=34)-(Ans=25→D
:(K=26)-(K=24→E
:End
:H+2D→H
:L+2E→L
:End
Last edited by Guest on 28 Feb 2009 03:24:58 pm; edited 1 time in total |
|
Back to top |
|
|
luby I want to go back to Philmont!!
Calc Guru

Joined: 23 Apr 2006 Posts: 1477
|
Posted: 28 Feb 2009 08:05:35 pm Post subject: |
|
|
Weregoose wrote: In Button Masher, I would change that Repeat 20=randInt(10,30 to While int(21rand. 
Actually, I believe that this optimization fails because, the point of the code is to make a random amount of time pass and when your code is run, it generates decimals until one is greater then .047, which would happen quite quickly (albeit still randomly).
Last edited by Guest on 11 Jul 2010 06:14:19 pm; edited 1 time in total |
|
Back to top |
|
|
calc84maniac
Elite

Joined: 22 Jan 2007 Posts: 770
|
Posted: 28 Feb 2009 09:25:36 pm Post subject: |
|
|
luby wrote: Weregoose wrote: In Button Masher, I would change that Repeat 20=randInt(10,30 to While int(21rand. 
Actually, I believe that this optimization fails because, the point of the code is to make a random amount of time pass and when your code is run, it generates decimals until one is greater then .047, which would happen quite quickly (albeit still randomly).
Note the 21 before the rand. It will generate random numbers until one of them is less than 1/21. 
Last edited by Guest on 11 Jul 2010 06:13:54 pm; edited 1 time in total |
|
Back to top |
|
|
luby I want to go back to Philmont!!
Calc Guru

Joined: 23 Apr 2006 Posts: 1477
|
Posted: 28 Feb 2009 10:45:33 pm Post subject: |
|
|
My bad, thought that was a repeat. |
|
Back to top |
|
|
N.cruz
Newbie

Joined: 17 Feb 2009 Posts: 7
|
Posted: 07 Mar 2009 10:23:41 am Post subject: |
|
|
hi everyone... xD
Can someone send me a program that do all or almost all the Quadratic Equations works?
like the vertex, the X axis intersections and if possible, ask if we want to disp the graph
I know that program is already posted in others sites but I already try some and always occurred an error or something goes wrong...
thks ^^
I have an TI-82 STATS but i've got the usb cable so if you want send the 82x file 
Last edited by Guest on 07 Mar 2009 10:27:59 am; edited 1 time in total |
|
Back to top |
|
|
cjgone Aw3s0m3
Active Member

Joined: 24 May 2006 Posts: 693
|
Posted: 08 Mar 2009 04:31:34 pm Post subject: |
|
|
Gr, clock programs for analog are frustrating as hell. I just don't get patterns, but I tried doing some random stuff.
made 12 = 0 , then made (12) 0 = 0 degrees, 3 = 90 degrees, 6 = 180 degrees, and 9 = 270 degrees. So then I divide the time by 3 and mutiply by 90 to make that friggin angle... Which sadly doesn't work cuz sin and cos are dumb...But the 2 axis are reversed and its acting like bearings or something ( 0 is supposed to be 90 and so on), So I then I remembered that my axis are flipped (remembered this from some old school thing about joy stick axis reversing) so now I just had to draw a line from 0,0 to sin( 90(time\3), cos (90(time\3))
And thats how I do it..and i'm pretty sure that its a bad way to do it :{ But it looks pretty effecient imo. 
Last edited by Guest on 08 Mar 2009 04:53:21 pm; edited 1 time in total |
|
Back to top |
|
|
TI-newb
Member

Joined: 24 Dec 2008 Posts: 158
|
Posted: 10 Mar 2009 08:36:53 pm Post subject: |
|
|
I have just made a program that mimics the actual.. like.. calculator?
I decided to make this program because it replaces Input"blah:",A and stuff, where you have to press enter, instead, this program makes it so whatever you type ( so far limited to only numbers, and it's not very well done either so i would like some help xD) it becomes a string and other programs can use it.
if u guys would like i can type it up and post it.
So far, i have used it for this Temperature Converter, where it converts what i type down(celcius) into Faranhiet whenever i press a number. |
|
Back to top |
|
|
TI-newb
Member

Joined: 24 Dec 2008 Posts: 158
|
Posted: 15 Mar 2009 10:53:04 am Post subject: |
|
|
i just read my own post, and i didn't get what i was trying to say... so lemme repeat
it's like a Getkey, this Program... actually it is, so it uses Getkeys instead of the Input "..:",A and so i get the Value of what im typing down right away instead of Typine it down on Input and then pressing Enter..
But i think i have given up on it anyways... |
|
Back to top |
|
|
cjgone Aw3s0m3
Active Member

Joined: 24 May 2006 Posts: 693
|
Posted: 15 Mar 2009 11:39:12 pm Post subject: |
|
|
Sounds fun. :DDD |
|
Back to top |
|
|
TI-newb
Member

Joined: 24 Dec 2008 Posts: 158
|
Posted: 19 Apr 2009 11:31:32 am Post subject: |
|
|
nikkaku. How about you make us a Graph Screen Menu that can be inserted into another program.
I'm almost done mine. but i wanna see how you would do it. |
|
Back to top |
|
|
woodswolf
Advanced Newbie

Joined: 26 Feb 2009 Posts: 53
|
Posted: 20 Apr 2009 04:05:51 am Post subject: |
|
|
nitacku wrote: Ed H wrote: Here is a snake program that uses no lists. I wrote this a while ago, and I'm not sure if this is the latest version. It's pretty playable; try it!
Ah, yes. Pxl-test does make this possible.
But I wonder if a snake game can be created without using lists and pxl-test... and matrices as well
Why would you want to? List are perfectly fine right? |
|
Back to top |
|
|
nitacku
Advanced Member

Joined: 23 Aug 2005 Posts: 408
|
Posted: 27 Apr 2009 01:03:48 am Post subject: |
|
|
[quote name='TI-newb' post='132764' date='Apr 19 2009, 12:31 PM']nikkaku. How about you make us a Graph Screen Menu that can be inserted into another program.
I'm almost done mine. but i wanna see how you would do it.[/quote]
Ok I'll see what I can come up with. I'm thinking of doing something with multiple tabs + coordinate specification all controlled with variables.
woodswolf wrote: Why would you want to? List are perfectly fine right?
Just for the challenge of creating a snake game without one.
I'd like to see a snake game that uses strings. That would be interesting. |
|
Back to top |
|
|
woodswolf
Advanced Newbie

Joined: 26 Feb 2009 Posts: 53
|
Posted: 27 Apr 2009 05:22:09 am Post subject: |
|
|
well, I guess you can even make a snake, with the use of one variable, but the max length could then only be 7 or 8 |
|
Back to top |
|
|
darkstone knight
Advanced Member

Joined: 07 Sep 2008 Posts: 438
|
Posted: 27 Apr 2009 05:48:27 am Post subject: |
|
|
you can compress 3 coordinates in a single var, the max lengt would be ~70 |
|
Back to top |
|
|
woodswolf
Advanced Newbie

Joined: 26 Feb 2009 Posts: 53
|
Posted: 27 Apr 2009 04:08:28 pm Post subject: |
|
|
I may have found a way to code snake without the use of Lists, matrixes and whatever. only variables. Max length of snake could be... 29, or 58 tiles. but the calculations around the algoritmes are so much, it might only work on homescreen |
|
Back to top |
|
|
NotYourLoginID
Newbie

Joined: 05 May 2009 Posts: 9
|
Posted: 06 May 2009 02:54:55 pm Post subject: |
|
|
[font="Century Gothic"]
Hi, Im new too! I've checked out alot of the programs listed here and have tried them...Pretty Cool... Problem is i dont understand the really complex ones with all the wierd math functions like "not(" or "fill(" Anyway to skip to the point I have A more than 5 min program, but I feel it should go here because of how helpful it is.(MADE IT IN MATH CLASS...LIKE MOST OTHER PEOPLE...SMART MINDS THINK ALIKE) It's posted on one of my Pages..... Its a Number Factorer. Doesn't Simplify it down to the Primes, justs lists all the combinations without repeating. Its Fairly low powered, but I'm still proud of it, especially because it worked the first time i used it! NO SYNTAX ERRORS! Message Me suggestions, comments, or optimizations!
I should probably stop Talking... HERE IT IS:
::"Factor The Number
:Lbl BG
:ClrHome
:SetUpEditor
:ClrList ∟FIRST
:ClrList ∟SECND
:99→dim(∟FIRST,∟SECND)
:Imput "Number? ",X
:If X≤0
:Goto NV
:If X≥10000
:Goto TH
:If X≠int(X)
:Goto WN
:X→A:0→L
:ClrHome
:Lbl DN
:int(A/7)→S
:Output(4,4,"Loading..."
:Output(7,1,"Seconds"
:Output(8,1,"Left:"
:Output(8,6,S)
:If A=700 or A=70
:ClrHome
:If A<1
:Goto DS
:X/A→B
:If B=int(B)
:Goto SN
:A-1→A
:Goto DN
:Lbl SN
:L+1→L
:B→∟FIRST(L)
:A→∟SECND(L)
:A-1→A
:Goto DN
:Lbl DS
:ClrHome
:1→G
:2→C
:1→D
:1→L
:Output(1,1,"Nmbr:")
:Output(1,7,X)
:Lbl D1
:If ∟FIRST(L)=0 or ∟SECND(L)=0
:Goto FN
:If L≥3:Then
:Goto A1
:Else
:Goto A2
:End
:LblA1
:L-1→P
:L-2→Q
:If ∟FIRST(L)=∟SECND(P) or ∟FIRST(L)=∟SECND(Q)
:Goto FN
:Lbl A2
:If C>8:Then
:2→C
:9→D
:End
:If G>13
:Goto OF
:Output(C,D,∟SECND(L)
:Output(C,D+4,"*"
:Output(C,D+5,∟FIRST(L)
:G+1→G
:L+1→L
:C+1→C
:Goto D1
:Lbl FN
:Output(1,12,"Done"
:Pause
:Return
:Lbl OF
:Output(8,10,"-More-"
:Pause
:ClrHome
:1→G
:Output(1,1,"Nmbr:"
:Output(1,7,"X"
:2→C
:1→D
:Goto D1
:Lbl TH
:ClrHome
:Disp "Number To High!","","Number Must","Be Between","0 and 9999"
:Pause
:Goto BG
:Lbl WN
:ClrHome
:Disp "Wrong Value!","","You May Only","Enter Whole","Numbers."
:Pause
:Goto BG
:Lbl NV
:ClrHome
:Disp "Number To Low!","","Number Must","Be Between","0 and 9999"
:Goto BG
Might Require Tweaks on anything other than TI83+ to get the Second Counter to run Right
Ill post more math helpers Later
|
|
Back to top |
|
|
TI-newb
Member

Joined: 24 Dec 2008 Posts: 158
|
Posted: 13 May 2009 09:11:09 pm Post subject: |
|
|
don't use Goto's and Lbls for starters. they are a pain if someones trying to see what ur program does.
and im sorry i can't(don't have the time) to decode your program either.
but if it can factor. it's amazing. i think i should try to make 1. and by Factoring the number... u mean Equation? like
(X+2)(X+2) ? i havn't factored in a while but i believe the answer is. X^2+4X+4. |
|
Back to top |
|
|
IAmACalculator In a state of quasi-hiatus
Know-It-All

Joined: 21 Oct 2005 Posts: 1571
|
Posted: 14 May 2009 04:46:44 pm Post subject: |
|
|
@nitaku: Could you maybe annotate one or two of those programs for me? I'm still (!) trying to break out of my TI-Basic n00b box, and while I now have an 89, many things still apply from the Z80 series. I think having a small and elegant program explained would help me and some of the other beginners.
@NotYourLoginID: The usefulness of a program does not justify posting it in an unrelated topic, especially if you already made your own topic and posted it in there. No offense or anything, but it's just bad form. The fact that a program that monstrously large ran on the first try is impressive, however.
@TI-Newb: It factors an integer. You can tell because it takes a single number as input. |
|
Back to top |
|
|
|