Friday, August 28, 2009

Progress


Sorry for my silence, I am piled under homework, and am falling behind every second I'm typing this, so I will make it brief.

My Tic Tac Toe program is almost done, I have the display working, and most of the methods written.

Above, you can see the display. This was created using the resetGrid(); and displayGrid(); methods.

resetGrid(); serves to both initialize the multi-dimensional array that represents the grid, and reset it.

displayGrid(); creates a child of either x or o display objects and set's their x and y to a corresponding spot on the grid.

On the bottom, you can see the Win and Lose values of each player. At the moment, they are superficial. However, functional programming for them are coming soon. That's all for this post, next time,(hopefully) this will be completed, and I may continue on to another project.

Of course, feedback is welcome!

PS. You may notice that, from the last post, I seem to be experienced in this sort of thing. I actually have just done a lot of research into game development. My actual skills do not match my geekyness.

Monday, August 24, 2009

"Tic tac toe"

Now that I have a few viewers, I have decided to begin my first post.
First, I would like to mention that school is starting soon, and I would also like to elaborate a bit on my
schedule as it applies to game development. First and foremost, pre-calculus. You might be saying: "ugh...math"
But such thoughts will slow you down more than you will know. Math is required in ALL game programming,
even the most simple pong game requires it. Second: digital graphics, for obvious reasons. While not programming
oriented necessarily, it does immerse you in digital media(Which is helpful, to say the least.) Third:
N+(or networking class) if you want to know how networks...um...work, then take this class(prerequisite: A+,
or technology repair.)

Of course, this is only my senior year. I have previously taken two computer programming courses(in java, one was
AP) A webmastery class(That is how I can do this.) and a multimedia class.(Similar to digital graphics)
Bottom line? Take as many classes in your chosen field as possible. This statement not only applies to game
development, but any career you might be interested in. And always, always, ALWAYS take a math class... it helps...
a lot... seriously. =P

And a word of advice as well: Never give up, or you already fail.

Now, to my current project(Aside from this blog.) Tic tac to.( I am such a noob, but you have to start somewhere.)
Actually, I have already completed a functional tic tac to engine, but in java. However, I have chosen to start
flash development(I have the $700+ software on my hard drive, I might as well use it) And Actionscript is different
than java, in the respect that most of the graphics programming is done for you.(syntax is slightly different
as well.)

Before I start programming, thought, I need to have a design document, one that tells me what I want in the game
and how to build it. Since the game concept is already written(You should know what Tic tac to is) I only have to
worry about smaller details, and the game schematics. A sample document would be as below:(Note that this is how
I do it, I don't know if this follows any standard that I am unaware of, working in a team would require a format
that everyone is used to reading.)

Name: tic tac to(I am starting to think that's not how to spell it, ah well)
Goal: to get my chosen peice into all 3 spaces in any row, column, or diagonal.
Details: Player clicks, peice is placed, other player clicks, other peice is placed.
Number of wins and loses are tracked and displayed.(Maybe add AI later?)

functions:
makeGrid - Creates a 3x3 multidimensional array that holds x's or o's.
playerMove - Alternates between x and o turns.
convert - Converts cartesian(x,y) coordinates into grid increments.
peicePlace - places a peice depending on coordinates and who's turn it is.
victory - Checks if one person or another wins, and adds to variables 'win' or 'lose' for that player.
interface - Displays number of wins and loses.

Programming requires planning and organization, it also requires perseverance. I will continue later,
when my project enters the development stage.