karayaman / play-online-chess-with-real-chess-board Goto Github PK
View Code? Open in Web Editor NEWProgram that enables you to play online chess using real chess boards.
License: GNU General Public License v3.0
Program that enables you to play online chess using real chess boards.
License: GNU General Public License v3.0
Hi Karayaman,
Thank you for the great program. I am trying to play through this. It is good option to avoid screen and play with real chess board!
One input - I used Droidcam to use mobile camera. But one problem is that the board calibration program uses only the default camera. For now, I disabled the windows camera and the program identified the Droidcam. It would be good if you have option to set the camera for using.
Thanks,
Srivatsan
HI! Board calibration works just fine, but when it comes to starting the game the programs abruptly interrupts, and I get the same error message another user got before me, in the closed issues section (#17).
Is there a solution to this?
Many thanks in advance
Edit: apparently it is sufficient to create the file 'constant.bin' in the folder, and everything works properly
It displays the error that only one game can be played at a time. He asks me to close the other open games. But there is only one game at that time.
I'm having difficulty selecting the webcam. In the gui.py it does have a selector but is only showing 'default' and I am attempting to use a virtual cam client so I can use my phone to point to the board (droidcam on win10) but it not allowing this. If there is any input on this I would appreciate it.
Hi.
I have this problem. Can you give me a hand to solve?
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pendule' defined in URL [jar:file:/home/xxxxxxx/Descargas/webcamChess.jar!/game/chess/graphics/Pendule.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [game.chess.graphics.Pendule]: Constructor threw exception; nested exception is java.lang.NullPointerException
Thanks!
Hi, feel free to contribute voice support in your native language. It should be really easy to code and fun to see it working. You can take my commit for French voice support as reference:
Support for French voices
Can this app simply write to PGN instead of playing online?
Plz make option for 2 player Real board option without playing online. So that I can use PGN Online
Could you please add french language ?
Below the traduction needed.
Thanks.
class French: def init(self): self.game_started = "Partie démarrée" self.move_failed = "La reconnaissance a échoué. Veuillez réessayer." def name(self, piece_type): if piece_type == chess.PAWN: return "pion" elif piece_type == chess.KNIGHT: return "cavalier" elif piece_type == chess.BISHOP: return "fou" elif piece_type == chess.ROOK: return "tour" elif piece_type == chess.QUEEN: return "reine" elif piece_type == chess.KING: return "roi" def comment(self, board, move): check = "" if board.is_checkmate(): check = " échec et mat" elif board.is_check(): check = " échec" board.pop() if board.is_kingside_castling(move): board.push(move) return "petit roc" + check if board.is_queenside_castling(move): board.push(move) return "grand roc" + check piece = board.piece_at(move.from_square) from_square = chess.square_name(move.from_square) to_square = chess.square_name(move.to_square) promotion = move.promotion is_capture = board.is_capture(move) board.push(move) comment = "" comment += self.name(piece.piece_type) comment += " " + from_square comment += " prend" if is_capture else " vers" comment += " " + to_square if promotion: comment += " promu en " + self.name(promotion) comment += check return comment
it says that it failed to execute script main due to unhandled exeption do you kno how to fix that
Hello,
I've installed the code on an Raspi Zero with Bullseye and it looks good so far. I'm able to scan the board, but if I try to start the game, I got an error (see below)
Do you know, how to solve this issue?
I run python (3.9.2) with sudo in an virtual environment - all libraries are installed...
Traceback (most recent call last):
File "/home/pi/Play-online-chess-with-real-chess-board-1.15/main.py", line 10, in
from board_basics import Board_basics
File "/home/pi/Play-online-chess-with-real-chess-board-1.15/board_basics.py", line 3, in
from skimage.metrics import structural_similarity
File "/usr/local/lib/python3.9/dist-packages/skimage/init.py", line 151, in
from ._shared import geometry
File "skimage/_shared/geometry.pyx", line 1, in init skimage._shared.geometry
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 48 from C header, got 40 from PyObject
Game finished.
Sometimes the program should be a bit more talkative, assuming the player doesn't look at the screen.
downloaded the opencv module, and still recieving this error
Hello,
Is it possible to add an option for (Human vs. Human) game? I want to play on real board and after that I want to analyze the game.
please add this option then users can play chess on their chess boards like DGT e-boards!
thanks a lot for your awesome project.
Ich arbeite auf Windows 11 und das Programm findet cv2 nicht. Wo finde ich cv2?
Is it possible to extract moves made? I want to send them to robot to move chess pieces
Very cool project, congrats.
Unfortunately it currently breaks the lichess terms of service. Indeed, programmatic usage of the GUI is strictly forbideen. See https://lichess.org/page/fair-play
The great news is that we have an API to do the same thing legally! See:
Please replace the programmatic GUI mouse clicks with API calls, to avoid users of this project from being banned from lichess.
HI.
This is not an issue but i want to know.
Thanks.
Amazing project!
ps.Delete this... i read better your readme Thanks!
Would you accept a PR to implement this?
This happens once I either run main.py or start from the GUI.
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
self.run()
File "commentator.py", line 22, in run
resized_chessboard = self.game_state.get_chessboard()
File "commentator.py", line 50, in get_chessboard
img = np.array(np.array(self.sct.grab(monitor)))
File ".env/lib/python3.10/site-packages/mss/base.py", line 90, in grab
screenshot = self._grab_impl(monitor)
File ".env/lib/python3.10/site-packages/mss/linux.py", line 428, in _grab_impl
self._handles.display,
AttributeError: '_thread._local' object has no attribute 'display'
Anyone knows what this is about?
Hello, I'm on an old mac with Sierra, I've installed it once but due an accident i deleted the virtualenv.
Can you tell me wich version of python are you using anf which version of the package requirements?
Thanks in advance.
This should be made into an iOS or Android app (that uses the phone camera) without necesssitating the use of a computer. Just connect the phone and play!
Displays the message: "The Lichess API does not allow you to play this game". The game starts but does not recognize the movement of the pieces on the board.
When you change color you always need to recalibrate it. It takes too long time to do it because you need to put all your pieces of and on and lichess let you only 30 seconds to play your first moove.
Would you accept a PR implementing this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.