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 Your Projects 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. Project Ideas/Start New Projects => Your Projects
Author Message
bananaman
Indestructible


Calc Guru


Joined: 12 Sep 2005
Posts: 1124

Posted: 24 Mar 2006 09:07:09 pm    Post subject:



Here it is. My project for the last two days. Its not fully optimized yet. I just see the in game time delay as annoying. If anyone has any suggestions for speed optimizations I'd be open to suggestions.
It is a regular block game (jawbreaker?) if two or more blocks are touching you can delete them. Black blocks are mixers and are not implemented yet. It's just a one level engine right now, nothing fancy, just slow. 2nd selects blocks.

Here's the code for those of you too lazy to download to test. You have to have XLIB and PIC6 though to play, you can just optimize this.

Edit:

That code was just anoying.

@Weregoose:
I just copied and pasted from TI's program editor.


Last edited by Guest on 25 Mar 2006 10:50:13 am; edited 1 time in total
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 24 Mar 2006 10:15:31 pm    Post subject:

I did a sweep through the code without emphasizing on structure. This isn't definitive, so don't treat it as such... and if you think a fix wouldn't work then don't put it in, etc. Forgive the rashness; I haven't been feeling too well. :)


Code:
[font="courier new"]<span style='font-size:9pt;line-height:100%'>[color=darkblue]1→L
DelVar GDelVar S1→P
1→Q
For(I,1,8
For(J,1,12
randInt(1,5→[A](I,J
End
End
randInt(2,5→N
For(I,1,Ans
I-(6=[A](randInt(1,8­),randInt(1,12→I
6→[A](A,B
End
1250L(L+1)/2→N
0→Z
Repeat Z
real(2,0,0,0,12,8,0,12,0,8,6,0,8,1
Repeat 42=abs(K-63
If not(G
real(1,8P-8,8Q-8,1,8,6,0,8,3,0,1
Repeat Ans
getKey→K
End
If G
Then


End
real(2,0,0,0,12,8,0,12,0,8,6,0,8,1
DelVar GP+(K=26)-(K=24
Ans-12((Ans=13)-not(Ans→P
Q+(K=34)-(K=25
Ans-8((Ans=9)-not(Ans→Q
If K=22:Then
real(1,0,0,12,8,6,0,40,0,0,0
real(1,0,56,12,8,6,0,32,0,0,1
Text(0,24,S
Text(0,70,N
1→G
End
End

[A](Q,P→D
If D>0 and D<6
Then
2→C
P→[B](1,1
Q→[B](1,2
0→[A](Ans,P
1→H
While H≤C-1
[B](H,1→X
[B](H,2→Y
For(I,-1,1,2
If X+I and X+I≤12
Then
If D=[A](Y,X+I
Then
X+I→[B](C,1
Y→[B](C,2
0→[A](Ans,X+I
1+C→C
End
End
End
For(I,-1,1,2
If Y+I and Y+I≤8
Then
If D=[A](Y+I,X
Then
X→[B](C,1
Y+I→[B](C,2
0→[A](Y+I,X
1+C→C
End
End
End
H+1→H
End
real(2,0,0,0,12,8,0,12,0,8,6,0,8,1
5(C-1)²→I%
Ans+S→S
If C=2
Then
Ans-5→S
D→[A](Q,P
End
real(1,0,0,12,8,6,0,40,0,0,0
real(1,16,8,4,8,6,0,24,0,0,1
real(1,0,56,12,8,6,0,32,0,0,1
Text(0,24,S
Text(0,70,N
Text(8,24,"0
If I%>5
Text(8,24,I%
End
Repeat M
1→M
1→A
For(I,12,1,-1
A→B
DelVar AMatr►list([A],I,L<span style='font-size:7pt;line-height:100%'>1[/color]
If max(L<span style='font-size:7pt;line-height:100%'>1[/font]
1→A
If A and not(B
Then
DelVar MFor(L,1,8
[A](L,I→[A](L,I+1
0→[A](L,I
End
DelVar AEnd
End
End
For(J,1,12
Repeat M
1→M
1→A
For(I,8,1,-1
A→B
[A](I,J→A
If A and not(B
Then
DelVar M[A](I,J→[A](I+1,J
0→[A](I,J
DelVar AEnd
End
End
End

End</span></span></span>

From what environment did you copy this program? I had to refer to the .8xp in order to fill a few holes. Cool
Back to top
bananaman
Indestructible


Calc Guru


Joined: 12 Sep 2005
Posts: 1124

Posted: 25 Mar 2006 10:48:46 am    Post subject:

For(I,1,N
randInt(1,8→A
randInt(1,12→B
If 6=[A](A,B
I-1→I
6→[A](A,B
End

Quote:
For(I,1,Ans
I-(6=[A](randInt(1,8­),randInt(1,12→I
6→[A](A,B
End


This change won't work will it? It never stores to A or B

I could just not worry about it doubling over the mixer blocks and change it to...
For(I,1,Ans
6→[A](randInt(1,Cool,randInt(1,12
End

Thanks for going through the code. I changed the dropping feature to test only those rows that have had a change in them. It speeds it up quite a bit. I also added level features, but I still have one bug before I release another test version.
Back to top
bananaman
Indestructible


Calc Guru


Joined: 12 Sep 2005
Posts: 1124

Posted: 28 Mar 2006 07:26:23 pm    Post subject:



Here is my final testing version. I encourage you to download it and try it out before I release it to TIcalc.org. I want opinions and speed optimizations. If you think the sprites are confusing or think you have cooler ones, post them, they're probably better than mine.

Note: If someone could take a moving screenshot and email it to me so I can use it on ticalc I would be very happy and even add your name in the readme.


Last edited by Guest on 28 Mar 2006 07:29:21 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