A sophisticated cross-platform puzzle game built with Qt/C++, featuring elegant UI design, smooth animations, and challenging gameplay mechanics. Players must strategically flip coins to achieve uniform orientation across a 4ร4 grid.
๐ฎ
โถ๏ธ Download & Play Now - Ready to run on Windows, no installation required!
- 20 Progressive Levels with increasing difficulty
- 4ร4 Grid System with strategic coin-flipping mechanics
- Chain Reaction Logic - clicking a coin affects adjacent coins
- Win Condition Detection with smooth victory animations
- Multi-Scene Architecture (Main Menu โ Level Selection โ Gameplay)
- Custom Widget Components with hover effects and animations
- Responsive Design optimized for 320ร588 resolution
- Intuitive Navigation with back button functionality
- Immersive Audio System with sound effects for interactions
- High-Quality Graphics with coin flip animations
- Resource Management through Qt Resource System
- Smooth Transitions between game states
- Object-Oriented Architecture with custom classes (
MyCoin,MyPushButton) - Event-Driven Programming with Qt signal-slot mechanism
- Memory Management with proper cleanup and deletion
- Cross-Platform Compatibility via CMake build system
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ MainScene โโโโโถโ ChooseLevelScene โโโโโถโ PlayScene โ
โ (Entry Point) โ โ (Level Grid) โ โ (Game Logic) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ MyPushButton โ โ Custom UI โ โ MyCoin โ
โ (Interactions) โ โ Components โ โ (Game Entity) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
For immediate gameplay:
-
Download the game
git clone https://github.com/sunkuangdong/GoldGame_zip.git cd GoldGame_zip -
Run the game
# Double-click CoinFilp.exe or run from command line ./CoinFilp.exe
For development or other platforms:
- Qt 5.12+ or Qt 6.x
- CMake 3.16+
- C++17 compatible compiler
- Git (for cloning)
-
Clone the repository
git clone https://github.com/sunkuangdong/GoldGame.git cd GoldGame -
Create build directory
mkdir build && cd build
-
Configure with CMake
cmake .. -DCMAKE_BUILD_TYPE=Release
-
Build the project
cmake --build . --config Release -
Run the game
./CoinFilp # Linux/macOS CoinFilp.exe # Windows
- Open
CMakeLists.txtin Qt Creator - Configure kit and build directory
- Build and run the project
- Start the Game - Launch from the main menu
- Select Level - Choose from 20 available levels (1-20)
- Flip Strategy - Click coins to flip them and adjacent coins
- Win Condition - Turn all coins to show the same side (heads)
- Progress - Complete levels to unlock new challenges
- Clicking a coin flips it and its four adjacent coins (up, down, left, right)
- Diagonal coins are not affected
- Edge and corner coins have fewer adjacent coins
- Strategic thinking required to solve puzzles efficiently
GoldGame/
โโโ ๐ main.cpp # Application entry point
โโโ ๐ mainscene.{h,cpp,ui} # Main menu scene
โโโ ๐ chooselevelscene.{h,cpp} # Level selection scene
โโโ ๐ playscene.{h,cpp} # Gameplay scene
โโโ ๐ mycoin.{h,cpp} # Coin widget implementation
โโโ ๐ mypushbutton.{h,cpp} # Custom button widget
โโโ ๐ dataconfig.{h,cpp} # Level data configuration
โโโ ๐ res/ # Game resources
โ โโโ ๐ผ๏ธ *.png # UI graphics and sprites
โ โโโ ๐ *.wav # Audio files
โ โโโ res.qrc # Qt resource file
โโโ ๐ build/ # Build artifacts
โโโ ๐ CMakeLists.txt # Build configuration
โโโ ๐ README.md # Project documentation
- Modern C++17 features and best practices
- Qt conventions for signal-slot connections
- RAII for resource management
- Const-correctness where applicable
class MyCoin : public QPushButton {
Q_OBJECT
public:
MyCoin(QString imgPath);
void changeFlag(); // Flip coin state
bool flag; // Current coin state
int posX, posY; // Grid position
bool isAnimation; // Animation state
bool isWin; // Win condition flag
};- Grid Management: 4ร4 array tracking coin states
- Click Handling: Processes coin interactions
- Win Detection: Checks victory conditions
- Animation System: Smooth transitions and effects
Debug Build:
cmake .. -DCMAKE_BUILD_TYPE=Debug
cmake --build . --config DebugRelease Build:
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config ReleaseContributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
- Follow the existing code style and conventions
- Write clear commit messages
- Test your changes thoroughly
- Update documentation as needed
This project is open source and available under the MIT License.
- ๐ฎ Play Now: Download & Play the Game - Ready-to-run Windows executable
- ๐ Source Code: View on GitHub - Complete source code and development files
- ๐ Issues: Report bugs
- ๐ฆ Releases: Download builds
This project is organized across two GitHub repositories:
- ๐ฆ GoldGame - Complete source code, development files, and documentation
- ๐ฎ GoldGame_zip - Pre-built Windows executable with all dependencies
Developer: sunkuangdong
GitHub: @sunkuangdong
Built with โค๏ธ using Qt and C++