I searched for a chess game on ti calc, and I couldn't find it, so I decided to make my own. I so far am nowhere near finishing. All that is done drawing the board and moving the pieces, but the code doesnt check for illegal moves and it allowes anything to move anywhere, including blank spaces onto pieces, for now. Also I plan to maybe eventually make an ai, but im not sure. Anyways, here is the chess game. I will probably make a few more simple games and then go on to making an empire earth like rts game.
EDIT: I updated the chess file so that it checks whether you make a valid move. It doens't detect checkmates yet, but it doesnt let you move if you are checked. Please report any bugs you find cause there were a lot during development and I might have missed some.
Also now if you press clear(ctr+del) it clears the board.
Second Edit: sorry for uploading the screenshot instead of the actual game, I was rushing to upload it.
It looks sharp and clean for a chess game but what are the controls ?
I can't quite figure it out.
Sorry for not adding instructions. I will add a readme later. But for now, all you do is move the mouse and click on a piece, and then click where you want to move the piece to.
Do you have screenshots? I am curious about how the pieces look like. I don't have time to try it now since I am going to bed in a few minutes and I work tomorrow. I assume that the two players play on the same calc, right? Will the calc be used sideways?
Yeah sure I will update the original post right now.
Ooh I love it. The pieces are simple, but they surprisingly do the job very well. I'll have to give the game a try. An AI would be cool but quite hard, I assume. Even console Chess games often have crappy AI, so it's probably very hard to make a good one that runs at reasonable speed.
Yeah. I plan to maybe eventually make an ai based on minimax. I dont personnally know how a chess ai works specifically though, so it wont be fully optimized or as good as it could be, if I decide to make it. I am not sure right now that I will make it yet, as I plan to, as I said, make some more games and then work on a long term rts project, with some small projects in between. But even if I do I am not sure that it would run at reasonable speads, as I said, so even if I end up making one I might not post it.
Are there chess AI documented online? That said, I think a chess game is fine if it's only multiplayer. After all, it can be an handy way to play chess during lunch break at school without having to bring a big chess board and stuff. :P
I wanted to make a chess game for the prime but I have to many other unfinished projects xD looks good so far then :)
Yeah maybe I will make it. I will probably use a tutorial I found online for making a chess algorithm on gamedev. For now though I am working on remaking the game flow on android for the nspire. Once I am done with making the mechanics of it, I will post it and start polishing up this chess game and making an ai for it.
Do you mean you might do an HP Prime version?
Nah I don't have a prime so I couldn't do that. I wish I had one because it seems sooo much better than an nspire based on the descriptions, but unfortunately my teacher reccomended an nspire, so I had to get one. I meant I would make an ai, not chess for the prime, sorry :(. If there are any free emulators for the prime I may start making some things for it, but I don't know about any and I don't know any prime languages.
The HPPL is [much] better than the Nspire's Basic, but on the other hand, the Nspire has Lua.
(and, well, lots of other languages if you can Ndless it)
Quote from: semiprocoder on September 15, 2015, 12:26:23 AM
Nah I don't have a prime so I couldn't do that. I wish I had one because it seems sooo much better than an nspire based on the descriptions, but unfortunately my teacher reccomended an nspire, so I had to get one. I meant I would make an ai, not chess for the prime, sorry :(. If there are any free emulators for the prime I may start making some things for it, but I don't know about any and I don't know any prime languages.
Aah thanks for explaining. :) I can't wait to see what future projects and Chess/Learn to Fly Idle updates from you and I hope you enjoy CodeWalrus so far. :)
Yeah thanks I really like codewalr so far and I like watching all the forums. Currently I am not really active in any other threads but I still read them. Also I just posted flow for the nspire. I hope you like it. It should work on any os version with lua because it doest use images.
That is cool. Have you set up the minimul API level properly, though? Because even if you don't use images, I think programs will still warn about outdated OS if the program's minimum API level is too high for the OS.
So I decided to look at my code again just cause I was bored, and I found a glitch where if you take anything with a pawn you get to move again, and I deleted the one line of code that caused that. Now it should be free of such glitches
Awesome, I didn't realize there was this bug but I'm glad it's fixed now. Do you have plans for other Nspire/non-Nspire games? Maybe Checkers since those seems rare for calcs.
TI-Chess ( http://www.ticalc.org/archives/files/fileinfo/116/11606.html ) for the TI-89 has a CPU (which, according to the reviews, is somewhere between incredibly easy and impossible) and source code, along with puzzles and other features. Perhaps the 10th most downloaded file of ticalc.org's history might hold to the key to creating a CPU for your chess program on the TI Nspire (a calculator I do not have.)
Would it be easy to port to Lua?
I mean, it would take a while(but probably could be done) because its in c and its a really big game. I'll take a look at it though. I am a very inexperienced programmer though(not too many game/c programming courses for eight graders, although I do take c, but not graphical and I am still inexperienced) so don't promise anything at all.
TI-Chess is indeed by far the most popular TI-68k file on ticalc.org :)
IIRC, it used to rank higher, but the popularity of the TI-68k series has waned.
Using existing Lua chess engines as a starting point should be easier than using a C chess engine, though.
Also, the speed of an AI written in Lua won't be that great on the Nspire. Only native code would make the more advanced (3 and beyond) levels of the TI-Chess AI acceptably fast on the Nspire, whose raw power is quite a bit higher than that of the TI-68k series.
What about OS 3.6 Lua, though? Didn't speed improve significantly over OS 3.1, or was it only graphical-wise?
Only some graphical functions were made faster in OS 3.6, AFAICT. The Lua core hasn't changed.
Eh, image handling changed massively in 3.6, with resources instead of inline strings :)
Other changes are minor for the handheld (for the iPad, there is now a touch library): https://wiki.inspired-lua.org/Changes_in_OS_3.6
I see. That said I guess it would not hurt to try. I doubt the speed can be anywhere close to as bad as 83+ basic. :P
Someone else should probably do this(contest?) because I have never even wrote minimax(I know how it works though and I started but gave up). I would probably need more ai training before writing this.
An AI co test would be nice, but unfortunately, CW Contest #2 (which starts soon) is something different. :P