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 Calculator Programming 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. General Coding and Design => Calculator Programming
Author Message
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 27 Nov 2005 12:40:39 pm    Post subject:

Recently, instead of working on the Basic contest entry like a good perseverant person would have, I've been working on a Basic Minesweeper-type game. The game itself is progressing quite nicely, and I think I've licked the final problem of recursively opening adjacent squares when you 'click' on an empty one. What I'm having a problem with is putting the thing on a 63x95 screen.
I've decided to put the 10x10 (63 by 63 pixels) in the right part of the screen, leaving a 31x61 area on the left for miscellaneous stuff (see screenshot). What I want to include in that is: the time, in seconds, used and the number of mines left; the high score and initials; a logo for the game (which I've had the creative idea of calling Mines) and possibly my name and United-TI somewhere if it fits.
Does anyone have suggestions?
Back to top
Liazon
title goes here


Bandwidth Hog


Joined: 01 Nov 2005
Posts: 2007

Posted: 27 Nov 2005 01:39:58 pm    Post subject:

If your using a Ti-84+, then you can use the built in clock to get a timer count.

I think it's clockon and clock off. Gettimer->variable, then checktimer(variable->another variable. I'll have to check up on that.

But I don't see why you have a problem though? Couldn't use just use text(x,y,timevariable?

Though I do admit trying to fit the highscore, your name, and UTI on it is goin to be hard.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 27 Nov 2005 01:51:20 pm    Post subject:

I don't have a problem with the code. I have a problem with making it all look pretty. I admit I could just leave things the way they are now, with six text( instructions in neat rows. But it looks kind of ugly.

Last edited by Guest on 27 Nov 2005 01:51:39 pm; edited 1 time in total
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 27 Nov 2005 02:19:37 pm    Post subject:

-- oversized divider
logo / name
-- oversized divider
time
mines left
score
initials
-- oversized divider
credits

30x63:


Last edited by Guest on 27 Nov 2005 02:24:47 pm; edited 1 time in total
Back to top
axcho


Active Member


Joined: 09 Nov 2004
Posts: 555

Posted: 27 Nov 2005 03:42:56 pm    Post subject:

For the controls, don't forget to uncover all adjacent squares to an uncovered square that you click on (if there are the sufficient number of flags). You know how in the computer version it will uncover all adjacent squares to a square when you press both mouse buttons, as long as the number of adjacent flags matches the number on the square.

Could you post the code for recursively uncovering the empty squares? That would be useful in a Go game, and I'm too lazy to come up with one on my own if you've already written one. Razz I'll give you credit if I release it.
Back to top
Brazucs
I have no idea what my avatar is.


Super Elite (Last Title)


Joined: 31 Mar 2004
Posts: 3349

Posted: 27 Nov 2005 03:54:39 pm    Post subject:

How about the un/happy face?



Last edited by Guest on 27 Nov 2005 03:55:34 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 27 Nov 2005 05:30:41 pm    Post subject:

axcho wrote:
For the controls, don't forget to uncover all adjacent squares to an uncovered square that you click on (if there are the sufficient number of flags). You know how in the computer version it will uncover all adjacent squares to a square when you press both mouse buttons, as long as the number of adjacent flags matches the number on the square.

Could you post the code for recursively uncovering the empty squares? That would be useful in a Go game, and I'm too lazy to come up with one on my own if you've already written one. Razz I'll give you credit if I release it.
[post="62491"]<{POST_SNAPBACK}>[/post]
Using recursion it would be much simpler, but I want to have it all be in one program. Here is the outline of what I have so far. Might not be completely optimized, and I haven't put it into my calculator yet.
[A] - matrix of the mines
[B] - matrix of uncovered squares
[C] - matrix of mines next to each square, to make calculating easier
all matrices have a border around them, for now, to prevent dimension errors
initial setup:

Code:
{-1-i,-1,i-1,-i,i,1-i,1,1+i -> L1

clearing code:

Code:
(If it's an empty square, put row+column*i into L1, otherwise make L1 empty)
While dim(L1
L1(dim(L1->X
dim(L1)-1->dim(L1
If not([C](real(X),imag(X
Then
For(I,1,8
X+L3(I
If min(real(Ans),imag(Ans))>1 and max(real(Ans),imag(Ans))<12 and [B](real(Ans),imag(Ans)) and not(max(Ans=L1
Ans->L1(1+dim(L1
End
End
(clear square at real(X),imag(X))
End

I might yet reconsider using complex numbers.

I don't know what to do for the happy/unhappy face. I'm going to have a "popup window" when you win or lose, and maybe I could put one in that.

Edit: Arcane, here's what I've done with your artwork (to fit it into the space I provided for it, and to avoid having to make a custom font). See attachment.


Last edited by Guest on 27 Nov 2005 07:00:26 pm; edited 1 time in total
Back to top
Liazon
title goes here


Bandwidth Hog


Joined: 01 Nov 2005
Posts: 2007

Posted: 27 Nov 2005 08:53:53 pm    Post subject:

Brazucs wrote:
How about the un/happy face?


[post="62493"]<{POST_SNAPBACK}>[/post]


The face is cool. (but annoying when you can't seem to beat Minesweeper)

But you can probably leave it out and nobody would care.
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 28 Nov 2005 12:24:08 am    Post subject:

DarkerLine wrote:

Code:
(If it's an empty square, put row+column*i into L1, otherwise make L1 empty)
While dim(L1
L1(dim(L1->X
dim(L1)-1->dim(L1
If not([C](real(X),imag(X
Then
For(I,1,8
X+L3(I
If min(real(Ans),imag(Ans))>1 and max(real(Ans),imag(Ans))<12 and [B](real(Ans),imag(Ans)) and not(max(Ans=L1
Ans->L1(1+dim(L1
End
End
(clear square at real(X),imag(X))
End

I might yet reconsider using complex numbers.
[post="62494"]<{POST_SNAPBACK}>[/post]


Essentially you just check all eight squares around each blank one? I've discovered this leads to a lot of overlap if you have a large area of blank squares. I've put some thought into how to avoid this, but I haven't come up with anything reasonable.

Spyderbyte
Back to top
threefingeredguy


Advanced Member


Joined: 01 Sep 2005
Posts: 479

Posted: 28 Nov 2005 12:03:21 pm    Post subject:

You can make a 10x10 grid of 5x5 squares with lines in between and fit the numbers in there easily. Thats what I did in my basic minesweeper.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 28 Nov 2005 05:12:44 pm    Post subject:

Spyderbyte wrote:
Essentially you just check all eight squares around each blank one?  I've discovered this leads to a lot of overlap if you have a large area of blank squares.  I've put some thought into how to avoid this, but I haven't come up with anything reasonable.

Spyderbyte
[post="62519"]<{POST_SNAPBACK}>[/post]
I'm checking for overlap, though.
Quote:
You can make a 10x10 grid of 5x5 squares with lines in between and fit the numbers in there easily. Thats what I did in my basic minesweeper.
I like my grid so far, thanks Smile
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