Join us on Discord!
You can help CodeWalrus stay online by donating here.

Lua Chess for the Ti Nspire

Started by semiprocoder, September 10, 2015, 04:10:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

semiprocoder

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.
  • Calculators owned: ti nspire, ti 84 plus se
My cemetech username is awesommee333.

gameblabla

It looks sharp and clean for a chess game but what are the controls ?
I can't quite figure it out.
  • Calculators owned: None (used to own an Nspire and TI-89)

semiprocoder

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.
  • Calculators owned: ti nspire, ti 84 plus se
My cemetech username is awesommee333.

Dream of Omnimaga

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?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

semiprocoder

Yeah sure I will update the original post right now.
  • Calculators owned: ti nspire, ti 84 plus se
My cemetech username is awesommee333.

Dream of Omnimaga

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.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

semiprocoder

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.
  • Calculators owned: ti nspire, ti 84 plus se
My cemetech username is awesommee333.

Dream of Omnimaga

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
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

I wanted to make a chess game for the prime but I have to many other unfinished projects xD looks good so far then :)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

semiprocoder

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.
  • Calculators owned: ti nspire, ti 84 plus se
My cemetech username is awesommee333.

Dream of Omnimaga

Do you mean you might do an HP Prime version?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

semiprocoder

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.
  • Calculators owned: ti nspire, ti 84 plus se
My cemetech username is awesommee333.

Adriweb

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)
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

Dream of Omnimaga

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. :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

semiprocoder

#14
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.
  • Calculators owned: ti nspire, ti 84 plus se
My cemetech username is awesommee333.

Powered by EzPortal