A fun space shooter game built with TypeScript, HTML5 Canvas, and lots of creativity! Perfect for a 9-year-old gamer and their developer Dad to build and expand together.
- Move: Use arrow keys (←→↑↓) to move your spaceship
- Shoot: Press the spacebar to fire lasers at aliens
- Restart: Press 'R' if you want to start over
- Goal: Shoot as many colorful aliens as possible and get a high score!
- Open
index.htmlin your web browser - The game will work with the compiled JavaScript
- Make sure you have Node.js installed
- Install TypeScript:
npm install - Build the game:
npm run build - Start a local server:
npm start - Open your browser to
http://localhost:8000
- Run:
npm run dev - This will watch for changes and automatically rebuild
- Open
http://localhost:8000in your browser
- Colorful Aliens: Each alien has a random color
- Smooth Movement: Arrow key controls that feel responsive
- Shooting: Space bar to shoot yellow laser bullets
- Collision Detection: Bullets hit aliens, aliens can hit you
- Score System: Get 10 points for each alien defeated
- Starfield Background: Moving stars for that space feeling
- Game Over & Restart: Press 'R' to play again
- Add sound effects (laser sounds, explosion sounds)
- Change alien colors or shapes
- Add more types of bullets (different colors/sizes)
- Make aliens move in different patterns
- Add power-ups (faster shooting, bigger bullets)
- Create different levels with more enemies
- Add a health system (multiple lives)
- Create boss enemies that take multiple hits
- Add particle effects for explosions
- Implement different weapon types
- Add a high score system that saves scores
- Create multiple background themes
- Add multiplayer support
- Create a level editor
- Add mobile touch controls
- Implement a save/load system
- Add achievements and unlockables
- Create an AI opponent
This game is a great way to learn about:
- TypeScript/JavaScript: Classes, objects, functions, and game loops
- HTML5 Canvas: 2D graphics and animation
- Game Programming: Collision detection, game states, and input handling
- Math: Coordinates, movement, and collision calculations
- Problem Solving: Debugging and adding new features
The most important thing is to have fun building and playing together! Try changing the colors, speeds, or adding your own creative ideas. Every great game developer started with simple projects like this.
Happy coding! 🚀👨👩👧👦