### Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

### Messages - JWinslow23

Pages: 1 ... 38 39 [40]
586
##### TI Z80 / Re: Shutdown (a clone of Lights Out Deluxe)
« on: November 11, 2013, 01:00:23 pm »
I like labels in BASIC because they can often be an excellent solution and often the best solution

I agree with Xeda. I used labels because I thought it was the best solution.

Anyways, to answer harold, there are no unsolvable starting conditions. (Think of it like a scrambled Rubiks cube, or a scrambled knot in a string whose ends are tied together). When I made one, I wasn't sure if there were unsolvable solutions, so I just simulated n steps and presented the board.

That must have been slow, Xeda.
Harold, I did my research first, and at least for 6 by 6 grids, there are no unsolvable starting conditions. So, int(2rand(36 was sufficient.

So, was the game good?

587
##### TI Z80 / Re: Shutdown (a clone of Lights Out Deluxe)
« on: November 11, 2013, 12:55:31 pm »
I build my basic progs usually somehow like this:
(blah blah blah code)

Now I see how it works! We just need to optimally substitute it into the program somehow. You can see how the program works, right?

588
##### TI Z80 / Re: Shutdown (a clone of Lights Out Deluxe)
« on: November 11, 2013, 12:46:30 pm »
You can like put a long while loop around it with
Code: [Select]
While K=45[...]EndSeeing that you have K=45 as a condition to start again.
Just an idea, though

I don't see how that would work. I know that labels are discouraged in BASIC, but sometimes they are the optimal solution. This may be one of those times.

589
##### TI Z80 / Shutdown (a clone of Lights Out Deluxe)
« on: November 11, 2013, 12:35:52 pm »
This is a less-than-a-kilobyte clone of Lights Out.
CONTROLS
First, you will go to the main menu. Press up and down to go between menu options, and Enter to select. Press left and right to switch between modes.
In-game, press the arrow keys to move along the Lights Out grid, and Enter to turn that and all adjacent lights off. You keep going until the lights are all turned off, or you can press CLEAR at any time to quit. Either way, you will be sent back to the main menu.
MODES
The first mode is Normal mode, where all the lights are turned on.
The second mode is Random mode, where it selects a random configuration of lights.
The third mode is custom. It brings you to a screen with the grid you can customize. The controls are the same as in-game, except no special rules for switching lights apply. CLEAR goes to the game with the pattern.
CODE
Code: [Select]
Lbl SClrHome"----Ans+Ans+Ans+AnsDisp "    SHUTDOWN",Ans," PLAY",Ans," MODE:",Ans," EXIT3→X1→YRepeat K=105Output(5,8,sub("NORMALRANDOMCUSTOM",6Y-5,6Output(X,1,">getKey→KIf AnsThenOutput(X,1," X+2(Ans=34 and X≠7)-2(Ans=25 and X≠3→XY+(K=26)-(K=24Ans-3(Ans=4)+3not(Ans→YEndEnd36→dim(L₁If X=7Goto EIf Y=3ThenClrHomeDelVar A1→BDisp "For X,1,6Disp " OOOOOOEndFill(0,L₁Repeat K=45 and sum(L₁Output(A+2,B+1," rand(8Output(A+2,B+1,sub("O*",1+L₁(6A+B),1getKey→KA+(Ans=34 and A≠5)-(Ans=25 and A→AB+(K=26 and B≠6)-(K=24 and B≠1→B6A+AnsIf K=105not(L₁(Ans→L₁(AnsEndEndIf Y=2ThenRepeat sum(Ansint(2rand(36→L₁EndEndIf Y=1Fill(1,L₁ClrHome"         Output(1,10,"! SHUT "+Ans+"! DOWN "+Ans+"+------"+Ans+"!MODE: "+Ans+"!      "+Ans+"+------"+Ans+"LIGHT:"+Ans+"!Output(5,11,sub("NORMALRANDOMCUSTOM",6Y-5,6For(X,0,5For(Y,1,6Output(2+X,1+Y,sub("O*",1+L₁(6X+Y),1EndEndDelVar X1→YRepeat K=45 or not(sum(L₁Output(8,12," Output(8,11,sum(L₁Output(X+2,Y+1," rand(8Output(X+2,Y+1,sub"O*",1+L₁(6X+Y),1getKey→KX-(Ans=25 and X)+(Ans=34 and X≠5→XY-(K=24 and Y≠1)+(K=26 and Y≠6→YIf K=105ThenFor(A,1,56X+Y{(Ans-6)not(not(X)),(Ans-1)(Y≠1),Ans,(Ans+1)(Y≠6),(Ans+6)(X≠5Ans(AIf Ansnot(L₁(Ans→L₁(AnsEndFor(A,X-not(not(X)),X+(X≠5For(B,Y-(Y≠1),Y+(Y≠6Output(A+2,B+1,sub("O*",1+L₁(6A+B),1EndEndEndEndIf K=45Goto SOutput(8,11,0Pause "YOU WIN!Goto SLbl EDelVar L₁DelVar ADelVar BDelVar KDelVar XDelVar YClrHome

590
##### TI Z80 / Re: Cookie Clicker
« on: November 09, 2013, 08:30:04 pm »
OK, I'm glad it's getting a somewhat good review. Hopefully it can support Golden Cookies soon!

Oh, and I missed the Alchemy Lab building. I'll modify the code soon enough.

591
##### TI Z80 / Re: Cookie Clicker
« on: November 07, 2013, 07:51:14 pm »
You need to save bytes on structure of the program. Check if there are smarter ways to get to the same result. That is what's optimization is all about.

That's part of the reason I posted it here. I can't think of any improvements.

592
##### TI Z80 / Re: Cookie Clicker
« on: November 07, 2013, 07:05:25 pm »
Also, the basic tip of TI-BASIC optimization is that you don't need those end quotation marks.

I know, but this is not included in the actual game. This is only so you can see where they end.

This actually only takes up 973 bytes, minus the name.

593
##### TI Z80 / Cookie Clicker
« on: November 06, 2013, 05:47:30 pm »
This is my code for a Cookie Clicker game with support for a TI-83+ OS 1.19 (and possibly other platforms).

Code: [Select]
DelVar L₁ClrHomeSetUpEditor CLICK10→dim(∟CLICK∟CLICK→L₁9→dim(L₁Output(3,5,"=----------- OO !CURSOR     OO*O!PRICE:     O*OO!           O*OO!OWNED:      OO !∟CLICK(10→C"CURSOR     GRANDMA    FARM       FACTORY    MINE       SHIPMENT   PORTAL     TIMEMACHINEANTIMATTER →Str1DelVar S1→B{15,E2,500,3E3,E4,4E4,1666666,123456789,4E9-1→L₂For(X,1,9int(L₂(X)1.15^L₁(X→L₄(XEnd{.1,.5,4,10,40,E2,6666,98765,E6-1→L₃Output(6,6,L₄(1Output(8,6,L₁(1Repeat K=45getKey→KIf K=105ThenOutput(1,1,"                "C+1→COutput(1,1,int(CEndB+(K=26)-(K=24Ans-9(Ans=10)+9not(Ans→BOutput(4,6,sub(Str1,11B-10,11If sum(K={24,26ThenOutput(6,6,"           "Output(6,6,L₄(BOutput(8,6,"           "Output(8,6,L₁(BEndL₁(B)-(K=85 and L₁(B))+(K=95 and C≥L₄(B→L₁(BIf K=95 and C≥L₄(BThenint(L₂(B)1.15^L₁(B→L₄(BOutput(6,6,"           "Output(6,6,L₄(BOutput(8,6,"           "Output(8,6,L₁(BOutput(1,1,"                "Output(1,1,int(CEndIf K=85Thenint(L₂(B)1.15^L₁(B→L₄(BOutput(6,6,"           "Output(6,6,L₄(BOutput(8,6,"           "Output(8,6,L₁(BEndIf not(SThenC+sum(L₁L₃→COutput(1,1,int(AnsEndOutput(2,1,"                "Output(2,1,int(sum(L₁L₃S+1-4(S=3→SEndC→L₁(10L₁→∟CLICKClrHome
What do you think?

594
##### Humour and Jokes / Re: 9001 signs you're addicted to calcs and Omni
« on: February 11, 2013, 06:41:50 pm »
4462: You understand z80 assembly.
4463: If not, you are attempting to understand assembly.
4464: Instead of using someone else's program, you insist on making your own.
4465: You think that this list should be over by now.

Pages: 1 ... 38 39 [40]