A multiplayer Vim game built with Go and vanilla JavaScript, teaching Vim commands through interactive gameplay.
- Go 1.19 or higher
- Git
-
Clone the repository
git clone https://github.com/Flotapponnier/Bobavim.git cd Bobavim -
Set up environment
make setup
This will create a
.envfile from.env.example. Edit.envif you need custom settings. -
Build frontend assets
npm run build
This builds the JavaScript files needed for the game interface.
-
Start the development server
make dev # or simply: go run main.go -
Open your browser
- Game: http://localhost:8080
- Admin Panel: http://localhost:8080/dashboard/secure/admin (username:
test, password:test)
- Choose your character - Select from various boba-themed sprites
- Select a map - Pick from different difficulty levels
- Navigate using Vim commands - Use
h,j,k,l,w,b,0,$, etc. - Collect pearls - Reach pearls to score points
- Complete the map - Get to the mold before time runs out!
- Solo Play: Practice Vim commands at your own pace
- Multiplayer: Compete with other players in real-time
- Tutorial: Learn basic Vim movements step-by-step
Backend (Go):
make help # Show all available commands
make setup # Initial setup
make dev # Start development server
make build # Build the Go application
make test # Run tests
make lint # Run linter
make clean # Clean build artifactsFrontend (JavaScript):
npm run build # Build frontend assets for production
npm run build:dev # Build frontend assets for development
npm run watch # Watch mode - rebuilds on file changes
npm run dev # Development server (Vite)βββ internal/ # Go backend code
β βββ handlers/ # HTTP request handlers
β βββ services/ # Business logic
β βββ models/ # Data models
β βββ game/ # Game logic and multiplayer
βββ static/ # Frontend assets
β βββ css/ # Stylesheets
β βββ js/ # JavaScript modules
β βββ sprites/ # Game sprites and images
β βββ music/ # Audio files
βββ templates/ # HTML templates
βββ main.go # Application entry point
Key settings in .env:
PORT=8080 # Server port
ENV=development # Environment (development/production)
DATABASE_URL=boba_vim.db # SQLite database file
ADMIN_USERNAME=test # Admin panel username
ADMIN_PASSWORD=test # Admin panel password
# Game Settings
PEARL_POINTS=100 # Points per pearl
TARGET_SCORE=500 # Score needed to win
MAX_GAME_TIME=480 # Game time limit (seconds)
# Optional: Email service (for password reset)
RESEND_API_KEY=your-key-here
FROM_EMAIL=noreply@yourdomain.comThe game uses SQLite by default for local development. The database is automatically created on first run with:
- Admin account (test/test)
- Sample maps and game data
- User progress tracking
- Vim Movement Training: Practice
h,j,k,l,w,b,e,0,$,gg,G, and more - Progressive Difficulty: Maps designed to teach specific Vim concepts
- Real-time Scoring: Points based on movement efficiency
- Time Challenges: Complete maps within time limits
- Real-time Competition: Race against other players
- WebSocket Communication: Low-latency multiplayer experience
- Live Leaderboards: See who's the fastest Vim navigator
- Multiple Characters: Choose from various boba-themed sprites
- Responsive Design: Works on desktop (is mobile have an interest ?)
- Modular Architecture: Clean separation of concerns
- Performance Optimized: Efficient game state management
- Accessibility: Keyboard-first navigation
- Player Map Editor: Develop a map creation system using insert mode, allowing players to design custom maps
- Community Maps: Share and download maps created by other players
- Map Validation: Ensure created maps are solvable and follow game mechanics
- Friend List System: Implement a friend list where players can connect and challenge each other
- Multiplayer Challenges: Allow friends to propose fights and competitions
- Player Profiles: Enhanced profile system with statistics and achievements
- New Game Modes: Develop additional gaming systems and mechanics
- Extended Command Set: Include more advanced Vim commands and movements
- Progressive Learning: Structured learning paths for different skill levels
- Achievement System: Unlock rewards and recognition for mastering commands
- Framework Migration: Migrate from vanilla HTML/JS/CSS to a modern framework (React, Vue, or Svelte)
- Enhanced UI/UX: Improve user interface and user experience components
- Mobile Optimization: Better mobile responsiveness and touch controls
- Performance Optimization: Optimize game performance and loading times
- Themes and Customization: Multiple visual themes and UI customization options
- Sound Design: Enhanced audio feedback and background music
- Accessibility: Improved accessibility features for diverse user needs
- Analytics: Game analytics to understand player behavior and improve gameplay
- Spectator Mode: Watch other players compete
We welcome contributions! Here's how to get started:
-
Fork the repository
git fork https://github.com/Flotapponnier/Bobavim.git
-
Create a feature branch
git checkout -b feature/amazing-feature
-
Make your changes and test
make test make lint -
Submit a pull request
- Follow Go best practices and conventions
- Write tests for new features
- Keep JavaScript modular and well-documented
- Test multiplayer functionality thoroughly
- Maintain backwards compatibility
Maps are designed around specific Vim concepts:
- Beginner: Basic
h,j,k,lmovement - Word Movement:
w,b,ecommands - Line Navigation:
0,$,^commands - Search motions and repeteaed search:
f,t, ',' , ';' search commands
- Repository: https://github.com/Flotapponnier/Bobavim
- Issues: https://github.com/Flotapponnier/Bobavim/issues
- Discussions: https://github.com/Flotapponnier/Bobavim/discussions
This project is open source. Feel free to use, modify, and distribute according to the license terms.
- Built with β€οΈ for the Vim community
- Inspired by Vim's elegant movement philosophy
Let's make boba and vim great again! π§