Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: tifreak on March 30, 2013, 03:09:18 pm

Title: TI-84+CSE: Checkers
Post by: tifreak on March 30, 2013, 03:09:18 pm
Decided that this project is now far enough along to announce it to you all here. :)

This is a recreation of the game of Checkers.

As it stands right now, I have it set up to generate the board. Something of a twist in regards to this though.. Well, I'll just show you :)

(http://tifreakware.net/tifreak8x/checkers/Checkers3customboard1.gif)

I know the image is missing a couple of lines, that's just the screenshotting bit of jstified not handling the color stuff overly well right now.

Anyways, thoughts on what it does so far? Like the look of the placement of the board?
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on April 02, 2013, 04:37:50 pm
Looks very cool so far. Also the speed seems pretty decent for board drawing and very nice for changing colors. Two questions, though:

-What's with the missing rows of pixels? ??? I saw this happen in Shaun's snake too once. Is it a jsTIfied emulation or CalcCapture bug or an on-calc bug?
-When you change Player 1 token color, for some reasons filling it to black color seems slightly faster than red. Is it because of the screenshot framerate or is black faster to draw?

Also I wonder if the board would look better if the board outline was 2 pixels thick or if one of the side was made slightly 3D?
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 02, 2013, 10:21:00 pm
The missing pixels is how jstified's screen capture stuff is set up, nothing I can do about it, sadly. :<

And I never really noticed the speed difference in colors, so it might be something to do with the emulator.

As to the board, I was contemplating taking the black lines out all together, speed up generation of the board just a little bit. :) I just don't want the main focus of the board to be them thick black lines. I kind of like the subtlety of the thin lining. :)
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on April 02, 2013, 10:31:54 pm
Oh I didn't know that jsTIfied had animated screenshots support. Could you maybe use Calccapture or are the colors too messed up?

Also are lowercase letters still 2 bytes each instead of 1? I forgot.
Title: Re: TI-84+CSE: Checkers
Post by: chickendude on April 03, 2013, 12:14:00 am
I'm also impressed by the speed, and i like the customization at the beginning. It's a nice touch though i'm not sure it's really necessary :P Very cool nonetheless. I just wonder what the speed when moving pieces will be like.

And on a sidenote: when's Pokemon Purple CSE coming out? Now it can actually BE purple :D
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on April 03, 2013, 12:17:03 am
There is no purple color on the CSE :P

(Although you could just use red and blue checkerboards, but that would be slow lol)
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 03, 2013, 04:38:40 am
Who knows. None of the asm utilities are available, so I couldn't even begin to start on it. So there are no plans what so ever to even begin porting it.
Title: Re: TI-84+CSE: Checkers
Post by: chickendude on April 03, 2013, 06:04:42 am
Well when the CSE makes it's way over to China, maybe i can help out with that. Anyway i've still got a solid 1MB of space sitting on my 84+SE waiting to be filled with purple ;) Sorry for sidetracking the topic.
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 03, 2013, 12:51:14 pm
Haha You're fine. I've been glancing at the pokemon code again, getting TIFC and Connect 4 out has somewhat rejuvinated me in that way. :) Hopefully new posts will happen about that soon!
Title: Re: TI-84+CSE: Checkers
Post by: Sorunome on April 03, 2013, 11:19:13 pm
That color sure makes things look a lot better than on the other z80s :D
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on April 04, 2013, 12:05:43 am
In any case, if you ever start working on games that are display-heavy, you might want to wait until someone releases an utility to shift the screen around and enable 160x240 mode, so you gain speed at the cost of doubling pixel lenght. Plus you would be able to use the entire screen width so your games would display over a slightly larger area of the screen.
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 05, 2013, 12:51:48 pm
Trust me, I know :p I'm waiting on a few things to get ported over, hopefully when they do, I can see about releasing some other more intensive games.

