Inspiration

I love to play chess and the idea immediately came when I saw the sliding puzzle theme.

What it does

Basically it's a chess game with a small twist: instead of moving a piece, you can also slide tile(s). This opens up a lot of interesting opportunities for attacks, e.g. sliding a bishop into a different square (dark square bishop <-> light square bishop), sliding a pawn horizontally, connecting tiles (which was disconnected by the hole) to discover attacks, etc.

There are 12 boards: 1-4 are 3x3, 5-7 are 4x4, and 8-12 are 5x5. You can also switch boards by clicking the arrow on the board name.

How we built it

Since I have only discovered the challenge quite late (March 12th), I basically forked the sample codebase and extended it with a basic chess engine implementation.

Challenges we ran into

It's actually quite tricky to impl. a chess engine from scratch (e.g. all the piece movements, chess engine strategy, the special "slide" movement)... Due to the limited time constraint I couldn't really study how chess engine works so I implemented a very basic one based on intuition.

I actually ran into a performance issue on larger chess boards using naive implementation which I had to optimize.

Accomplishments that we're proud of

The experiment turned out to be quite playable. Some of the puzzles actually took me quite some time to figure out :P I also implemented a local PvP mode so I could play with friends "over the board" on the same phone.

What we learned

I learnt quite a few things by extending the sample codebase (e.g. try out flutter_bloc as I was more a provider/riverpod person :P, found many useful patterns that I never used before).

What's next for Sliding chess

I want to implement an online mode where people can play against each other via invite code/randomly.

Also an improvement would be to implement a proper chess engine (e.g. integrate/extend stockfish).

Built With

+ 7 more
Share this project:

Updates