Skip to content

elect5/m5stack_tictactoe-aaa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Hive Multi-Game Platform v2.0

License: MIT Platform: PlatformIO Hardware: M5Stack Core2

A comprehensive multi-game platform for M5Stack Core2 devices featuring advanced game engine capabilities, multiple control schemes, and extensible architecture.

๐ŸŽฎ Features

Built-in Games

  • Tic-Tac-Toe: Classic game with AI opponent (4 difficulty levels)
  • Snake: Modern implementation with gesture controls and particle effects
  • Tetris: Complete implementation with scoring, levels, and visual effects
  • Tilt Maze: Physics-based maze game using accelerometer controls

Advanced Engine

  • Particle System: Visual effects with customizable particles
  • Theme Manager: Multiple color themes with smooth transitions
  • Animation Framework: Smooth animations and transitions
  • Input Management: Touch, button, gesture, and accelerometer support
  • Audio/Haptic: Sound effects and tactile feedback
  • Performance Monitoring: Real-time FPS and memory tracking

System Features

  • Auto-Discovery Game Registry: Easy game addition and management
  • Multiple Control Schemes: Touch, buttons, gestures, accelerometer
  • Persistent Configuration: Save game progress and settings
  • Power Management: Battery monitoring and power saving modes
  • OTA Updates: Over-the-air firmware updates (WiFi enabled)

๐Ÿš€ Quick Start

Prerequisites

  • M5Stack Core2 device
  • USB-C cable (data-capable)
  • Computer with VS Code and PlatformIO

Installation

# Clone repository
git clone https://github.com/your-org/m5stack_tictactoe-aaa.git
cd m5stack_tictactoe-aaa

# Install dependencies
pio lib install

# Build and upload
pio run --target upload

First Time Setup

  1. Connect M5Stack Core2 to your computer via USB-C
  2. Upload the firmware using PlatformIO
  3. Device will boot into Hive Platform with game selection menu
  4. Touch a game to launch or use Button A to select

๐Ÿ“– Documentation

Complete Documentation

Documentation Sections

  1. Hardware setup and device connection
  2. Software installation with PlatformIO
  3. Build and deployment instructions
  4. Game controls and user manuals
  5. Performance optimization tips
  6. Configuration and customization
  7. Development guide for new games
  8. Technical specifications
  9. Troubleshooting FAQ
  10. Release notes and version history

๐ŸŽฏ Game Controls

Universal Controls

  • Button A: Select/Confirm action
  • Button B: Pause/Resume game
  • Button C: Return to menu
  • Touch: Navigate menus and play games
  • Long Press A: System menu

Game-Specific Controls

  • Tic-Tac-Toe: Touch grid cells, Button A for AI difficulty
  • Snake: Swipe gestures or tilt controls
  • Tetris: Swipe to move/rotate, Button A for hard drop
  • Tilt Maze: Tilt device to control ball movement

๐Ÿ›  Development

Adding New Games

class MyGame : public HiveEngine::IGame {
public:
    bool initialize() override;
    void update(float deltaTime) override;
    void render() override;
    void handleInput() override;
    // ... other required methods
};

// Register game
gameManager->registerGameCreator("my-game", []() {
    return std::make_unique<MyGame>();
});

Build Environments

  • m5stack-core2-hive: Production build (optimized)
  • m5stack-core2-dev: Development build (debug enabled)
  • m5stack-core2-test: Testing build (with test framework)

Testing

# Run all tests
pio test

# Run specific test
pio test -f test_name

# Monitor test output
pio test --upload-port /dev/ttyUSB0

๐Ÿ“Š Performance

Specifications

  • Target FPS: 60 frames per second
  • Memory Usage: 256KB for games, 512KB total pool
  • Battery Life: 3-8 hours (depends on usage)
  • Response Time: <10ms for touch input

Optimization Tips

  • Reduce screen brightness for battery saving
  • Use power save mode for extended play
  • Disable unnecessary effects for better performance
  • Keep device firmware updated

๐Ÿ”ง Configuration

System Settings

struct SystemConfig {
    uint8_t brightness = 128;        // 0-255
    uint8_t volume = 180;            // 0-255
    bool soundEnabled = true;
    bool hapticEnabled = true;
    uint16_t screenTimeout = 300;    // seconds
    bool powerSaveMode = false;
};

Game Settings

