Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
Because of the advent of C, the CE is open to a lot more possibilities. I went ahead and grabbed a nice looking checkers engine and coded the interface and GUI around it, including user movement and such. Now you can play checkers against a pretty difficult AI Smile Or even make the calculator play against itself, which is enjoyable to watch I guess. Anywho, here's some screenshots and hopefully the download will be up shortly. It also auto-saves all the positioning and board information, so reloading your games is a breeze. Hopefully the source is inspirational to someone Razz All told, this took about a day to make, so in all seriousness, I <3 C.




Download: CheckersCE
Looks great! If the AI is playing against itself, is there a way to break out of it? I remember having a chess program on my TI-86, and the AI got into a stalemate when playing against itself, so I had to reset the calc.
Wow, Mateo. You continue to wow us with your amazing contributions and commitment to +CE development. Thanks for all you have done Very Happy
Quote:
Hopefully the source is inspirational to someone

Very inspirational.
Ivoah wrote:
Looks great! If the AI is playing against itself, is there a way to break out of it? I remember having a chess program on my TI-86, and the AI got into a stalemate when playing against itself, so I had to reset the calc.

Yeah; there is. I'll probably move to interrupt driven input to make certain, but right now it should work just fine. Smile

Thanks all! The link has been updated with the download things.
Looks like the circle routine could use some accuracy improvements.

Top-left: current. Bottom-right: ideal.
Optimized some routines and make best move calculation a lot faster for even quicker playing Smile Hopefully should be updated soon.
How does it auto save?
And can u make more games like this? That would be great Very Happy Very Happy
Please don't post on the same thread within 24 hours of your last post unless somebody else posted. This is called double posting and is frowned upon here. Edit your post instead.
ok
I almost can't believe that this could be programmed so fast. Although I don't know ez80, this seems like a weeks-long project in assembly; the fact that an already-existing engine exists that can be ported and optimized within a day or two—not to mention the entire interface—proves how much of an advantage C is. (Probably also Mateo's skill)
lirtosiast wrote:
I almost can't believe that this could be programmed so fast. Although I don't know ez80, this seems like a weeks-long project in assembly; the fact that an already-existing engine exists that can be ported and optimized within a day or two—not to mention the entire interface—proves how much of an advantage C is. (Probably also Mateo's skill)

Well, for reals. There's already hundreds of thousands of programs out there written in C, and many more in similar language variants such as Java and others. It's pretty easy to take any general algorithm and compile it, and it outperforms even assembly sometime with the fancy things it can do. (Although size is generally a bit bigger for sure). Regardless, it would be nice to see some C programs out there, but I sense that people want to stick with the languages that they are most familiar with, such as hybrid basic and such. That's fine I guess; we are all in different stages of learning Smile C is literally a lot easier to understand and write than BASIC even, in my opinion. Like, you aren't limited to the amount of BASIC variables on calc, you can directly access hardware ports, read/write memory directly, and so, so much more. It's just the best. Razz

Like, a hello world example:

Basic:

Code:
Disp "Hello World!"


C:

Code:
os_PutStrLine("Hello World!");


Do exactly the same thing. It's just a mater of learning, which is really simple with practice.
If you can jump the opponent somewhere, then it makes you do the jump. Could you make it so it doesn't do that, or an option that turns that off? Other than that, I think CheckersCE is great! Its awesome that we can program in C now! Smile
calcnerd_CEP_D wrote:
If you can jump the opponent somewhere, then it makes you do the jump. Could you make it so it doesn't do that, or an option that turns that off? Other than that, I think CheckersCE is great! Its awesome that we can program in C now! Smile

Your request has been added to the setup screen on the pending release Smile C is indeed very nice and versatile. When it is approved, it should appear here:

https://www.cemetech.net/programs/index.php?mode=file&path=/84pce/asm/games/CheckersCE.zip

Anywho, I also updated the source to use the new and improved graphics library, along with compression of the logo sprite, which saved around 3kb. Very Happy
Hey Mateo I'm new but I noticed your AI tends to get stuck when playing itself after 50 or so moves. It just moves the checkers back and forth. Aside from that it's awesome dude, thanks Smile
Henryd wrote:
Hey Mateo I'm new but I noticed your AI tends to get stuck when playing itself after 50 or so moves. It just moves the checkers back and forth. Aside from that it's awesome dude, thanks Smile

Yeah, there's really no good way to bother fixing it, since it is simply choosing the best move. And apparently the best move is to never lose Razz
  
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
Page 1 of 1
» All times are GMT - 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