As to Checkers, seems I've not been able to get checker generation quite right. Still working on it, though.
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 08, 2013, 04:23:42 pm
(http://tifreakware.net/tifreak8x/checkers/Checkers4.gif)

So, after thinking a lot about it, I decided to start over with this. I generated a single checker in the top left, and bottom left, to get myself some values to base things on. THEN I wrote out the For( loops.

Should have done this from the beginning, was dumb to think I could simply modify code from Connect4 to immediately work in this.

But, it now drops them checkers on the board exactly where they should be. Thoughts?
Title: Re: TI-84+CSE: Checkers
Post by: Adriweb on April 08, 2013, 05:48:00 pm
(http://tifreakware.net/tifreak8x/checkers/Checkers4.gif)

So, after thinking a lot about it, I decided to start over with this. I generated a single checker in the top left, and bottom left, to get myself some values to base things on. THEN I wrote out the For( loops.

Should have done this from the beginning, was dumb to think I could simply modify code from Connect4 to immediately work in this.

But, it now drops them checkers on the board exactly where they should be. Thoughts?
Arggg my eyes !! Can you just make the red piecees another color ? It honestly really made my eyes hurt a little. I had to refocus "manually" on the center of the image to "see" the pieces correctly. maybe it's also the image that oes that and it's ok on calc ^^)
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 08, 2013, 07:37:56 pm
I think you missed the first post of this thread ;) You can change the colors of all the pieces and board squares to fit whatever you want. I didn't, mainly because I was just trying to get the blasted thing to put pieces on the board. lol
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on April 08, 2013, 08:00:47 pm
I actually like that color scheme :P
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 08, 2013, 09:33:04 pm
Lol you would :p At least people can set up their own boards and such.

I've also added the ability to change cursor colors. It displays the cursor box over the Square 2 item, so you can more easily compare how things are going to look :)

I'll post some more screenshots once I get it to where it shows up on the board and is movable.
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 09, 2013, 01:52:41 pm
(http://tifreakware.net/tifreak8x/checkers/Checkers2anim2.gif) (http://tifreakware.net/tifreak8x/checkers/Checkers2anim1.gif)

So, here I show on the left, you can change the color of the cursor. I haven't taken the time yet to fix it so the background of the cursor also updates when you update the other. I might mess with that later.

The right side shows the cursor moving around on the board. :)

What do you think?

I'm going to have to figure out how to check to see what square it is on, and make sure it only moves to the dark (square 2) squares. I haven't yet started working on those equations, so I'll get started on that shortly :)
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on April 09, 2013, 11:07:00 pm
I like it. It's cool that the game is this customizable. :) Also the cursor moves quite fast over the board.
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 10, 2013, 01:55:05 pm
Thanks! :D And yeah, it was suggested that I make it this way in case someone wanted/needed to adjust the colors because it bothers their eyes. :)
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 11, 2013, 09:32:59 am
(http://tifreakware.net/tifreak8x/checkers/Checkers5anim1.gif)

This is just something I worked up to show how you will know when a checker is selected. I haven't implemented anything beyond that point, hence why you can select multiple. I'll probably use a variable to determine what player has their turn, a variable to tell whether a checker has been selected already, and I'll use a list to hold the coordinates of the stored checker, and after the checker is moved, it will be used to remember the last move made by that player. Then I also need to make it so you can cancel the selection.

After I get that implemented, I have to make it work moving rules and such. :)

Thoughts?
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on April 11, 2013, 11:11:13 pm
Looks quite nice. My concern though is that on some backgrounds it might be hard to see. Maybe use a thicker line (assuming it fits well)?

Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 13, 2013, 01:32:01 pm
I'll see what I can do, but sadly if I make it go with a thickness of 2, it botches it pretty badly.
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 24, 2013, 09:37:47 pm
So, update.

I've managed to make this move each player's checker once. To the right if you are player 1, or to the left if you are player 2. I'm not sure why you can only move once, but at least I'm finally moving this off in the right direction, after days of no progress. :)

(http://tifreakware.net/tifreak8x/checkers/checkersmoveanim.gif)

I'm thinking it's some form of list issue, but I'm not sure. I'll do some more extensive testing tomorrow sometime.
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on April 25, 2013, 12:26:28 am
Is it supposed to erase black lines like in the screenshot? ???

Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 25, 2013, 04:35:51 am
No, I forgot to shorten the line drawing there again. I had that fixed in a previous version, but I think I overwrote the code by accident with older code. I'll have to try to remember to fix that.
Title: Re: TI-84+CSE: Checkers
Post by: Stefan Bauwens on April 25, 2013, 04:44:42 am
Hey, haven't seen this. Looks pretty good.

Also, I'm surprised you didn't get a single uprating. >_>
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 25, 2013, 09:32:58 am
Thanks Stefan :)
Title: Re: TI-84+CSE: Checkers
Post by: Sorunome on April 25, 2013, 08:40:30 pm
That does look pretty indeed, I hope you'll make the 84pcse community active for newcomers (speeking of which, i should get one, but their so expencive.....)
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 26, 2013, 04:17:08 pm
I'm definitely trying to help get people motivated on projects for it.

