Skip to content

kamiri-charles/add-one-line-of-code

Repository files navigation

🎮 add-one-line-of-code

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.


💡 What's the Idea?

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!


🚀 Live Demo

🌐 Click here to play the latest version
🔁 Updates automatically with every merged PR!


🛠 Tech Stack

  • TypeScript
  • HTML5 Canvas
  • Vite (fast dev environment)
  • GitHub Pages (for deployment)

🧑‍💻 How to Contribute

✅ We welcome PRs from everyone — especially first-timers!

🧩 Step-by-Step:

  1. Fork this repo
  2. Clone your fork locally
  3. npm install
  4. npm run dev to start the dev server
  5. Make your change (at least one line!)
  6. Edit contributors.ts and add your GitHub username as one line.
  7. git commit -m "Added a jump sound" (or similar)
  8. 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


🧠 What Can I Add?

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.


👥 Contributors

We display all contributors in-game in the credits screen (coming soon!).
You can also see them here:
➡️ GitHub Contributors


📄 License

MIT License


💬 Join the Discussion

Have questions or ideas? Start a discussion or open an issue!


⭐️ Why Star This Repo?

Starring helps others discover this project.
If you like the idea — give it a ⭐️!


Made with ❤️ and one line at a time

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •