2048 Game for VSCode
🎮 Classic 2048 tile-sliding puzzle game directly in your VSCode editor!
2048 on Visual Studio Marketplace: https://marketplace.visualstudio.com/items?itemName=AliGOREN.vscode-2048

Features
✨ Complete 2048 Experience
- Classic 2048 gameplay with smooth animations
- Score tracking and game state persistence
- Win/lose detection with visual feedback
- Keyboard controls (Arrow keys or WASD)
- 🎯 Social Media Sharing: Share your scores on Twitter/X or copy to clipboard
🎨 VSCode Integration
- Seamless integration with VSCode themes (Dark, Light, High Contrast)
- Responsive design that adapts to your editor
- Activity bar integration for easy access
- Minimal performance impact on VSCode
🚀 Performance Optimized
- Hardware-accelerated animations
- Efficient memory usage
- Fast startup time
- Proper cleanup on extension deactivation
♿ Accessibility
- Screen reader support
- High contrast theme compatibility
- Keyboard navigation
- ARIA labels for game elements
Installation
From VSCode Marketplace
- Open VSCode
- Go to Extensions (Ctrl+Shift+X)
- Search for "2048 Game"
- Click Install
Manual Installation
- Download the latest
.vsix
file from Releases
- Open VSCode
- Press Ctrl+Shift+P
- Type "Extensions: Install from VSIX..."
- Select the downloaded
.vsix
file
Usage
Starting the Game
- Click the 2048 Game icon in the Activity Bar (left sidebar)
- The game panel will open in the sidebar
- Start playing immediately with arrow keys!
Controls
- Arrow Keys or WASD: Move tiles
- R or Space: Start new game
- Command Palette:
2048: New Game
Game Rules
- Use arrow keys to move tiles
- When two tiles with the same number touch, they merge into one
- Try to create a tile with the number 2048 to win
- Game ends when you can't make any more moves
Screenshots
Dark Theme

Light Theme

High Contrast

Configuration
The extension automatically adapts to your VSCode theme and settings. No additional configuration required!
- Startup Impact: < 5ms
- Memory Usage: < 10MB during gameplay
- Rendering: 60fps smooth animations
- Theme Switching: Instant adaptation
Compatibility
- VSCode Version: 1.74.0 or higher
- Platforms: Windows, macOS, Linux
- Themes: All VSCode themes supported
- Languages: Universal (no text dependencies)
Development
Building from Source
# Clone the repository
git clone https://github.com/aligoren/vscode-2048.git
cd vscode-2048
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Run tests
npm test
# Package extension
npm run package
Testing
# Run all tests
npm test
# Run specific test suites
npm run test:performance
npm run test:memory
npm run test:themes
Contributing
Contributions are welcome! Please read our Contributing Guide for details.
Development Setup
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new features
- Ensure all tests pass
- Submit a pull request
Changelog
[1.0.5] - 2025-01-08
- 🎯 Social Media Sharing Feature: Share your 2048 scores on Twitter/X and copy to clipboard
- 📱 Smart Share Button: Disabled until game starts, prevents accidental sharing
- 🐦 Twitter Integration: Multi-line prefilled tweets with score, highest tile, and marketplace link
- 📋 Clipboard Support: Copy formatted score details for manual sharing
- 🎮 Enhanced User Experience: VSCode QuickPick menu for platform selection
[1.0.0] - 2025-01-03
- Initial release
- Complete 2048 game implementation
- VSCode theme integration
- Performance optimizations
- Accessibility features
- Comprehensive test coverage
See CHANGELOG.md for full version history.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Original 2048 game by Gabriele Cirulli
- VSCode Extension API documentation
- Community feedback and contributions
Support
Stats

Enjoy playing 2048 while coding! 🎮✨