Welcome to add-one-line-of-code — the open source 2D web game where anyone can contribute by adding just one line of code! 🎉
This is a collaborative and beginner-friendly project designed to evolve one line at a time. Whether you're new to coding, curious about game development, or just want to leave your mark — you're in the right place.
We’ve built a super simple 2D game using TypeScript and HTML Canvas. But here’s the twist:
💬 Every contribution should add at least one line of code.
One line can:
- Add a platform
- Spawn an enemy
- Play a sound
- Change the player color
- Create a new level
- Add a new message
- ...or do something weird and fun!
Let’s build a game together, one line at a time — or more if it makes sense!
🌐 Click here to play the latest version
🔁 Updates automatically with every merged PR!
- TypeScript
- HTML5 Canvas
- Vite (fast dev environment)
- GitHub Pages (for deployment)
✅ We welcome PRs from everyone — especially first-timers!
- Fork this repo
- Clone your fork locally
npm install
npm run dev
to start the dev server- Make your change (at least one line!)
- Edit contributors.ts and add your GitHub username as one line.
git commit -m "Added a jump sound"
(or similar)- Push & open a pull request
✅ Your PR should add at least one meaningful line of code
✅ Add a comment in your PR explaining what your line(s) do!
Looking for ideas or a place to start?
👉 Check out our good first issues
✨ If you're new to GitHub, check out our Beginner Guide to Git + PRs
Get creative — it's part of the fun!
You’re also welcome to make small fixes, improvements, or features that need more than one line if they make sense and stay within the project's spirit.
We display all contributors in-game in the credits screen (coming soon!).
You can also see them here:
➡️ GitHub Contributors
Have questions or ideas? Start a discussion or open an issue!
Starring helps others discover this project.
If you like the idea — give it a ⭐️!
Made with ❤️ and one line at a time