Wednesday, April 28, 2010

Sunday, April 25, 2010

Status Report 9

ALL STAGES ARE CURRENTLY FUNCTIONAL WITH THE PSUEDOSERVER!!!!!!!!

Well, that's a relief. Also resolved is one issue in which two DNA bases would sometimes snap to their final positions at once--this occured when two bases whose final positions were adjacent appeared one after the other. To fix this, I moved the bases further apart vertically and changed the hit area so that only the nucleotide itself (not the sugar/phosphate backbone) counts as a "hit." Unfortunately this adds the problem of me not being tall enough to reach the top bases, but assuming we can run this thing from a ceiling-mounted projector that shouldn't be a problem in the long run.

Next week: camera debugging. I do hope we have tall enough chairs.

Sunday, April 18, 2010

Status Report 8

I got the reference shot method to work. Turns out the problem was that Flash takes a few seconds to send the data to the camera, so the new frame doesn't actually appear on the screen until after the refShot() method is called. If I set a slight delay between calling the method and actually taking the shot, it works. I'll be experimenting in my spare time to figure out exactly how long it usually takes and how long I should set the delay for.

In other news, everything up to and including metaphase works fine with the psuedoserver, so I'm very happy about that. Another problem that has cropped up lately is that if I enlarge the window to run it on the projector, the positions of certain objects get really messed-up. I think I can get around this by hardcoding the coordinates, but there's probably a better option I haven't thought of yet.

Monday, April 12, 2010

Status Report 7.1 - Eureka!

I have found a solution to one of my reference shot problems. The problem was that Flash's XMLServer, when its send() method is called, adds a zero bit to the end of whatever was sent, which was messing up the String.equals() method in Java. Short of rewriting Flash's XMLServer code, I discovered that if I use the String.startsWith() method instead of the equals() method, it works fine. Success!

The new problem is that since the server is not lightning-fast, the reference shot that gets sent is a shot of the screen a few seconds before the method call. This is problematic since the only time the method gets called is during a frame change. I guess I could program the Flash side to wait a few seconds before asking for a reference shot, but I'm going to speak to Audrey in a few minutes to see what she thinks.

Sunday, April 11, 2010

Status Report 7

Still on track, as the G1, S and G2 phases are now done. I am very happy about this. What I am not so happy about is my inability to write a function that triggers the server to take a new reference shot upon a method call to the CVManager. Basically what's happening is that the psuedoserver gets the message and responds (by printing out a specific string), but the general server acts like it hasn't gotten the message. I do not know why this is, but I will continue to plug away at it as I proceed with the rest of my project.

Monday, April 5, 2010

Status Report 5/6

So apparently Status Report 5 didn't actually go through when I hit publish. Oops. In lieu of typing everything again I'll just summarize what Status Report 5 actually said: all the graphics are done and I'm starting on coding now. Yay!

Now for Status Report 6: The G1, S and G2 phases are now totally functional. In addition, I have coded a custom event handler (I'm very proud of myself) to get the game to progress on its own. Unfortunately this also means I can't run it on the projector until I have a convenient way of taking new reference shots. For right now I'm just elated that it works at all.