A fun 2-player character collector game designed for kids! Players select their favorite characters and compete to collect prizes in various game modes.
Play at: charactercollector.nickjantz.com
- Gamepad Support - Full gamepad support for both players
- Keyboard Controls - Arrow keys (Player 1) and WASD (Player 2)
- 1-2 Players - Play solo or with a friend
- Three Game Modes:
- Free Play - Collect as many prizes as you can, no time limit
- Race - First to 15 prizes wins!
- Countdown - 60-second timer, highest score wins
- Character Selection - Choose from multiple characters
- Character-Specific Prizes - Each character collects their own unique prize type
- Connect your gamepad(s) or use keyboard controls
- Select your character by navigating with D-pad/stick and pressing A
- Choose a game mode (Free Play, Race, or Countdown)
- Press A again when the Start button is highlighted to begin!
Player 1:
- Keyboard: Arrow Keys (↑ ↓ ← →)
- Gamepad: Left stick/D-pad to move, A to select/confirm
Player 2:
- Keyboard: WASD keys
- Gamepad: Left stick/D-pad to move, A to select/confirm
Game Controls:
- Move your character to collect prizes
- Characters wrap around screen edges
- Each character can only collect their specific prize type
- Prizes disappear after 10-15 seconds (throb in last 3-5 seconds)
Characters are configured in config.json. To add a new character:
- Add the character image to
images/characters/(e.g.,images/characters/mycharacter.png) - Add the prize image to
images/prizes/(e.g.,images/prizes/myprize.png) - Add an entry to
config.json:
{
"id": "mycharacter",
"image": "images/characters/mycharacter.png",
"prize": "images/prizes/myprize.png",
"prizeType": "myprize",
"playerName": "My Character"
}Note: If a prize image is missing, the game will use a colored star fallback.
See CONFIG_GUIDE.md for detailed configuration options.
/
├── index.html # Main HTML file
├── style.css # Styles
├── config.json # Character and game configuration
├── render.yaml # Render deployment configuration
├── images/
│ ├── characters/ # Character images
│ └── prizes/ # Prize images
└── js/
├── main.js # Entry point
├── state.js # State management
├── config.js # Config loading
├── player.js # Player class
├── prize.js # Prize class
├── game.js # Game logic
├── input.js # Input handling
├── selection.js # Character/mode selection
├── gamemode.js # Game mode management
└── ui.js # UI updates
- Clone the repository
- Serve the files with a local web server:
# Using Python 3
python3 -m http.server 8000- Open
http://localhost:8000in your browser
Note: The game requires a web server (not just opening the HTML file) due to ES6 modules and JSON loading.
This project is configured for deployment on Render as a static site.
- Push your code to GitHub
- Connect your repository to Render
- Create a new Static Site service
- Render will automatically detect the
render.yamlconfiguration - Your site will be live at your Render URL
The render.yaml file configures:
- Static site serving
- Automatic
index.htmlserving at root path - SPA routing support (all paths serve
index.html)
- No time limit
- No score limit
- Collect as many prizes as you can
- Perfect for casual play
- First player to reach 15 prizes wins
- Progress bars show each player's progress
- Game ends when a player reaches the target
- 60-second timer
- Collect as many prizes as possible
- Highest score wins when time runs out
- Timer displayed in center of screen
- Pure JavaScript - No frameworks, vanilla ES6 modules
- HTML5 Canvas - For game rendering
- Gamepad API - Native browser gamepad support
- Tailwind CSS - For styling (via CDN)
- State Management - Custom lightweight state system
- Modern browsers with ES6 module support
- Gamepad API support (Chrome, Firefox, Edge)
- Canvas API support
This project is for personal/family use.