A retro-styled dress-up game built with HTML, CSS, JavaScript, and Firebase
Void Avatar Lounge is a web-based dress-up game featuring a black and red terminal aesthetic inspired by Web 1.0 design. Players can create accounts, collect avatar layers, equip items, and trade with other users in a marketplace.
- User Authentication - Register and login with Firebase Auth
- Avatar Customization - Stack PNG/SVG layers to create custom avatars
- Inventory System - Collect and manage avatar items
- Marketplace - Buy and sell items with other players
- Layer Engine - Z-indexed PNG stacking system
- Retro Terminal UI - Web 1.0 inspired black and red design
/
├── index.html # Landing page with auth forms
├── avatar.html # Avatar customization room
├── inventory.html # Item collection management
├── market.html # Player-to-player trading
├── css/
│ └── style.css # Retro terminal styling
├── js/
│ ├── auth.js # Authentication logic
│ ├── avatar.js # Avatar rendering system
│ ├── inventory.js # Inventory management
│ ├── market.js # Marketplace functionality
│ ├── firebase-init.js # Firebase configuration
│ └── setup-data.js # Sample data creation
└── assets/
├── body/ # Base body layer files
├── hair/ # Hair style layers
├── eyes/ # Eye layers
├── top/ # Clothing tops
├── bottom/ # Clothing bottoms
└── accessories/ # Accessory items
- Create a new Firebase project at console.firebase.google.com
- Enable Authentication with Email/Password
- Create a Firestore database
- Get your Firebase config from Project Settings > General > Your apps
- Update
js/firebase-init.jswith your config:
const firebaseConfig = {
apiKey: "your-api-key",
authDomain: "your-project.firebaseapp.com",
projectId: "your-project-id",
storageBucket: "your-project.appspot.com",
messagingSenderId: "123456789",
appId: "your-app-id"
};- Run the sample data setup script:
- Import
js/setup-data.jsin your browser console - Call
setupSampleData()to populate the items collection
- Import
Or manually add items to Firestore in the items collection.
Set up Firestore security rules to protect user data:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Users can only access their own user doc
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
// Users can only access their own inventory
match /inventory/{itemId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
// Users can only access their own equipped items
match /meta/{docId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
}
// All authenticated users can read items
match /items/{itemId} {
allow read: if request.auth != null;
allow write: if false; // Only admins can write items
}
// All authenticated users can read listings
match /listings/{listingId} {
allow read: if request.auth != null;
allow write: if request.auth != null;
}
}
}-
Serve the files with a local web server:
# Using Python 3 python -m http.server 8000 # Using Node.js npx serve . # Using PHP php -S localhost:8000
-
Open
http://localhost:8000in your browser
- Install Firebase CLI:
npm install -g firebase-tools - Login:
firebase login - Initialize:
firebase init hosting - Deploy:
firebase deploy
The application includes sample placeholder SVG files for:
- Base Body - Default character shell
- Eyes - Default eye configuration
- Hair - Black and red hair styles
- Tops - Black tee and red hoodie
- Bottoms - Blue jeans and black pants
- Accessories - Gold chain and silver ring
- Registration/Login - Users create accounts and start with 1000 coins
- Avatar Room - View current avatar with stacked layers
- Inventory - See collected items and equip new ones
- Market - Buy/sell items with other players
- Uses absolute positioning with z-index stacking
- SVG files for scalable placeholder graphics
- Each item can have multiple layers for complex customization
Users Collection:
{
email: "user@example.com",
coins: 1000,
createdAt: timestamp
}Items Collection:
{
displayName: "Item Name",
category: "hair|top|bottom|accessory",
slot: "hair|top|bottom|accessory1|accessory2",
rarity: "common|uncommon|rare",
z: 30,
src: "path/to/layer.svg",
layers: [{ src: "path/to/layer.svg", z: 30 }]
}Inventory Subcollection:
{
acquiredAt: timestamp
}- Create SVG files in the appropriate
assets/folder - Add item data to Firestore
itemscollection - Update
js/setup-data.jsfor future setups
- Edit
css/style.cssfor visual changes - Uses CSS custom properties for easy color theming
- CRT effect can be toggled with
.crtbody class
- Layer animations in
js/avatar.js - Additional inventory slots in the data structure
- More complex pricing/marketplace features
- Modern browsers with ES6 module support
- Chrome, Firefox, Safari, Edge (latest versions)
- Requires JavaScript enabled
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source and available under the MIT License.
Built with Firebase, vanilla JavaScript, and pure CSS. Retro terminal aesthetic inspired by early web design.
Haunt the grid. Stack your layers. Become the dream.