Each game has specific configuration options for:

  • Difficulty levels
  • Visual themes
  • Control schemes
  • Audio/haptic feedback
  • Performance settings

๐Ÿ› Troubleshooting

Common Issues

Device Not Recognized

  • Check USB cable is data-capable
  • Install CP210x drivers (Windows)
  • Try different USB port
  • Verify device powers on

Build Errors

  • Clean build cache: pio run --target clean
  • Update PlatformIO: pio upgrade
  • Check library installation: pio lib list

Performance Issues

  • Monitor FPS in system menu
  • Check memory usage statistics
  • Reduce particle effects count
  • Lower target FPS if needed

Support

๐Ÿ“‹ Requirements

Hardware

  • M5Stack Core2: Required
  • USB-C Cable: Data-capable, not charge-only
  • Computer: Windows/macOS/Linux with development tools

Software

  • PlatformIO: Version 6.0 or later
  • VS Code: Recommended IDE with PlatformIO extension
  • Python: 3.7+ (required by PlatformIO)
  • Git: For version control

Optional

  • SD Card: 16GB+ for additional storage
  • Battery Base: Extended battery life
  • Speaker Module: Enhanced audio

๐Ÿ—‚ Project Structure

m5stack_tictactoe-aaa/
โ”œโ”€โ”€ src/                        # Source code
โ”‚   โ”œโ”€โ”€ main.cpp               # Main application
โ”‚   โ”œโ”€โ”€ engine/                # Game engine components
โ”‚   โ”œโ”€โ”€ games/                 # Individual games
โ”‚   โ””โ”€โ”€ menu/                  # Menu system
โ”œโ”€โ”€ include/                   # Header files
โ”œโ”€โ”€ tests/                     # Unit and integration tests
โ”œโ”€โ”€ docs/                      # Documentation
โ”œโ”€โ”€ scripts/                   # Build and utility scripts
โ”œโ”€โ”€ memory/                    # Collective memory storage
โ”œโ”€โ”€ lib/                       # External libraries
โ”œโ”€โ”€ platformio.ini             # PlatformIO configuration
โ””โ”€โ”€ README.md                  # This file

๐Ÿ“ˆ Version History

v2.0.0 (December 20, 2024)

  • Initial release with 4 built-in games
  • Advanced game engine with particle effects
  • Multiple control schemes and themes
  • Performance monitoring and optimization
  • Complete documentation and development guide

Previous Versions

  • v1.2.1: Maintenance release with bug fixes
  • v1.2.0: Feature enhancement with gesture controls
  • v1.1.0: UI enhancement with improved menu system
  • v1.0.0: Initial basic release

๐Ÿ”ฎ Future Roadmap

v2.1.0 (Planned Q1 2025)

  • Additional games: Chess, Checkers, Puzzle games
  • Local multiplayer via Bluetooth
  • Online features: Leaderboards and achievements
  • Advanced physics simulation

v2.2.0 (Planned Q2 2025)

  • Cloud integration and save synchronization
  • Social features and friend system
  • Voice control and commands
  • Enhanced accessibility features

v3.0.0 (Planned Q3 2025)

  • 3D graphics support
  • Virtual reality game modes
  • Real-time multiplayer networking
  • Support for additional M5Stack models

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

# Fork repository
git clone https://github.com/your-username/m5stack_tictactoe-aaa.git
cd m5stack_tictactoe-aaa

# Create feature branch
git checkout -b feature/your-feature-name

# Make changes and test
pio test

# Submit pull request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Third-Party Licenses

  • M5Stack Libraries: Apache 2.0
  • PlatformIO: Apache 2.0
  • Arduino Framework: LGPL
  • ESP-IDF: Apache 2.0

๐Ÿ™ Acknowledgments

  • M5Stack Team: Hardware platform and core libraries
  • ESP32 Community: Firmware development support
  • PlatformIO Team: Build system and development tools
  • Open Source Contributors: All contributors and testers
  • Beta Testers: Community feedback and testing

๐Ÿ“ž Contact


Built with โค๏ธ for the M5Stack community

This is part of the Hive Multi-Game Platform v2.0. For the latest updates and documentation, please visit our GitHub repository.

About

๐ŸŽฎ AAA-Quality Multi-Game Platform for M5Stack Core2 - Professional gaming with advanced physics, AI, and optimization

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors