Minecraft Chess
nitrogenfingers 14 Apr 2012
I've been working on expanded networks and operating systems on and off for about a month now. The forums here seem ablaze with similar activity and debugging it is a very painful process so I've taken a free day to do something a bit different.
As of this point, Chess is by in large complete, with a few caveats and not a lot of testing. Please report any bugs in this thread, or by personal message.
- A nice UI
- Command parsing to move pieces- uses standard long notation without a piece identifier (e.g. e2-e4, g2xh5, with "quit" and "exit" to quit)
- A list of each move made
- Logic constricting piece movement to standard chess rules
- Local multiplayer (on the same machine)
1100 15/4/2012
- Restrictions on piece movements- all pieces now can only move or take according to standard chess rules
- Support for en passant and castling
- Support for pawn promotion
1400 16/4/2012
- Check acknowledgement
2200 16/4/2012
- A GUI for accessing local and network play, and displaying instruction
0300 19/4/2012
- Monitor support for observation of the board
- Network multiplayer using p2p
- Hook-in for the monitor interface with the rest of the game (6x6 bigscreen)
0000 21/11/2012
- Colour support for the client
Planned updates
- Identifying checkmates and stalemates
I've got an upload of the code on mediafire here:
CLIENT: http://www.mediafire...vy76al1qfttfn3d
MONITOR: http://www.mediafire...s8d4tvxsh780qeu
This might be fun if you want a break from zombie slaying and creeper repairs, and would like a nice gentleman's game to play.
As of this point, Chess is by in large complete, with a few caveats and not a lot of testing. Please report any bugs in this thread, or by personal message.
- A nice UI
- Command parsing to move pieces- uses standard long notation without a piece identifier (e.g. e2-e4, g2xh5, with "quit" and "exit" to quit)
- A list of each move made
- Logic constricting piece movement to standard chess rules
- Local multiplayer (on the same machine)
1100 15/4/2012
- Restrictions on piece movements- all pieces now can only move or take according to standard chess rules
- Support for en passant and castling
- Support for pawn promotion
1400 16/4/2012
- Check acknowledgement
2200 16/4/2012
- A GUI for accessing local and network play, and displaying instruction
0300 19/4/2012
- Monitor support for observation of the board
- Network multiplayer using p2p
- Hook-in for the monitor interface with the rest of the game (6x6 bigscreen)
0000 21/11/2012
- Colour support for the client
Planned updates
- Identifying checkmates and stalemates
I've got an upload of the code on mediafire here:
CLIENT: http://www.mediafire...vy76al1qfttfn3d
MONITOR: http://www.mediafire...s8d4tvxsh780qeu
This might be fun if you want a break from zombie slaying and creeper repairs, and would like a nice gentleman's game to play.
kamnxt 14 Apr 2012
Maybe you could make multiplayer client-server-client, so you could connect a monitor to the server?
nitrogenfingers 14 Apr 2012
kamnxt, on 14 April 2012 - 10:05 AM, said:
Maybe you could make multiplayer client-server-client, so you could connect a monitor to the server?
That may be the best way. I wanted to avoid a server situation because that sort of makes updates a complicated process and I'm absolutely sick of message parsing- was planning a simple peer-to-peer host join system that would just fire off moves as a message, and each computer keeps a local copy of the data rather than having a central repository that has to be queried. It's a messy solution but it's far easier to code...
But you may be right. I'll ponder on it, but focussing on local multiplayer for the moment.
nitrogenfingers 14 Apr 2012
Thanks for the heads up. I'm not sure why, mediafire mesbehaving. Once I've got... well some of the rules of Chess working correctly I'll try reuploading it and providing a fresh link.
Turtle 14 Apr 2012
Congratz, you just put up a middle-finger to the whole CC-Chess team.
(Incase you don't get it, its not ment seriusly, it's just that you sort of annoyed us by making a working chess code)
Cool code dude, as CC-Chess is broken atm (1 damn error i can't fix, and seemingly , no-one wants to fix), you currently own the only working code for chess in CC
(Incase you don't get it, its not ment seriusly, it's just that you sort of annoyed us by making a working chess code)
Cool code dude, as CC-Chess is broken atm (1 damn error i can't fix, and seemingly , no-one wants to fix), you currently own the only working code for chess in CC
Wolvan 14 Apr 2012
I maybe could help with the rednet play
You can do it like this: You can send the commands (eg. e2-e3) via rednet and the local computer can run it. I could help..Maybe />
You can do it like this: You can send the commands (eg. e2-e3) via rednet and the local computer can run it. I could help..Maybe />
Ludburghmdm 14 Apr 2012
Try using Dropbox or you can try to install MediaFire Express to upload
nitrogenfingers 15 Apr 2012
Dino2306, on 14 April 2012 - 08:10 PM, said:
Congratz, you just put up a middle-finger to the whole CC-Chess team.
Dino2306, I'm really sorry mate I had NO idea there was another team working on computercraft chess!
If it makes you feel any better all I've managed to get so far is some of the rules working (as of right now pieces move on constraints). It's not been an easy job, really it was something a friend suggested on a whim and it sounded like fun. It sort of has been....
I actually haven't posted any of my network code for exactly that reason (among others), I really don't want to tread on anyone's toes.
Wolvan, on 14 April 2012 - 09:40 PM, said:
I maybe could help with the rednet play
You can do it like this: You can send the commands (eg. e2-e3) via rednet and the local computer can run it. I could help..Maybe />
You can do it like this: You can send the commands (eg. e2-e3) via rednet and the local computer can run it. I could help..Maybe />
Leo Verto, on 15 April 2012 - 12:24 AM, said:
This is awesome! Did you implement winning yet?
I've added a new update with hopefully a working mediafire link that displays movement rules being enforced by the underlying engine. Checking, checkmating and castling are all that's missing right now. Cool to see a few people interested, genuinely expected little-no interest on this one.
Turtle 15 Apr 2012
@Nitrogen, it's not really an issue, the code is broken pretty badly, mainly some gui issues (printing random stuff instead of what is supposed to be printed)
But we DO have got the whole system, board, pieces etc running, im currently fixing the connection via rednet, />
if you want to look at the code, https://docs.google....TIBAFm7crE/edit
Just please do not copy-paste code, you are however allowed to use idea's from this code, as we're trying to reach a common goal.
But we DO have got the whole system, board, pieces etc running, im currently fixing the connection via rednet, />
if you want to look at the code, https://docs.google....TIBAFm7crE/edit
Just please do not copy-paste code, you are however allowed to use idea's from this code, as we're trying to reach a common goal.
Turtle 15 Apr 2012
Cloudy, on 14 April 2012 - 08:55 PM, said:
Why would you be annoyed? Surely a little competition is good?
It's annoying to work for over a month, and still having the code broken, to then see someone doing it perfectly, it makes you feel stupit, but as I tried to say, its annoying, but not really an issue.
nitrogenfingers 15 Apr 2012
Dino2306, on 15 April 2012 - 08:02 AM, said:
@Nitrogen, it's not really an issue, the code is broken pretty badly, mainly some gui issues (printing random stuff instead of what is supposed to be printed)
I've had a flip over it, myself and your team went about this in wildly different ways! Where you seem to have gone for a piece-centric model I've gone for a board-centric one. I went for that because it meant a bit less looping. Are you using classes? I didn't even know lua had them, this almost looks like C++ code. Something I didn't know..
No idea what's causing the bugs you mentioned but even then I'm so embarrassed I wouldn't dare give you advice at this point!
Oh out curiosity (mingled with self-interest) have you managed to get checkmates working? I can't see any computationally efficient way to do it....
nitrogenfingers 16 Apr 2012
I've just added support for checking (and just need to update this code to be reflected in castling as well), but it seems to be going well. The Checkmate and Stalemate algorithms I've decided to combine- rather than the insane idea I previously had of searching for king movement, blocking paths and taking other pieces, I'm going to use the stalemate rule: If there are no legal moves for any pieces then if the king is in check it's checkmate, otherwise its stalemate. It's far less computationally efficient I know, but I need to do it for stalemate anyway so may as well kill 2 birds with one stone.
While I've been unit testing this program right through development, which has been surprisingly easy thanks to the nice compartmentalization of the game logic (piece logic rarely interferes with one another), I haven't done much large-scale testing simply out of lack of time. If you like the look of the program so far please give it a try and if you'd be so good please report any/all errors you come across. The GUI and parser are both pretty rock solid at this point, so I'm mainly interested in the game logic- the game reporting checks where they're not happening, disallowing illegal moves, allowing illegal ones and so on.
While I've been unit testing this program right through development, which has been surprisingly easy thanks to the nice compartmentalization of the game logic (piece logic rarely interferes with one another), I haven't done much large-scale testing simply out of lack of time. If you like the look of the program so far please give it a try and if you'd be so good please report any/all errors you come across. The GUI and parser are both pretty rock solid at this point, so I'm mainly interested in the game logic- the game reporting checks where they're not happening, disallowing illegal moves, allowing illegal ones and so on.
nitrogenfingers 16 Apr 2012
I have no idea what's going on- when I copy the link and paste it in the URL window it seems to run fine, it's only the embedded link that's having problems. Try doing the same:
http://www.mediafire...n4y9vy72woqmbqs
http://www.mediafire...n4y9vy72woqmbqs