An onchain multiplayer fishing game built on the Solana blockchain. Navigate vast oceans, catch rare fish, manage your ship and inventory, and compete in a dynamic player-driven economy.
Tides combines the exploration and resource management of "Dredge" with blockchain technology to create a fully onchain gaming experience. Players explore different maps, catch fish with strategic bait selection, trade in dynamic markets, and climb seasonal leaderboards.
- ๐ Preparation - Buy fuel, bait, and repair equipment
- ๐บ๏ธ Exploration - Navigate hex-grid oceans across multiple maps
- ๐ฃ Fishing - Use strategic bait selection to catch rare species
- ๐ฆ Management - Organize inventory in Tetris-like cargo system
- ๐ฐ Trading - Sell fish in dynamic bonding curve markets
- โฌ๏ธ Progression - Upgrade ships and climb leaderboards
Frontend (app/)
- Framework: SvelteKit with Svelte 5
- 3D Rendering: Threlte (Three.js wrapper for Svelte)
- Styling: TailwindCSS v4 + bits-ui components
- Web3: Solana Web3.js + Anchor for blockchain interactions
- Deployment: Cloudflare Pages/Workers
Smart Contracts (programs/)
- Framework: Anchor
- Language: Rust
- Network: Solana
- Token: SPL Token for in-game currency
tides/
โโโ ๐ฑ app/ # SvelteKit frontend
โ โโโ src/routes/ # Page routes
โ โโโ src/lib/ # Shared components & utilities
โ โโโ static/ # Static assets
โโโ โ๏ธ programs/ # Solana programs (smart contracts)
โ โโโ tides/ # Main game program
โ โโโ src/ # Rust source code
โโโ ๐ tests/ # Anchor tests
โโโ ๐ Anchor.toml # Anchor configuration
- Node.js 18+ with Bun or npm
- Solana CLI toolkit
- Anchor framework
- Rust (for program development)
- Git for version control
-
Clone the repository
git clone https://github.com/your-repo/tides.git cd tides -
Install frontend dependencies
cd app bun install -
Install Anchor dependencies
anchor build
Frontend Development
cd app
bun run dev # Start development server
bun run build # Build for production
bun run check # Type checking
bun run lint # Lint codeProgram Development
anchor build # Build Solana program
anchor test # Run tests
anchor deploy # Deploy program- Multiple Maps: Explore different ocean regions with unique fish populations
- Tiered Content: Higher-tier maps offer rarer fish but cost more to access
- Terrain: Navigate around impassable areas and find optimal fishing spots
- Travel Costs: Pay currency to fast-travel between maps
- Bait Selection: Choose specific bait types for strategic fishing
- Position-based: Fish distributions vary by location on each map
- Server-Driven: Off-chain computation with on-chain verification for optimal performance
- Free Attempts: No cost per fishing attempt, only bait consumption
- Hex Grid: Navigate on a hexagonal grid system (6 directions)
- Fuel Economy: Movement costs fuel based on distance and ship efficiency
- Speed System:
speed = enginePower / totalWeight - Cooldowns: Movement speed determines how often you can move
- 2D Grid System: Tetris-like inventory with item shapes
- Ship Variants: Different ships have unique cargo hold shapes
- Equipment Slots: Designated areas for engines and fishing gear
- Weight System: Total weight affects movement speed
- Bonding Curves: Fish prices change based on supply and demand
- Freshness Decay: Fish lose value over time
- Weight Factor: Heavier fish are more valuable
- Market Formula:
finalPrice = marketValue ร weight ร freshness
- Leaderboards: Compete based on currency earned minus spent
- Season Pass: Purchase passes with SOL to participate
- Rewards: Top players earn valuable in-game items
- Shards: Multiplayer optimization without affecting game content
The main game program handles:
- Player registration and state management
- Movement and fuel consumption
- Fishing mechanics
- Fish market trading
- Inventory management
- Equipment purchases
- Map-based World: Fish distributions and shops unique per map
- Server-Driven Mechanics: Off-chain computation with on-chain verification
- Shard Optimization: Multiplayer scaling without content fragmentation
- Production Ready: Comprehensive error handling and optimization
Run All Tests
anchor testRun Specific Test
anchor test --skip-local-validator# Start local validator
solana-test-validator
# Deploy program
anchor deploy# Deploy to mainnet-beta or devnet
anchor deploy --provider.cluster mainnet-betaDetailed game mechanics and design decisions:
- Core game design and mechanics
- Technical architecture
- Development guidelines
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and ensure they pass
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Rust and Anchor best practices
- Add comprehensive tests for new features
- Update documentation for significant changes
- Use the established code style and conventions
The program is optimized for Solana:
- Compact Structs: Minimize account data size
- Batch Operations: Combined actions in single transactions
- Event-driven: Minimal on-chain storage for temporary data
- Efficient Algorithms: Optimized calculations
- Access Control: Role-based permissions for admin functions
- Reentrancy Protection: Solana's transaction model prevents reentrancy
- Input Validation: Comprehensive parameter checking
- Signature Verification: Server-driven mechanics with signature validation
- Pausable: Emergency pause functionality
- Basic movement and fishing
- Map system with terrain
- Bait selection mechanics
- Server-driven fishing system
- Fish market implementation
- Dynamic pricing system (bonding curves)
- Inventory management (2D grid system)
- Currency and economic mechanics
- 3D ocean world with Threlte
- Hex-grid movement visualization
- Inventory management UI
- Solana wallet integration
- Seasonal leaderboards
- Guild system
- Multiplayer events
- Achievement system
- Equipment crafting
- Weather system
- Rare events
- Enhanced NFT features
- Issues: Report bugs on GitHub Issues
- Discussions: Join community discussions
- Documentation: Check project docs for detailed guides
This project is licensed under the MIT License - see the LICENSE file for details.
- Solana for the blockchain infrastructure
- Anchor for excellent development tools
- "Dredge" for game design inspiration
Built with โค๏ธ for the future of onchain gaming on Solana