A family-friendly 3D river crossing puzzle game built with Unity. The objective is to transport characters across a river using a boat while following level-specific constraints (e.g., never leaving certain characters together unattended). The project contains multiple levels (classic missionaries & cannibals, jealous husbands, and other variations) with reusable boat and character controllers, particle effects, and sound.
- Multiple puzzle level types (Missionaries & Cannibals, Jealous Husbands, Custom scenarios)
- Boat physics and rotation controller
- Character grouping and crossing rules implemented per level
- Audio (background music, paddle splash), particle effects for water interactions
- Prefabs for boat, characters, and UI elements for fast iteration
- Unity 2020.x / 2021.x / 2022.x (project is compatible with Unity 2020+). If you encounter package or API issues, open the project using the Unity Hub and allow it to upgrade packages if prompted.
- Install Unity with a compatible editor version (see above).
- Open Unity Hub, choose "Add" and select the project folder:
RiverCrossingGameUnity. - Open the project in the Hub. Wait for the Editor to import assets and compile scripts.
- Open the main Scenes folder (Assets/Scenes) and select a scene to play. The project may include scenes for different levels; the scene names typically indicate the level.
- Press the Play button in the Unity Editor to run the currently open scene.
- Use the Scene Hierarchy to locate player/boat prefabs and test components live.
- Mouse / Touch (mobile): Tap characters to select and place them in the boat; tap the "Go" button to cross the boat.
- UI: On-screen buttons for "Start Level", "Next Level", and "Try again".
- Assets/
- Scenes/ — game scenes for different levels
- Prefabs/ — boat, characters, UI prefabs
- Scripts/ — gameplay logic and controllers
- CannibalsMissionariesController.cs — logic for the Missionaries & Cannibals puzzle
- Level2RiverController3D.cs — sample 3D river level controller
- Level4JealousHusbandsController3D.cs — jealous husbands level implementation
- boatRotation.cs — boat rotation and animation helper
- BackgroundMusic.cs — persistent background audio manager
- SplashParticle.cs, PaddleSplash.cs — water and paddle FX
- Couple.cs — helper class for paired characters
- Materials/, Models/, Animations/ — visual assets used across scenes
Files and scripts may have slightly different names in the Assets root — use the Project window to inspect components attached to GameObjects in each scene.
- Objective: Move all required characters from the start bank to the goal bank using the boat while obeying level-specific rules.
- Boat capacity: Varies by level; default boat scripts enforce a maximum passenger count.
- Constraint rules: Example — in the white shirt & gray shirt level, gray shirt's cannot outnumber white shirt's on either bank.
- Level controllers monitor win/lose conditions and trigger UI feedback or scene transitions.
- In Unity, open File > Build Settings.
- Select target platform (PC/Mac/Linux, Android, iOS) and add the desired scenes to the Build Scenes list.
- Configure Player Settings (icon, bundle id, resolution, input settings) as needed.
- Click Build or Build and Run.
For mobile builds, ensure you have the required platform modules installed in Unity Hub (Android / iOS). For iOS builds, open the generated Xcode project and build from Xcode.
- Script compile errors: Open the Console window (Window > General > Console) to see stack traces. Double-click an error to open the offending script.
- Missing references: Check Inspector for missing script or prefab links and reassign the correct components or prefabs.
- Audio not playing: Confirm
BackgroundMusicis on a GameObject in the starting scene and has "Play On Awake" enabled if desired. - Scene-specific problems: Inspect the level controller attached to the main controller GameObject for null references or misconfigured rules.
-
Add a new level:
- Duplicate an existing level scene and modify the starting bank composition.
- Create or reuse a LevelController script and configure rules and boat capacity.
- Add the new scene to the Build Settings.
-
Add new character types:
- Create a new prefab with animations and assign the appropriate tag or script (e.g., Couple.cs) if special logic applies.
- Update level controllers to include the new character in rule checks.
We welcome contributions, bug reports, and improvement suggestions to improve the Game!
-
Check the Issues page for open tasks or feature bounties.
-
Comment on an issue to claim it before starting work.
-
Fork the repo
-
Clone from the forked to your own machine
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Commit clean, modular code and push your branch.
-
Submit a Pull Request referencing the issue number. Example:
Resolves #12
- Some issues include ETB rewards for completed features.
- Rewards are given to the first successfully merged pull request meeting all acceptance criteria.
- Be sure to review the Acceptance Criteria listed in the issue before starting.
- Follow Unity and C# best practices.
- Keep code readable and modular.
- Use meaningful commit messages and clear PR descriptions.
- Many assets in
Assets/appear to be project-specific; verify third-party assets for their respective licenses before redistribution. - If you add external assets (models, sounds, textures), include license text in
Assets/ThirdPartyLicensesor a similar folder.
- Project may require minor package upgrades on newer Unity versions.
- Some prefab names or scene references may differ between versions; check the Console for missing references after opening the project.
- There are many unnecessary files, folders and code are included and we believe those should be removed.
- Since we're just experimenting thing may not working as expected
For questions or assistance, open an issue on the repository or contact the maintainer via email (esubalew.a2009@gmail.com).
Enjoy building and improving the River Crossing puzzle game!