- Ensure Python and Pygame are installed
- Clone the repository
- Run
main.pyto start the game - Select roles for each player (Defuser or Expert)
- Begin defusing!
If you are playing on different devices:
- Hamachi/VPN required in order to connect via socket
- The following are needed:
- In
player1.py: player1 has his own ip in player1.py- Can be seen in line 133 of
player1.py
- Can be seen in line 133 of
HOST = "player1's ip" replace string with ip
- In
player2.py: player2 has player1's ip in player2.py- Can be seen in line 41 of
player2.py
- Can be seen in line 41 of
HOST = "player2's ip" replace string with ip
- Player 1 runs
player1.pyand must do the following:
- Send
puzzle_info.txtdata (that has been generated by runningplayer1.py) to player 2 - Player 2 replaces the current
puzzle_info.txtto match player 1's
- Player 2 runs
player2.py
Note: It is buggy.
- Mouse to interact with bomb components
- Number keys for code input
- Click to cut wires
- Click to input symbols
- Mouse to select modules and send messages
- Keyboard for custom message input
- Quick message buttons for common instructions
HackTheBomb was inspired by the high-stakes collaborative gameplay of games like "Keep Talking and Nobody Explodes." We wanted to create an experience that tests not just individual problem-solving skills, but also communication and teamwork under pressure. The concept of having one player with the manual and another with the bomb creates an intense dynamic where clear communication becomes literally a matter of virtual life and death.
HackTheBomb is a two-player collaborative puzzle game where players must work together to defuse a virtual bomb. The game features:
-
Player 1 (Defuser): Interacts with a graphical bomb interface containing:
- Three colored wires (red, green, blue)
- A symbol keypad with four symbols (%, !, ;, &)
- A numerical code input system
- A countdown timer
- A detonator button
- Visual feedback for all interactions
-
Player 2 (Expert): Has access to:
- A terminal-style interface with the bomb defusal manual
- Detailed instructions for each module
- Quick-message system for urgent communication
- Custom message input for detailed instructions
- Module-specific puzzle information
The game was built using:
-
Technologies:
- Python as the primary programming language
- Pygame for graphics and game mechanics
- Socket programming for player communication using Hamachi
- File I/O for sharing puzzle information
-
Components:
main.py: Game launcher with player role selectiongame_state.py: Central game logic and puzzle generationplayer1.py: Defuser interface and bomb mechanicsplayer2.py: Expert interface and manual systemutility.py: Shared utility functions for file operations
-
Game Mechanics:
- Randomized puzzle generation for replayability
- Real-time network communication between players
- Multi-module puzzle system
- Timer-based gameplay
- State management for puzzle completion
-
Networking Complexity: Implementing reliable real-time communication between the two players required careful handling of socket programming and data synchronization.
-
State Management: Coordinating game state between two separate applications while maintaining consistency proved challenging, especially with multiple puzzle modules.
-
User Interface Design: Creating an intuitive interface for both players that could convey complex information without overwhelming them required multiple iterations.
-
Puzzle Generation: Developing a system that could generate random but solvable puzzles while maintaining game balance was particularly challenging.
-
Error Handling: Implementing robust error handling for network disconnections, incorrect inputs, and various edge cases required significant testing and refinement.
- Created a fully functional multiplayer game with real-time communication
- Implemented an engaging puzzle system with multiple modules
- Developed a clean and intuitive user interface for both players
- Successfully integrated randomized puzzle generation
- Created a balanced difficulty curve that challenges players without frustrating them
- Advanced Pygame development techniques
- Network programming with sockets in Python
- State management in multiplayer applications
- User interface design principles
- Game balance and puzzle design
- Error handling in networked applications
- The importance of clear communication in collaborative games
-
Additional Puzzle Modules:
- Morse code module
- Pattern recognition puzzles
- Color sequence challenges
- Sound-based puzzles
-
Enhanced Features:
- Difficulty levels
- Custom puzzle creation tools
- Achievement system
- Tutorial mode
- Leaderboards
-
Technical Improvements:
- Cross-platform compatibility
- Enhanced graphics and animations
- Improved network stability
- Save/load functionality
- Spectator mode
- Python
- Pygame
- Socket Programming
- Hamachi/FortiClientVPN
- File I/O
- Random Number Generation
- Caesar Cipher Encryption
- Event-Driven Programming
- Object-Oriented Design
You can view them in the screenshots directory