Retro 8-bit style Tic Tac Toe game dengan full offline support dan responsive design
- Pixel Art Style: Authentic 8-bit retro gaming experience
- Smooth Animations: CSS animations untuk setiap interaksi
- Sound Effects: Haptic feedback dengan device vibration
- Score Tracking: Persistent score storage dengan localStorage
- Responsive Design: Optimal di semua ukuran layar (mobile, tablet, desktop)
- Win Detection: Animated highlight untuk winning combinations
- Full Offline Support: Dapat dimainkan tanpa koneksi internet sama sekali
- Installable: Install sebagai native app di device
- Fast Loading: Advanced caching strategies untuk performa optimal
- Cross-Platform: Berjalan di iOS, Android, Windows, Mac, Linux
- Auto-Update: Background updates untuk versi terbaru
- Pixel Perfect: Menggunakan font "Press Start 2P" untuk authentic retro feel
- Animated Particles: Background particles untuk visual enhancement
- Glowing Effects: CSS glow effects dan shadows
- Color Coded: Hijau neon (#00ff41) untuk X, Orange (#ff3d00) untuk O
- Smooth Transitions: Semua element memiliki smooth animations
- HTML5: Semantic markup untuk accessibility
- CSS3:
- CSS Grid untuk game board layout
- CSS Custom Properties (Variables) untuk theming
- CSS Animations & Keyframes untuk effects
- Responsive design dengan clamp() functions
- Media queries untuk berbagai breakpoints
- Vanilla JavaScript:
- Modern ES6+ features
- Local Storage API untuk persistence
- Vibration API untuk haptic feedback
- Service Worker API untuk offline capability
- Service Worker: Advanced caching strategies
- Web App Manifest: Native app-like installation
- Cache API: Multiple cache strategies (Cache First, Network First, Stale While Revalidate)
- Background Sync: Future-ready untuk sync capabilities
- Push Notifications: Ready untuk game challenges
Buka di browser: file:///path/to/index.html
Atau deploy ke web server dan akses via URL
- Chrome/Edge: Klik tombol "Install PWA" atau icon install di address bar
- Safari: Share โ Add to Home Screen
- Firefox: Menu โ Install
- Mobile: "Add to Home Screen" dari browser menu
- Setelah first load, aplikasi akan cache semua assets
- Dapat dimainkan tanpa internet connection
- Scores tersimpan secara lokal
- Updates otomatis saat online kembali
- Objective: Buat garis 3 symbol yang sama (horizontal, vertikal, atau diagonal)
- Players: X dan O bergantian
- Winning: First player yang membuat 3 in a row menang
- Draw: Jika board penuh tanpa winner
- Click/Tap: Tempatkan symbol di cell
- Restart: Mulai game baru dengan score tetap
- Reset Score: Reset score ke 0-0
- Cell Animation: Setiap placement memiliki animation
- Winning Highlight: Winning cells akan glow dan animated
- Turn Indicator: Current player ditampilkan dengan glow effect
- Score Updates: Animated score increments
simple-pwa/
โโโ index.html # Main HTML file
โโโ style.css # Pixel-style CSS dengan animations
โโโ sw.js # Enhanced Service Worker
โโโ manifest.json # PWA manifest dengan pixel theme
โโโ icons/ # PWA icons (192x192, 512x512)
โ โโโ icon-192.png
โ โโโ icon.png
โโโ README.md # Dokumentasi ini
- "pixel-ttt-scores": {X: number, O: number}- "pixel-ttt-cache-v2": Static assets cache
- "pixel-ttt-dynamic-v2": Dynamic content cache--pixel-primary: #00ff41 /* Neon Green - untuk X dan accents */
--pixel-secondary: #ff3d00 /* Orange Red - untuk O dan warnings */
--pixel-bg-dark: #0a0a0a /* Deep Black - main background */
--pixel-bg-light: #1a1a1a /* Dark Gray - containers */
--pixel-border: #333 /* Medium Gray - borders */
--pixel-text: #00ff41 /* Neon Green - primary text */
--pixel-text-alt: #ffffff /* White - secondary text */Primary Font: 'Press Start 2P' (Google Fonts)
Fallback: 'Courier New', monospace
Sizes: Responsive dengan clamp() function- Container Glow: 2s infinite alternate breathing effect
- Cell Appear: 0.5s scale & rotate entrance
- Cell Fill: Different animations untuk X (rotate left) dan O (rotate right)
- Winner Effect: 0.6s infinite alternate scale dengan glow
- Button Hover: translateY untuk 3D button effect
Mobile Portrait: < 480px
Mobile Landscape: < 768px
Tablet: 768px - 1024px
Desktop: > 1024px
/* Extreme small devices */
@media (max-width: 320px)
/* Print styles */
@media printEdit CSS custom properties di :root:
:root {
--pixel-primary: #your-color;
--pixel-secondary: #your-color;
/* etc. */
}Adjust animation duration di keyframes:
@keyframes cellAppear {
/* Change dari 0.5s ke durasi yang diinginkan */
}Replace vibration dengan audio:
function playSound(type) {
const audio = new Audio(`sounds/${type}.mp3`);
audio.play().catch(() => {});
}- HTML, CSS, JS, Images, Manifest
- Instant loading dari cache
- Background updates
- API calls, external resources
- Fresh content when online
- Cache fallback when offline
- Google Fonts
- Serve dari cache, update di background
- Best performance dengan fresh content
- CSS Custom Properties: Consistent theming
- clamp(): Responsive sizing tanpa media queries
- transform: Hardware-accelerated animations
- will-change: Optimize untuk animations
- Event Delegation: Efficient event handling
- Debouncing: Prevent excessive function calls
- localStorage: Client-side persistence
- Error Handling: Graceful fallbacks
- Resource Hints: Preconnect untuk Google Fonts
- Critical CSS: Inline critical styles
- Progressive Enhancement: Works tanpa JavaScript
- Offline First: Cache-then-network strategy
Solution: Check CSS viewport meta tag dan clamp() functions
Solution:
- Check device performance
- Reduce animation complexity di CSS
- Add
will-changeproperty
Solution:
- Check Service Worker registration
- Verify cache strategies di DevTools
- Clear cache dan reload
Solution:
- Verify manifest.json validity
- Check HTTPS requirement (atau localhost)
- Ensure Service Worker active
- AI Opponent: Single player vs computer
- Multiplayer: Real-time online gameplay
- Tournaments: Bracket-style competitions
- Themes: Multiple pixel art themes
- Sound Pack: Retro sound effects
- Achievements: Unlock system
- Statistics: Detailed game analytics
- Custom Board: Different grid sizes
- Web Components: Modular architecture
- TypeScript: Type safety
- PWA Builder: Enhanced manifest
- WebGL: Advanced visual effects
- WebAssembly: Performance optimization
- Clone repository
- Open index.html di browser atau local server
- Modify files sesuai kebutuhan
- Test di berbagai devices dan browsers
- Use semantic HTML
- Follow CSS BEM methodology
- ES6+ JavaScript features
- Comment complex logic
- Mobile-first responsive design
MIT License - Free untuk personal dan commercial use
Nikmati pengalaman gaming retro dengan teknologi modern! ๐ฎ
Catatan: Aplikasi ini menggunakan Google Fonts yang memerlukan internet untuk first load, namun setelah di-cache akan berfungsi sepenuhnya offline.