On an update kind of note:

With the help of Kerm, I was able to diagnose a lot of my issues with this game. I have to modify how I was doing the detections for movement and it should be right as rain.
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 26, 2013, 08:31:47 pm
So! Checkers now go all the way across the board, they don't overwrite other checkers, and you can only select the checkers that is for your turn.

Things to do now:

-Make it so only does the I switching when the cursor actually moves
-Make it so you can jump opposing checkers
-Make it so you can be crowned
-Maybe make it store as a Picvar when the board is generated as a quick way of restoring the board for a rematch?

Anything else I'm missing?

Edit:

(http://tifreakware.net/tifreak8x/checkers/checkersanimmove.gif)

http://tifreakware.net/tifreak8x/checkers/AB.zip

2nd to select, Alpha to cancel selection, MODE to exit the program.

Thoughts?
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on April 27, 2013, 02:18:58 am
Storing to picvar should be made optional. Although I encourage using pics for fast loading or data storage to get around the RAM limitations, there are certain players who are extremely uptight about program file sizes, as I saw on certain forums in the past, so maybe they won't like if a Checkers game requires an extra 21 KB of archive just for 1 pic.
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 27, 2013, 04:35:15 am
Yeah, but it'd be deleted when the game was done, along with the rest of the variables.

And in all things, you have to do what you feel is what you want, you can't please 100% of the people 100% of the time :p
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on April 27, 2013, 04:37:58 am
Yeah true. In many cases it's close to impossible to have enough features in small space anyway (especially RPGs, when you don't want to end up with 1 hour of gameplay)
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 27, 2013, 09:43:16 pm
(http://tifreakware.net/tifreak8x/checkers/checkersjumpinganim.gif)

I finally have made it so you can take eachother's checkers! :D

Thoughts? :)
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on April 28, 2013, 08:59:00 pm
Alright, I believe I've gotten all the glitches and bugs worked out. I've even gotten rid of a pesky bug where if you went to the edge of the board, and then tried to go that way again, it messed up part of the checker selection.

Now, I've implemented the remainder for the title area:

(http://tifreakware.net/tifreak8x/checkers/checkersinfoscreen.gif)

The number under Player: will change to the color of the current player's checker, along with changing from 1 to 2.

What do you think? :)

And all updates to the game have been integrated into the main game program itself. The game is now sitting at 5,202 bytes in size, without the above screenshot stuff included. And it sadly only offers single jumps. I'm not sure how to implement multi jumps, yet.
Title: Re: TI-84+CSE: Checkers
Post by: Sorunome on April 29, 2013, 06:53:49 pm
From all I have seen in this thread this is a pretty awesome game, nice job! :D
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on May 02, 2013, 01:45:48 am
Is it me or the tokens position inside squares are 1 or a few pixels off to the right? ???
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on May 02, 2013, 09:21:45 pm
I -think- they are centered. At least, to the best of my abilities.

