180 Days, 180 Games

  • Jeff Couch -- 27 April 2017
    So, I have been reading Masters of Doom again and it is really reminding me of all of the reasons why I decided to go to school for Computer Programming at Westwood College of Technology and (more recently) to complete my Bachelor's in Computer Science from CSUSM. Reading about the early careers of Carmack and Romero has certainly provided me with a boost of motivation and inspiration in the midst of my otherwise disappointing career situation. Then, I read another motivating post--incorrectly attributed to John Carmack and it really got me thinking. Here is the post:

    The ceramics teacher announced on opening day that he was dividing the class into two groups. All those on the left side of the studio, he said, would be graded solely on the quantity of work they produced, all those on the right solely on its quality. His procedure was simple: on the final day of class he would bring in his bathroom scales and weigh the work of the "quantity" group: fifty pound of pots rated an "A", forty pounds a "B", and so on. Those being graded on "quality", however, needed to produce only one pot - albeit a perfect one - to get an "A".

    Well, came grading time and a curious fact emerged: the works of highest quality were all produced by the group being graded for quantity. It seems that while the "quantity" group was busily churning out piles of work - and learning from their mistakes - the "quality" group had sat theorizing about perfection, and in the end had little more to show for their efforts than grandiose theories and a pile of dead clay.

    To me, this story fairly sums up my past four years at university--spending a lot of time learning theory and not much developing practical skills. As such, I have begun my own practical application challenge to build my skills and better prepare myself for a position in the games industry. The challenge is inspired by this 180 websites in 180 days project which was documented by Jennifer DeWalt in her blog. Essentially, the idea is that she learned web development by creating one website a day for 180 days. At the moment, it is my intention to emulate her spectacular feat, creating games instead of websites. It is my hope that I can keep up the pace and motivation to complete this challenge at the same time as keeping up with our 5 month-old baby and searching for a full-time job!

    If you are interested, you can check out my repository on GitHub. I intend to write a breakdown of each of the programs and discuss the challenges and breakthroughs I experienced in developing each. Also, I ask that you bear in mind that I am creating these programs on a fairly constrained time table--as such, there will probably not be as many comments as there should be and the code may be a bit ugly in places. I am hoping though, that as I near the end of the 180 days, I will improve in both of these areas.

Day 001, Game 001 -- Tic Tac Toe

  • Jeff Couch -- 24 April 2017
    There is nothing too special about this program. I implemented it as a single file with no classes and only a single user-defined struct for each space on the board. The board spaces are numbered 1 through 9 and the players take turns selecting one space at a time. Once a space has been chosen, the marker member of the struct representing that space is populated with a char representing the choosing player's symbol (either X or O) and the bool occupied member is set to true.

    I used a brute force algorithm to check if a win condition has been reached by either player or if the board is full and neither player has won the game. This seemed to be a reasonable approach as the size of the board and the rules of the game never change. All in all, this was a great introductory project for my 180 days challenge!