Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

160 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Fruit Collector - 2D Platformer Game

Flame Engine Flutter Platform License

A classic 2D platformer game built with Flutter and Flame engine
Featuring smooth controls, engaging gameplay, and multiple levels to explore


๐Ÿ“‹ Project Information

Category Details
Project Title Fruit Collector 2D Platformer
Developer Kamdeu Yamdjeuson Neil Marshall
Student Email kynmmarshall@gmail.com
Course CS 3410 - Mobile Application Development
Institution The ICT University
Project Type Educational Game Development Project

๐ŸŽฎ Game Overview

Fruit Collector is a feature-rich 2D platformer that combines classic gaming mechanics with modern mobile development technologies. The game offers an engaging experience with progressive difficulty, multiple characters, and polished gameplay mechanics.

๐ŸŽฏ Core Features

  • โœ… Smooth Platforming Mechanics - Run, jump, and navigate through challenging levels
  • โœ… Multiple Playable Characters - 4 unique characters with distinct animations
  • โœ… Progressive Level System - 5+ levels with increasing difficulty
  • โœ… Dual Control Schemes - Virtual joystick + buttons or keyboard support
  • โœ… Persistent Save System - Progress saved between sessions using SharedPreferences
  • โœ… Collectible System - Gather fruits and track your collection
  • โœ… Life System - Three lives per level with checkpoint respawning
  • โœ… Polished Visuals - Smooth animations and vibrant pixel art
  • โœ… Complete Audio System - Background music and sound effects
  • โœ… Offline Play - Fully functional without internet connection

๐Ÿ•น๏ธ Gameplay Mechanics

Objective

Navigate through platform-filled levels while:

  • Avoiding enemies and obstacles (saws, traps)
  • Collecting fruits to increase your score
  • Reaching the checkpoint flag to complete levels
  • Unlocking subsequent levels by completing previous ones

Character Selection

Character
Ninja Frog
Mask Dude
Pink Man
Virtual Guy

Level Progression

Level-01 (Forest) โ†’ Level-02 (Castle) โ†’ Level-03 (Cave) โ†’ Level-04 (Factory) โ†’ Level-05 (Final)

๐ŸŽ›๏ธ Controls

๐Ÿ“ฑ Touch Controls

Control Location Action
Virtual Joystick Left side Move character left/right
Jump Button Right side Jump action
Menu Items Tap anywhere Navigate UI

โŒจ๏ธ Keyboard Controls

Key Action
Space Jump

๐Ÿ› ๏ธ Technical Architecture

Tech Stack

Component Technology
Game Engine Flame Game Engine 1.0+
Framework Flutter 3.0+ / Dart 2.17+
Architecture Component-based ECS Pattern
State Management Custom Game State Handling
Collision System Pixel-perfect AABB Detection
Audio Management Flame Audio with SharedPreferences
Storage SharedPreferences (Platform Feature)
Testing Flutter Test with ~80% Coverage

Component Structure

lib/
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ player.dart          # Player character with physics
โ”‚   โ”œโ”€โ”€ enemies.dart         # Enemy AI and behavior
โ”‚   โ”œโ”€โ”€ level.dart           # Level loading and management
โ”‚   โ”œโ”€โ”€ collision_block.dart # Collision system
โ”‚   โ”œโ”€โ”€ fruit.dart          # Collectible items
โ”‚   โ”œโ”€โ”€ checkpoint.dart     # Level completion
โ”‚   โ””โ”€โ”€ ... (15+ components)
โ”œโ”€โ”€ pixel_adventure.dart    # Main game class
โ””โ”€โ”€ main.dart              # App entry point

Platform Feature: Data Persistence

The game implements SharedPreferences for:

  • โœ… Saving unlocked levels between sessions
  • โœ… Storing player preferences (sound/music settings)
  • โœ… Maintaining character selection
  • โœ… Cross-session progress persistence
// Example: Saving game progress
await SaveManager.saveUnlockedLevels(highestUnlockedLevel);
final progress = await SaveManager.loadUnlockedLevels();

๐Ÿš€ Installation & Setup

Prerequisites

  • Flutter SDK 3.0+ (with Dart 2.17+)
  • Android Studio / VS Code with Flutter extension
  • Git for version control

Step-by-Step Setup

  1. Clone Repository

    git clone https://github.com/yourusername/pixel-adventure.git
    cd pixel-adventure
  2. Install Dependencies

    flutter pub get
  3. Run on Device/Emulator

    # For connected device
    flutter run
    
    # For specific device
    flutter run -d <device_id>
  4. Build Release Version

    # Android APK
    flutter build apk --release
    
    # iOS (macOS only)
    flutter build ios --release

Testing

# Run all tests
flutter test

๐Ÿ“Š Performance Optimizations

Optimization Implementation
Collision Detection Efficient AABB algorithms
Sprite Animation Preloaded sprite sheets
Memory Management Automatic resource cleanup
Frame-Rate Physics Delta-time calculations
Asset Loading Asynchronous loading with caching
State Updates Optimized update cycles

Test Structure

test/
โ”œโ”€โ”€ unit/
โ”‚   โ”œโ”€โ”€ components/      # Component tests
โ”‚   โ”œโ”€โ”€ managers/        # Manager tests
โ”‚   โ””โ”€โ”€ utils/          # Utility tests
โ”œโ”€โ”€ integration/         # Integration tests
โ””โ”€โ”€ system/             # System/UI tests

๐Ÿ“ฑ Platform Support

Platform Status Notes
Android โœ… Fully Supported API 21+

๐Ÿ“„ Documentation

Code Documentation

  • Comprehensive DartDoc comments
  • Architecture diagrams in /docs/
  • API reference generated with dartdoc

User Documentation

  • In-game tutorial (Planned)
  • Control scheme display
  • Level hints and tips

๐Ÿค Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contribution Guidelines

  • Follow Dart/Flutter style guide
  • Write tests for new features
  • Update documentation as needed
  • Ensure backward compatibility

๐Ÿ“ง Contact & Support

Contact Method Details
Developer Kamdeu Yamdjeuson Neil Marshall
Email kynmmarshall@gmail.com
Course CS 3410 - Mobile Application Development
Institution The ICT University
Project Duration Academic Year 2025-2026

Issue Reporting

Found a bug or have a feature request?

  1. Check existing issues
  2. Create new issue with:
    • Detailed description
    • Steps to reproduce
    • Screenshots/videos
    • Device/OS information

๐Ÿ“œ License & Acknowledgments

License

This project is developed for educational purposes as part of 
CS 3410 Mobile Application Development course at The ICT University.

All game assets (sprites, sounds) are used under educational fair use.
Code is proprietary to the developer for academic assessment.

Third-Party Credits

Resource Purpose License
Flame Engine Game framework MIT License
Pixel Art Assets Game sprites Educational Use
Sound Effects Audio feedback Educational Use
Flutter UI Framework BSD License

Special Thanks

  • Flame Engine Community for excellent documentation
  • CS 3410 Instructor for guidance and support
  • The ICT University for academic resources

๐ŸŽฎ Built with โค๏ธ using Flutter & Flame Engine

"Fruit Collector" - A CS 3410 Mobile Application Development Project
ยฉ 2024 Kamdeu Yamdjeuson Neil Marshall | The ICT University

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages