Setting Up Duel Game
The Duel Mode Concept
Enhanced Python Detection System
Player Separation in Duel Mode
Draw center line:
Bounding box for each detected hand
Unity Duel Mode Implementation
Game State Management
Running a Round Sequence
Detection Window Processing
User Testing and the Evolution of Score Tracking
During one testing session, a participant made a suggestion that changed the entire feel of the game. As two players were neck-and-neck at 4-5 points, one of them said, "It would be cool if we could see the score filling up rather than just numbers."
This sparked an energetic discussion where we all chimed in with ideas. We sketched different visual representations and the consensus landed on a block-based system where each point would add a visual block to the player's score container.
I implemented this suggestion:
New Experience
This experience highlighted the value of not just collecting user feedback but actually involving testers in the design conversation. The collaborative atmosphere of these testing sessions produced ideas I never would have considered on my own.
Enhanced UDP Communication
Technical Challenges
1. Detection Reliability in a Two-Player Setup
Perhaps the biggest challenge was ensuring reliable detection for two people standing side-by-side. Our TensorFlow model was originally trained for single-hand detection, and now it needed to accurately differentiate between two players' hands simultaneously.
The first problem was that the model would sometimes confuse hands when they crossed the center line or when one player reached into the other player's space. To solve this, I implemented a stricter player assignment system where hands were tracked continuously rather than just being assigned based on position in each frame. This prevented sudden player identity switches when hands moved around.
2. Ensuring Fair Competition
For example, if Player 1 raised their hand early while Player 2 was still getting ready, the system might occasionally misinterpret Player 1's hand as the correct sign and award them the point, even though Player 2 might have actually formed the correct sign first once both were ready.
How I address this:
First, I added a clear countdown sequence with "3, 2, 1, GO!" displayed prominently before each round starts. This gave both players equal preparation time and a clear signal for when to begin forming signs.
Second, I implemented a "Lower your hands" prompt between rounds. After each round, the system displays a message asking players to lower their hands, then waits for a short period before starting the next round. This prevents the hypersensitive detection system from carrying over detections between rounds.
Most importantly, I created a "detection window" system. When either player makes a correct sign, instead of immediately awarding them the point, the system opens a brief window (about 1 second) to allow the other player to complete their sign as well. If both players make the correct sign within this window, the point goes to whoever was faster.
Insights
Implementing the Duel Mode was challenging but rewarding. The final system creates an engaging competitive experience that encourages players to master their sign language skills while having fun.
Some key insights from this development process:
- Unified Detection System: Creating a single Python script that handles both modes eliminated the need to switch between scripts and provided a more integrated experience.
- Collaborative Design: The interactive user testing sessions transformed the development process from a solo endeavor into a collaborative design experience. The excitement and engagement of testers not only provided valuable feedback but also generated innovative ideas I wouldn't have considered on my own.
- Fair Competition: The detection window system ensures fair play even with slight timing differences.
- Visual Feedback: The block-based scoring system suggested by users created a more engaging visual representation of progress.
The Duel Mode adds an exciting competitive element to our sign language learning application, making practice more engaging and motivating users to improve their signing speed and accuracy. The positive reactions during testing sessions confirmed that turning learning into a social, competitive experience can significantly increase engagement and enjoyment.
Comments
Post a Comment