I dropped it in MSPaint and zoomed as far as I could go with the grid on, and they are the same pixels away from the borders on all sides. :)
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on May 02, 2013, 10:56:12 pm
Ah ok. Weird then ???
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on May 03, 2013, 08:35:27 pm
(http://tifreakware.net/tifreak8x/checkers/checkersanimmove2.gif)

The only things left are crowning and making it reset for a rematch. Should I worry about #2?

Crowning shouldn't be horrifically hard, I would think. Only problem is, this game is sitting at 5356 bytes in size. No idea how large crowning will cause this to go. I really need to see if I can downsize the overall game by combining some things..
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on May 03, 2013, 11:02:53 pm
Making things small can be a bit hard in BASIC since sprites are drawn with lines/pxl-on/etc, although I don't mind if it's very large, personally.

By the way, to gain extra speed, have you considered releasing another version of this game in hybrid-BASIC using LCDTOOL asm lib? The game would take the entire screen width, but be 160x165 (stretched to 320x165) instead of 265x165. Of course, it wouldn't be pure-BASIC anymore and the display might be affected (mostly by larger text), but maybe it would take less time to load stuff if drawn vertically. It could look like this (quick mockup):

(http://img.removedfromgame.com/imgs/checkersanimmove2.gif)

The lib in question is available in the zip file of this sadistic disaster (http://www.omnimaga.org/index.php?action=downloads;sa=view;down=847) and was made by calc84maniac. Syntax is as follow:

Resolution+ScreenStartPos:Asm(prgmLCDTOOL

Resolution can be i (320x240) or 2i (160x240), the i being the imaginary i. ScreenStartPos can be any number from 0 to 319 (in your case, you would use 2i+27:Asm(prgmLCDTOOL).
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on May 04, 2013, 04:56:13 am
I can't really say I'm impressed with that, as it makes the checkers and text not look so nice :<

But I don't really know, I might look into it later, I just want to get this game out there in a fully playable format :) So close to it, too! *curses lack of time to work on things*
Title: Re: TI-84+CSE: Checkers
Post by: Hayleia on May 04, 2013, 04:59:15 am
I can't really say I'm impressed with that, as it makes the checkers and text not look so nice :<
I agree that the text is quite ugly this way, but the pieces are not looking so bad.
And the speed gain would be worth it in my opinion :)
Title: Re: TI-84+CSE: Checkers
Post by: alex99 on May 06, 2013, 01:26:19 pm
hey it´s already the best game on a ti84+cse!!!
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on September 06, 2013, 02:18:27 pm
Sorry for not posting this here sooner:

(http://tifreakware.net/tifreak8x/checkers/checkerking.gif)

I think that speaks for itself, now. :)

Managed to get pieces to be crowned and moves all directions. Now to get it to jump all directions.
Title: Re: TI-84+CSE: Checkers
Post by: Sorunome on September 06, 2013, 02:31:09 pm
sweeeeet!
Great job tifreak! :D
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on September 07, 2013, 11:59:31 am
Thanks, I hope to get it fully working soon for others to enjoy it.

Edit:

Got player 1 to have fully functional pieces, normal and crowned. Now to modify player 2 to be like player 1, and life should be good. :)
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on September 08, 2013, 09:07:06 pm
Checkers is now available for download as version 0.9!

http://www.cemetech.net/programs/index.php?mode=file&path=/84pcse/basic/games/checkers84pcse.zip

Please give it a run through and test and let me know what you think!

I'll post up the ticalc.org link once it gets accepted to ticalc :)
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on September 08, 2013, 11:27:31 pm
Good job so far. :D
Title: Re: TI-84+CSE: Checkers
Post by: tr1p1ea on September 08, 2013, 11:59:43 pm
Looking good tifreak!
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on September 09, 2013, 09:04:55 am
Thanks a bunch guys :)

If you get a chance to try it out, let me know what you think on reaction time and overall speed and such. Hopefully it's considered okay with it being BASIC and all :) lol
Title: Re: TI-84+CSE: Checkers
Post by: Streetwalrus on September 09, 2013, 12:55:07 pm
Well it does look good but I still don't have a CSE nor can emulate one. D:/me pokes asm coders to port BootFree to the CSE.
Title: Re: TI-84+CSE: Checkers
Post by: tifreak on September 09, 2013, 06:42:41 pm
We really don't want that.

TI has said that they don't hate the fact we can get ROM images from our calculators, since that means we own the calc to do so, but bootfree is something they hate very much. They are actually talking to the community again, we don't need to upset that fragile line of communication.

And thank you for the compliments :)
Title: Re: TI-84+CSE: Checkers
Post by: AssemblyBandit on September 09, 2013, 09:39:30 pm
It runs good and looks good!
Title: Re: TI-84+CSE: Checkers
Post by: DJ Omnimaga on September 10, 2013, 12:48:31 am
We really don't want that.

TI has said that they don't hate the fact we can get ROM images from our calculators, since that means we own the calc to do so, but bootfree is something they hate very much. They are actually talking to the community again, we don't need to upset that fragile line of communication.

And thank you for the compliments :)
Actually I think WabbitEmu doesn't run BootFree ROM images properly anymore anyway. I had many ROMs from years ago that used it because I didn't feel like spending 30 minutes per calc, dumping ROMs using VTI via serial link connection, then one day, the 83+/84+ ones stopped working everytime I loaded a Flash APP. Not sure about TilEm and jsTIfied.

Also Streetwalker although jsTIfied can run this game fine, it doesn't run any ASM program not made by Kerm. Everything will be distorted or misaligned.
Title: Re: TI-84+CSE: Checkers
Post by: Streetwalrus on September 10, 2013, 06:20:45 am
Anyway jsTIfied needs a ROM IIRC.