0303
We had a Lightdraw presentation to SIGGRAPH Asia 2008 correspondents, and I was surprised by the appearance of my Computer Graphics professor, Dr. Huang Zhiyong. Turns out that he's a member of SIGGRAPH Singapore.
First meeting with open source committee today. We plan to have a custom IHPC OpenSource webpage for Lightdraw instead of the usual SourceForge-ish layout.
For the month of March I'll be spending time on my interim project report and blogging less.
0305
Went with Kevin to scout for a High Definition (HD) camcorder that can function as a webcam. Unfortunately, HD camcorders cannot be used as webcams, only non-HD camcorders can have this feature.
Whackapeng can now be played with variable number of players and avatars.
0306
Translated laser tracking vertices to mouse coordinates. I am able to move the mouse pointer with my laser via X11 API calls.
Debugged a bug in Whackapeng which counts the number of circled avatars incorrectly. This is caused when multiple threads access a common critical region. In this particular case, the bug happens like this:
Thread A counts number of encircled avatars, and increments a global counter each time an avatar is encircled. It then checks this counter against number of avatars to determine if the player has won.
Thread B is the countdown timer, clears all avatar encircled state.
Two out of three avatars are already encircled. Thread A examines an avatar that is encircled but already flagged.
Thread B interrupts, clears the flag of all avatars. And just before Thread B resets the global counter representing the number of encircled avatars...
... thread A interrupts! It sees that the current avatar's flag is not set, and increments the global counter. This incorrectly triggers a winning condition.
Proposed solution is to use a semaphore to protect the critical region where the game is reset at the end of every countdown.
Note to self: X11 path on mac is /usr/X11R6/include
Friday, March 7, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment