Monday, September 28, 2009

Baby steps.

After fleshing out the details of my robot game, I have come to realize that this is a rather ambitious project for a noob, so I am taking baby steps. First I will reformat the Tic Tac Toe engine in order to make it more universal, then I will make several projects just to gain practice. After which I will begin making my robot game.

I think I am talking to myself now, so I will withdraw posting here until I can get more followers.

Saturday, September 19, 2009

Robots

We r gunna makin' robots that are gunna blow up stuff*makes sure Robotics teacher isn't looking*. Not really, sort of. I'M making a robot that's going to blow stuff up(Maybe), my robotics CLASS is making a robot for a contest. Guess who is one of the programmers.

Let's talk about the latter, first. Our class is participating in a robotics contest held by an organization named "BEST", ours is the Dallas branch. More information at Dallas-best.org. I am going to be learning C programming in order to do this. I already know basic c++ so the conversion shouldn't be too hard.


Now for the former, I just thought of a vague idea for a game, about robots( =]) I don't know much about it(I just know it will be about robots), but it will implement my tic tac toe engine(It will NOT be a tic tac toe clone with robots. XD)


That is all, for now.

Friday, September 11, 2009

Finished


Even though I may be talking to myself, I think I will post this anyways.

I have finally finished the tic tac toe engine.(psst, those aren't real scores.) and have learned quite a few things:(Thanks in no small part to the denizens of gamedev.net forums. Topic:
here )

-To completely clear an array, simply add the line: arrayName = new Array();
-You may clear display objects from the stage by putting their references in an array, and using similar syntax to this:

for(stuff){
removeChildAt(arrayName[stuff]);
}

Now I am asking myself: "Now what?" Perhaps I will be expanding upon this engine, adapting it for certain needs. Maybe do a little Project Euler in C++. For now, though, I am beaming out. Good bye.

Wednesday, September 2, 2009

Algorithms.....rithms...rithms...rithms....FAIL!!!


Well, my Tic tac toe game is nearly finished... Just one thing stands in my way...

Correction... two things. o.O


While picking up a screenshot to add to this post, I noticed that I deleted my entire visual display. The game itself still works, but I have to re-make the score board from scratch. >.< As you can see, the code that references those text boxes has been commented off.This is actually NOT a bit of drama that I have added to make my blog more interesting...Really...

Other than that, I simply have to write the code that checks if a win condition is present. This requires checking the grid. I have several solutions in mind, but I must stress that one of the things that can make or break a game is efficient code. This is why it is difficult to find the proper solution.
Anyways, I am pressed for time, so I will cut this short. Good bye.

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.