Skip to content

Tic Tac Toe game with GUI. PvP as well as PvC with rudimentary AI. Written in C using GTK lib 3.0 and Glade.

License

Notifications You must be signed in to change notification settings

GokulVSD/tiCtactoe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tiCtactoe

Written during my undergraduate course at PES University, Bangalore South Campus.

The game was written for a presentation during my first year.

Started: March 24th, 2017

Finished: April 9th, 2017 (Took a a break for internal exams/assignments)

This was my first foray into GTK and creating an application in C. I learnt GTK from the ground up, and I’d received rudimentary knowledge in C from my 1st Semester. Due to the lack of documentation for the GTK library (in C, the Python library has pretty good documentation), finishing the game took way longer than I anticipated. Most of my time was spent trying to cross compile the game on windows. For future reference, I would not recommend creating a user interface in C, let alone GTK. There are better ways to go about it. I encountered uncountable problems that required me to rewrite the vast majority of code due to mismatchs in library versions. I don't even think they update the libraries for GTK on windows anymore. For anyone looking to fork the code over, there's an issue with PvC (initialising of buttons) as well as the restart functionality. It was working, but it broke after I redesigned the user interface. Fixing it shouldn't be too much effort.

Screenshots:

Command for compiling using GCC (GTK+ 3.0 Libraries must be installed first):

gcc -o tiCtactoe main.c -Wall `pkg-config --cflags --libs gtk+-3.0` -export-dynamic

Command on windows with MSYS (Keep all required DLL's in the folder with the executable):

gcc main.c -o tiCtactoe.exe `pkg-config --cflags --libs gtk+-3.0` -Wl,--export-all-symbols -mwindows

Warning! You need to quit the game only using the quit button on windows, if not, a ghost process is left behind. (This is because of the version mismatch of GTK on Windows and Linux)

About

Tic Tac Toe game with GUI. PvP as well as PvC with rudimentary AI. Written in C using GTK lib 3.0 and Glade.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages