Wednesday, June 6, 2012

3D Tic Tac Toe

What started as an assignment nearly two years ago is finally taking shape today. The assignment was to create a 3D tic tac toe game in Java in the sense that it has multiple planes. Currently features a responsive gameplay for two people and an attractive interface thanks to Paint and GIMP. All graphics and code were created by myself. The code comes down to about 300 lines and makes use of loops and patterns in order to condense it so much. I deleted over 200 lines of code from previously.

Before recently, this game didn't function correctly because even though the win checking method was correct, I did not break out of the loops so the only win that would count was the very last one that it tested for. There were no attractive images and it was very slow. Everything was drawn with the standard AWT Graphics "draw" methods.

This game does NOT have an AI yet. I hope to either make this in Java 3D or make the perspective more obvious. Other features would include a win counter.
Currently the game is only a desktop application. I am considering converting it to an applet. Additionally I want to get started developing for the android platform so this may be an app someday.


No comments:

Post a Comment