0 Members and 3 Guests are viewing this topic.
As for the program, does it absolutely requires that mod, though? Or can we play normally with keypad?
EDIT: btw on Omnimaga, the double-posting limit is 6 hours, so you would have been allowed to bump your topic with your edit
Oh I meant the Snake game he posted
Quote from: DJ Omnimaga on June 15, 2010, 06:06:29 pmAs for the program, does it absolutely requires that mod, though? Or can we play normally with keypad?To clear the screen you will need the mod.but, you can edit the code to have a button clear the screen.
habbybob: what DJ was saying was that double-posting is allowed providing it has been at least six hours.
.EESKETCHFulldiognosticoffDispGraphClrDraw0->S->O->P+1->L+9->X->Y+90->AText(82,0,A|>DecText(1,0,L|>DecRepeat G=15getKey->Gasm(DB00E6036F2600)->IIf I=0:For(J,0,L):Pxl-Off(rand^96,rand^65):End:DispGraph:EndIf X<95 and getKey(3):X+1->X:sub(A):EndIf Y>7 and getKey(4):Y-1->Y:sub(A):EndIf X>0 and getKey(2):X-1->X:sub(A):EndIf Y<62 and getKey(1):Y+1->Y:sub(A):EndIf G>4While getKey(29) and (G=29):If L>1:L-1->L:Text(1,0,L|>Dec):Pause 125:End:EndWhile getKey(21) and (G=21):If L<255:L+1->L:Text(1,0,L|>Dec):Pause 125:End:EndWhile getKey(10) and (G=10):Text(82,0,A|>Dec):A+1->A:Pause 110:EndWhile getKey(11) and (A>1) and (G=11):A-1->A:Pause 110:Text(82,0,A|>Dec):EndIf G=13 and getKey(13):StorePic :X->O:Y->P:EndIf G=12 and getKey(12):RecallPic :O->X:P->Y:DispGraph:EndIf G=56 and getKey(56):ClrDraw:DispGraph:EndIf G=14 and getKey(14):DrawInv :DispGraph:EndEndEndLbl APxl-On(X,Y):DispGraph:Pause AReturnNormal
If X<95 and getKey(3):X+1->X:sub(A):EndIf Y>7 and getKey(4):Y-1->Y:sub(A):EndIf X>0 and getKey(2):X-1->X:sub(A):EndIf Y<62 and getKey(1):Y+1->Y:sub(A):End
If X>0 and (X<95getKey(3)-getKey(2)+X->Xsub(A)EndIf Y<62 and (Y>7getKey(1)-getKey(4)+Y->Ysub(A)End
While getKey(29) and (G=29):If L>1:L-1->L:Text(1,0,L|>Dec):Pause 125:End:Endor, more readably:While getKey(29) and (G=29)If L>1L-1->LText(1,0,L|>Dec)Pause 125End:End
While L>1 and getKey(29)L-1->LText(1,0,L>DecPause 125End
Code: [Select]If X<95 and getKey(3):X+1->X:sub(A):EndIf Y>7 and getKey(4):Y-1->Y:sub(A):EndIf X>0 and getKey(2):X-1->X:sub(A):EndIf Y<62 and getKey(1):Y+1->Y:sub(A):Endcan beCode: [Select]If X>0 and (X<95getKey(3)-getKey(2)+X->Xsub(A)EndIf Y<62 and (Y>7getKey(1)-getKey(4)+Y->Ysub(A)Endthat way you're only calling the subroutine twice.. because think about it, all four of your if-conditionals have the possibility of being true simultaneously, so you'd be calling the subroutine A 3 unnecessary times.Code: [Select]While getKey(29) and (G=29):If L>1:L-1->L:Text(1,0,L|>Dec):Pause 125:End:Endor, more readably:While getKey(29) and (G=29)If L>1L-1->LText(1,0,L|>Dec)Pause 125End:Endcan beCode: [Select]While L>1 and getKey(29)L-1->LText(1,0,L>DecPause 125Endbecause if L is not greater than 1, nothing in the while loop happens and is therefore useless, so i put L>1 as a conditional for the loop to be checked against. however, if you want getkey(29) to halt program execution even when L<1, my optimization is useless.Similar optimizations can be made to the while loops nearby that section in the code.
0->S->O->P+1->L+9->X->Y+90->A
0->S->O->P+1->L+9->X->Y^2->A
Etch-E-Sketch + Clear By ShakeVersion: 1.2.1Compiler: Axe 3.0Coded by: James Oldiges of Happybobjr Productions.Code assistance by: Quigibo found at: http://www.omnimaga.org/index.php?action=profile;u=321/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\History: I was at school one day, trying to learn the newest version of Axe.As always I am stubborn and want to learn by trial-and-error.To start off with I just tried to learn the syntax of the commands. (In Ti-Basic with pxl-on command it is pxl-on(Y, X)I am thinking Why The!?!?!?So I just made a simple program to display what the pixel location was (adjustable by arrow keys)Well I screwed up. It didn't delete the previous pxl. .. Oops.So I started drawing for a while, having a good laugh with my friends during math.My teacher was reviewing so my friends and I didn't need to pay full attention (as long as we were being quiet)So I updated the program of course to add features like; Clearing the screen Adjustable speed Save and restore And other such goodies.Then one of my friends came over (one listening to the review, who just finished) asked if a made a real etch-e-sketch.Sarcastically I shook it and accidently bumped the delete button. The screen cleared :P.It was funny since he thought the shaking did it.Eventually we told him what happened.Right then I made it my project for the whole summer to create an attachment that would clear the screen./\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\Description:This Etch-E-Sketch is a first of its kind that looks for the I/O port for a command to clear the screen.Yes KermMartian did make a similar program and attachment as the same time as me./\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\Key codes+ increases the number of milliseconds between repetition. Thus, slowing the etching speed.- Decreases the number of milliseconds between repetition. Thus, increasing the etching speed./ (divide) Saves the current picture s you may recall it again later (not stowed into pic).* (multiply) recalls a previously stowed picture. (If had not yet stowed one, clears screen and puts curser at 0, 0( Decreases the number of pixels removed when shaken (requires attachment)) increases the number of pixels removed when shaken (requires attachment)^ (carrot key) shows inverse of the picture.Del clears screen.Clear quits program. (Do a double clear for kicks and giggles.)/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\Notes: Because this is a newer program, it is safer to do a Garbage-collect after each useShould work on:Ti-83Ti-83+Ti-83+ silverTi-84Ti-84+Ti-84+ silver./\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\//\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Motion DetectionUp there is only the program. Now you will find the heart and soul of this project, the motion detector./\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\About: Ok so I started out with no information. I didn't know how to approach this.I realized it must be possible to detect something in the I/O port, but I didn't know how.The other thing I did not understand is the making of a 2.5mm male jack.The jack it turns out has 3 parts. Ground, Left, and Right.The two in the middle are Ground, the ones next to those are Right, and the tips are Left.In Axe, Quigibo informed me, you can check for four different occurrences; Left high, left low, right high, and left low.At start without anything connected, there will be left high and right high.Left/Right will become low when Left/Right is connected to Ground.The code Quigibo gave me was: asm(DB00E6036F2600)This stores a result into ans. (I think not 100% sure about this.)So if you do asm(DB00E6036F2600)->var, you can have a piece of code depending on the answer.So then, after tinkering and destroying my 2 2.5mm male jacks, I rushed off to Radio Shack. "Tell me if you, a Radio Shack", quote from Kungpow, a notoriously funny movie. Well back to the point.So at Radio Shack I am having no luck finding what I need.After about 10 min. a guy who worked there asked if he could help.He could. So then I told him what I needed and he found it, sort of.He could only find a 2.5mm jack (mono) which only has left and ground.I am thrilled. This will make soldering everything much easier. 2 for $3.50, what a deal!Ok Now I have everything. And was good to start building.Thanks to KermMartian for help with; Workings and design on 2.5 mm jack and information about most efficient build for project.Found at: http://www.cemetech.net/forum/profile.php?mode=viewprofile&u=2\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/Contact information: Email is [email protected]