Inspiration

It is our first hackathon so we wanted to create a project that was reasonably complex but had a clear definition and outcome. We were all avid enjoyers of chess, and it seemed like an excellent challenge that we could tackle in 2 days. There were already online implementations of chess that used complex graphical algorithms, but we had wanted to make a version that was more beginner-friendly and potentially convert it into Luau if we had time.

What it does

It allows the users to play a game of chess in the terminal by running a python script. Fully functional chess game with takedown capabilities and pawn promotion. Working check and checkmate conditions for the king (using implicit simulation of pieces). Movements are made using chess board notation and converted to 2D array traversal implicitly. Only missing castling and En passant.

How we built it

We are all familiar with using python from taking CMPUT 174 and 175 at the University of Alberta, so we decided to use python to create our game engine. We used Github to asynchronously collaborate and add pieces of the program in order to merge into the final product. Thomas created the move conversions, developed pieces, and pawn promotion, Jacky worked on the end conditions and generating simulations, and Arthur developed the pieces and also worked on the end conditions.

Challenges we ran into

The biggest challenges were creating the logic for check, checkmate and other unique moves in chess such as castling and en passant. We had also faced and overcame a rare bug that only occured to pieces that were captured and had another alive piece on the same square on the board.

Accomplishments that we're proud of

We are proud of creating a working game of chess from scratch, albeit missing some features. For the simulations for checks and checkmates, we had originally used a beaming method where we search the diagonals, straights, and slants(knight attack spots). This was thought to be more optimal than simulating movements for every friendly piece to check for whether the king could be unchecked. However, the program to run simulations proved to be less tedious than checking beams and did not have a significant difference in output time.

What we learned

We learned what it is like to work on a project as a group, and how to stay up to date with each other's versions through Git and GitHub. If we had more time, we would of tried to learn Luau and implement our python code into the Roblox game engine.

What's next for Chess

Finish implementing castling, en passant, and creating a GUI. We may also convert the python code into a version of Luau that could be implemented into Roblox Studio. The original goal of this project was to implement a working game of chess on the Roblox platform, which uses the Luau programming language.

Built With

Share this project:

Updates