A futuristic 3D space defense game built with SvelteKit and Three.js
Live Demo ⢠Features ⢠Tech Stack ⢠Installation
Orbit One is an immersive 3D space defense game where players orbit around a star, defending it from incoming asteroids, aliens, and space dragons. Built with modern web technologies, it features stunning neon-cyberpunk aesthetics, real-time 3D graphics, and Web3 wallet integration.
| Technology | Purpose |
|---|---|
| SvelteKit | Full-stack web framework with SSR/SSG support |
| Svelte | Reactive component framework with minimal bundle size |
| Vite | Lightning-fast build tool and dev server |
| Technology | Purpose |
|---|---|
| Three.js | WebGL-based 3D rendering engine |
| Threlte | Svelte bindings for Three.js (declarative 3D) |
| @threlte/core | Core Threlte library |
| @threlte/extras | Additional components (GLTF, Environment, etc.) |
| Technology | Purpose |
|---|---|
| EffectComposer | Three.js post-processing pipeline |
| UnrealBloomPass | Neon glow bloom effects |
| RenderPass / OutputPass | Scene rendering passes |
| Technology | Purpose |
|---|---|
| Svelte Stores | Reactive state management |
| Zustand-style patterns | Game state organization |
| Technology | Purpose |
|---|---|
| Chart.js | Interactive charts (radar, doughnut) |
| Avatar API | Dynamic player avatar generation |
| Technology | Purpose |
|---|---|
| MetaMask | Ethereum wallet integration |
| window.ethereum | Web3 provider detection |
| Technology | Purpose |
|---|---|
| CSS Variables | Theming with neon colors |
| Glass-morphism | Modern frosted glass UI effects |
| CSS Grid/Flexbox | Responsive layouts |
orbitone/
āāā src/
ā āāā lib/
ā ā āāā components/
ā ā ā āāā ui/ # UI Components
ā ā ā ā āāā LoginScreen.svelte # MetaMask + Guest login
ā ā ā ā āāā MainMenu.svelte # Game mode selection
ā ā ā ā āāā UpgradeScreen.svelte # Ship upgrades
ā ā ā ā āāā ShopScreen.svelte # In-game shop
ā ā ā ā āāā SettingsScreen.svelte # Game settings
ā ā ā ā āāā LeaderboardScreen.svelte # Global rankings
ā ā ā ā āāā PlayerProfileModal.svelte # Stats & charts
ā ā ā āāā models/
ā ā ā ā āāā Spaceship.svelte # Player ship model
ā ā ā ā āāā Target.svelte # Enemy models (asteroid, alien, dragon)
ā ā ā āāā Scene.svelte # Main 3D game scene
ā ā ā āāā App.svelte # Root component
ā ā ā āāā ...
ā ā āāā stores/
ā ā āāā gameStore.js # Global game state
ā āāā routes/
ā ā āāā +page.svelte # Main entry point
ā āāā app.css # Global styles
āāā static/
ā āāā orbit one banner.png # Game banner
ā āāā left arrow.png # Navigation icon
ā āāā settings icon.png # Settings icon
ā āāā leaderboard cup.png # Trophy icon
ā āāā shop button.png # Shop icon
ā āāā space.jpg # Background image
āāā package.json
āāā svelte.config.js
āāā vite.config.js
āāā README.md
# Clone the repository
git clone https://github.com/0xsupremedev/orbitone.git
cd orbitone
# Install dependencies
npm install
# Start development server
npm run dev
# Open in browser
# http://localhost:5173
# Create optimized build
npm run build
# Preview production build
npm run preview
| Color | Hex | Usage |
|---|---|---|
| Neon Cyan | #00f2ff |
Primary highlights, glow effects |
| Fiery Orange | #ff6600 |
Warnings, fire effects |
| Fiery Red | #ff0033 |
Health, critical alerts |
| Deep Space | #050a1b |
Background, panels |
The game uses a centralized store (gameStore.js) managing:
{
currentScreen: 'login' | 'main-menu' | 'upgrades' | 'shop' | 'settings' | 'leaderboard' | 'game',
playerName: string,
walletAddress: string, // MetaMask address
credits: number,
coins: number,
gems: number,
score: number,
starHealth: number, // 0-100
isPlaying: boolean,
ownedShips: string[],
selectedShip: string,
settings: { ... },
upgrades: { ... }
}
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the MIT License - see the LICENSE file for details.
0xSupremeDev
Made with š using Svelte, Three.js, and Web3