Monday, June 20, 2005

broken code

It's the day of submission and it seems that the only version of my code that I have on hand is that which I tried to loop 4 times to assign a direction to all 4 ghosts. This broke the code completely. I'll find a working version or fix what I have and submit it to the following address:

http://www.glan.ca/~mitch/working/ai.java
http://www.glan.ca/~mitch/working/levelOne.java

I should have it up tonight, tomorrow at the latest.

EDIT: According to my computer, as of Monday, June 20, 2005, 8:10 PM, both files are up.

Sunday, June 19, 2005

Tired and underpaid.

So it's late, and 3/4 of the group are at Mitch's house. We are nearing completion of the game, but still have work to do, so we decided to meet at Mitch's house and work on it together. Sitting near me (Jared) are Mitch and Nate. Ben is to be getting here in about 8.5 hours. ((Oh, Ben just called and apparently he will actually be here in about half an hour)).

I have made a list of what we still must complete, and the list is somewhat long-ish. It's not overly long, however, and although a number of the tasks are somewhat time-consuming, none of them are really all that difficult. So after that list, I feel somewhat reassured. Crunch-time is slightly less crunchy. Like an Oreo in milk.

Also, the computer I am using is HORRIBLE. Yes, it is even worse than my own. The video card can reach nothing better than 640x480 resolution, and the colour quality can not best 16 bit. The mouse is completely screwed, and if I move it, it goes wonky all over the screen and starts selecting things. So I use the keyboard. In JCreator, I cannot actually type, so I must type things into Notepad and then copy them. The ONLY reason I am willing to use this machine is because I need to code and it is the only thing available. :/

Anyway, we stil have work to do. But we are nearing our goal, and taking a break. We are all very tired at this point in time, and decided that we can get no productive work done and will therefore rest for some time, then get back to work when our minds are refreshed. And thus shall end.

*falls asleep*
~Genome

Wednesday, June 15, 2005

Aaaaaaand I'm spent.

Yup, I'm done. That's it. Nothing left to do. Fully functional code on my end, in every respect.


Well, that might be a slight exaggeration, but pretty close. I've got a little bit more commenting to do, but random for ghost 0 works now. I've broken up most of the code into methods, too, so it's ultra clean, made more so by my re-organization of the variables. Other than that, I just need the class names.... and classes themselves that the x and y co-ords for the ghosts and pak_man are going to be pulled from so I can add that ability to my code (hardcoded for testing purposes at the moment).

So lets review, my code can:

  • determine the shortest straight line distance to pak_man if it were to move in any given direction
  • Do the opposite when pak_man is chasing the ghosts
  • If it's for ghost 0, it goes in a random direction
And it does all that regardless of the following pitfalls:
  • More than one direction holds the same distance
  • All distances are different
  • the ghost is one tile away from pak_man
The only possible other feature I could add would be the ability for the smartest ghost to look more than just one tile ahead. That, however, is not the most pressing issue when we don't even know how to get an image to move across the screen when the user presses an arrow key. In light of this, I feel the best course is to put it to a group vote tomorrow in class; whether I add the aforementioned feature, or help with the swing coding. If it's decided that I'm to work on swing, I'll spend 20-30 minutes commenting, and then my code is as good as ready to be submitted for marking.

Wednesday, June 08, 2005

I are teh l33t.

Data transmission works. Checked over two computers, tomorrow I shall try three in the beginning of the class.

w00t.

Tuesday, June 07, 2005

Success! And problematic findings. :(

Socketman here. With my Thread of Truth I shall conquer evil. (I really hope that somebody realizes that blatant Wonder Woman reference.)

Anyway, here's the update in the world of networking: As I said earlier, I believe, I have read and understood everything concerning multi-threaded "servering" and all was well. Now, I have completed the Server program (rather, the classes that will receive and interpret information from networked computers) and it works like unambiguity incarnate. Unfortunately, I had to include Swing to make it work. So in lieu of this, after testing is complete, I will simply include the component that requires Swing in Nate's section, as it is essentially just the part that calls my sockets and threads into existence. So it is easily transferable.

Tonight I plan on working steadily on the Client program (or, the classes that are intended to send information over the network to Server applications on receiving terminals) and hopefully I shall complete it tonight. After that, all that I must do is clean it up, determine which pieces of data must be sent through the network, and then finally determine how to specifically connect the computers.

The problem inherent in connecting the computers is a simple one, but with a seemingly difficult solution. Originally, my main problem was how to connect -all- the computers in every way. For instance, each computer must be connected to every other computer in order to transmit its data. I almost decided to have the information travel in a ring-like sequence, with each system connecting to only one, which in turn connected to another, etc. This would allow all information to be shoved around. However, it is terribly inefficient as the first computer's variables will take longer than necessary to get to the last computer. So I have now decided to have 4 Clients per terminal connecting to the Server running on each other computer. This is a much easier and quicker approach to my original problem.

However! My new issue arises out of this decision. For the way that sockets interact is using the Computer Name defined in network properties. Therefore, either the Client that is currently being run must KNOW the Computer Name of the Server it's connecting to, or the end-user must so that they can type it in. If need be, I can simply do that, and have a function to read the name so that each user can read it to the others to type in, but that is both horribly inefficient and somewhat dangerous if this game is ever to be introduced to those who are not so adept in the workings of computers. For this reason I must exert much contemplation on how to do this... Although I don't know of any other way.

We shall see what will come of this. I will speak with the others about it. Farewell for now.

*a string of a sticky web-like substance shoots down and pulls him away*
~Genome

Monday, June 06, 2005

*cough* *cough*

Jared posting here.

It seems to be working. Don't know what's wrong.
I may or may not look into this later.
Probably not.

It may have been some sort of jump/glytch/whatever in the server for a moment. Hopefully it doesn't happen again, eh?

Sunday, June 05, 2005

The Many Faces of Pak_man

On friday I completed the 16 models of pak_man sized, colourized and ready for use. I have the normal pak_man's 8 different models; up, down, left and right for open and closed mouth positions. Also we decided to make, instead of the ghosts changing, pak_man changes when he eats the pill. So all 8 models for the "on the pill pak_man" are done as well. So the next task which I attempted on friday is to find a high-res format and low size (which shouldn't be a problem on a 22x22 object) to export it as. I have yet to find a file type that keeps the resolution but my quest continues.
~fruitsnacks