And so it begins Smile I took about half an hour to make this all work, just to get a feel for where things needed to be. What I've got so far:


Code:
ClrDraw:AxesOff
GridOff
{2,4,5,6,6,7,7,7->L3
BackgroundOff
0->Xmin:0->Ymin:1->I
264->Xmax:164->Ymax
For(F,4,156,19
Line(7,F,167,F,1,12,1
End
For(F,7,167,20
Line(F,4,F,156,1,12,1
End
For(H,8,166,20
not(I->I
For(F,4,119,38
For(G,2,18
Line(H,F+G+19(I=1),H+18,F+G+19(I=1),2,11,2
End:End:End
For(H,8,166,20
not(I->I
For(F,23,138,38
For(G,2,18
Line(H,F+G-19(I=1),H+18,F+G-19(I=1),2,23,2
End:End:End
5->theta
TextColor(Blue
For(F,1,8
Text(~1,theta,175,sub("CHECKERS",F,1
theta+20->theta
End
2->theta
Text(~1,75,205,"BY:
For(F,1,12
Text(theta,254,sub("TI-FREAKWARE",F,1
theta+13->theta
End


I know it can be optimized, I'm going to try to combine the square coloring bits, if I can. Will probably go with the list set up once again for this, seems like it'd be the easiest for me.

Moving the coins around will be simple, just fill in the circle with the dark grey color, move in lists and variables, redraw. I haven't decided on a cursor yet. One thing at a time, I suppose.

Edit: Updated the code:


Code:
ClrDraw:AxesOff
GridOff
{2,4,5,6,6,7,7,7->L3
BackgroundOff
0->Xmin:0->Ymin:DelVar I
264->Xmax:164->Ymax
For(F,4,156,19
Line(7,F,167,F,1,12,1
End
For(F,7,167,20
Line(F,4,F,156,1,12,1
End
For(H,8,166,20
not(I->I
For(F,4,138,19
not(I->I
For(G,2,18,2
Line(H,F+G,H+18,F+G,1,11+12(I=1),2
End:End:End
5->theta
TextColor(Blue
For(F,1,8
Text(~1,theta,175,sub("CHECKERS",F,1
theta+20->theta
End
2->theta
Text(~1,75,205,"BY:
For(F,1,12
Text(theta,254,sub("TI-FREAKWARE",F,1
theta+13->theta
End


Now it's all in one loop and still looks like the screenshot. Smile
cool looks nice Very Happy
I've never actually found a checkers game for the ti, so this will be a nice twist to the common chess games. Any chance you will make the board capable of user-chosen color? Not sure if that's really possible in the color ti-basic.
Not without writing a bunch of selection code :p But it would be possible.

@Alex, thanks!

I might shoot for a darker grey, but I need to make the game drop the coins onto the dark spots to see how it will look. Will happen sometime today.
LuxenD wrote:
I've never actually found a checkers game for the ti, so this will be a nice twist to the common chess games. Any chance you will make the board capable of user-chosen color? Not sure if that's really possible in the color ti-basic.

Do you mean with AI?

Also, @tifreak8x: Are you going to attempt AI? ^^
I dunno yet. I haven't given much contemplation to that yet, just want to make it playable. Smile

Edit:



This takes right at 30 seconds to render on a real calculator. I still have to add the coins into it, which isn't going to be fun, and will likely increase the time before one can play by another 25 seconds or so.

Edit2:

shaun was kind enough to remind me my for( loop needed to go by 2. Now it generates the board in just over 20 seconds. Smile
That board looks really spiffy, tifreak8x! What color are you planning on making the checkers themselves, though, to make sure that they'll stand out sufficiently? I guess a two-pixel-thick black or white border with red or gray (or black) inside might work?
Well, I'm going to go with a light grey, I think. Then the black will show up fairly well on that, and still give it a nice looking board. Once I have a little bit of time, I'll take screens of the 2 options, see what you all decide Smile I still need to make it generate the checkers onto the board, so I might do that first. :p
Great, I look forward to seeing those options. Also, can I assume that like Connect4, this will be a two-player game rather than a 1 player vs. AI game? I should think that that's likely, given that a Checkers AI is much, much less trivial than a Connect4 AI.
I'm definitely going to shoot for PvP now, and possibly look into AI for it later. The AI wouldn't be all that hard, I would think, but I could be wrong.

At the most, it will be looking for a piece that can jump an enemy piece that has no enemy behind that piece, and if none of those are found, will move a piece forward that is unobstructed.

We shall see, though. Smile
tifreak8x wrote:
I'm definitely going to shoot for PvP now, and possibly look into AI for it later. The AI wouldn't be all that hard, I would think, but I could be wrong.

At the most, it will be looking for a piece that can jump an enemy piece that has no enemy behind that piece, and if none of those are found, will move a piece forward that is unobstructed.

We shall see, though. Smile
Aye, a one-move or even two-move AI would be pretty easy to write. For some of the algorithmic challenges of thinking further ahead, take a look at this and this. The latter set of code does 5- or 6-move lookahead, but requires calculating power far above the abilities of a calculator.
Heh, yeah, I don't think I'm going to worry about plotting ahead too much; scanning on its turn and making a move based on the checkers at that time would be most efficient for a calc version, I think. Smile

I still haven't even looked into writing AI code for Connect 4 yet. :/


For your viewing pleasure, and hopefully an opinion on what ones you think would look okay against black. You can clearly see the black lines against all three of the greys, I think, but I also have very good vision, so I don't know :<
i cant decide between the 1st and 2nd ones; ive never been a fan of light gray.

even so, this seems to be coming along wonderfully! i just hate to think how long it would take to draw all the coins...

btw does the Fast circle thing from Kerm's book work in this calculator?
It doesn't work at all, it was removed when they added the color options into the statement. :< Though, the circle drawing is much improved over the old one, at least I think so.

Edit:

Seems I forgot to post a screenshot, with the newest version of it throwing them colored tiles up there:



That is just a touch slower than the real deal, it takes like 21 seconds to render on calc I think?

As to the two pics above, I'm leaning towards the middle one. What about you all?
Nice screenshot! Very Happy If I didn't know better, I'd say it was taken with jsTIfied. Smile I too am leaning towards the middle one. I think it's the best-looking one.
Yep, it was that jstified program someone awesome made. And now I'll have to figure out if that was color code 22 or 23.. lol
I think it would be cool if you could pick the colors. I plan on implementing something like that in Lights Out (as soon as I actually get some free time to sit down and program). If you want, I can give you the code once that's in place.

As for the ones you have there, I really like the middle one.
Are we talking the color of the board, or are we talking choosing whether you start with red or black? Because now that I thought of it, that could be come important, I suppose. :p
I meant specifically the color of the board and pieces.
  
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
» Goto page 1, 2, 3, 4, 5  Next
» View previous topic :: View next topic  
Page 1 of 5
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement