Chess Colab

C - PROJECT SHOWCASE

So, after the announcement about the C-Project Showcase was made, me and Sunny teamed up to do the project together. We had to develop a software using C programming language. The software could be anything but it should be fully functional and also should have a great UI(User Interface).

Project Selection and Preparation

The moment it was decided that we both were teams, I got fixated that we should be doing Chess, But, also I was a little doubtful whether we would be able to complete this within the given time because Chess is a complex game. In Chess, every piece has its own way of working and some special moves and conditions like Castling, Check, Checkmate and Stalemate were a little hard to program. We even thought of backing off and selecting another topic for our  project. But later, I was convinced that we would be able to complete it.

So, we decided the project that we were gonna do. Our project was to create a Chess Engine. We only were able to do two player mode. We didn't have the knowledge to create an AI(Artificial Intelligence). If that would have been done, then we would have had created a single player mode. Well, artificial intelligence was not taught to us yet in college and also, doing a two player mode of chess itself was hard. So, we left it for later if more time was available.


Initializing the project

So, I started to write some code. I think we were given like two weeks, so, we had to submit before that time. So, we had to move quicker in order to re-check, refine and add some extra features to it. I laid down some ground work and then later Sunny extended it. We were sharing this project on GitHub which was really convenient as it made collaboration very easy. We made a chess board, defined all the pieces of chess.

Compiling the project

The ground work was laid. Now, we had to think on how to start the actual and important part of the code. We then wrote a function which finds all the possible moves of a piece. Each piece had its own unique move which made the code lengthy. We used Hashing technique to maintain the possible moves of a piece on the chess board. We consider that one of the milestones of this project.

The next milestone was achieved when we wrote a perfect function for both check and checkmate. At first, we didn't know on how to start with this check and checkmate functions because we had a feeling from the start the we would get to this point and get stuck over here. We both used to discuss and pen-&-paper our code at times in college. Finally, we came up with these functions. We just had to use the ground work that was laid previously. 

I would say that breaking down the task into smaller pieces made it very easy. All we had to do was code small algorithms which when combined with all other algorithms leads to our required working of the program. What I'm saying is, all we coded was small functions/tasks which in turn after combining solved some complex tasks. 

Running the project

The submission date was getting nearer so we wrapped up all the crucial functions and started working on the UI. We already had made a basic UI, as a part of our ground work, but it was not up to the mark. We then made a decent UI and then on the day of submission, we submit our project. 

Although, we submitted it, we were not so satisfied with the UI after reviewing some of our friends projects. We asked our instructor for a chance to submit again for which they accepted. Then we improved the UI a lot. We have added boot animations and loading animation. We have added sounds. We have customized the main menu, it looks a lot cleaner and better now.

Even, after submission we are planning on adding some more features to this (like UNDO, TIMER, etc).

References

You can download this application here.

Gallery

Boot Animation

Playing Game - (shows main menu, loading screen also)

Exit animation






About Us

Me and Sunny are currently pursuing our B Tech in St. Martin's Engineering College.

- BY SREEKARA MOULI. T

Comments

Post a Comment