# Contributing to Massive Game Server: The Fun-tribution Guide! *(Or, "How to Help Us Make This Thing Even More Massively Awesome")* First off, a HUGE thank you for even *thinking* about contributing to the Massive Game Server project! You're clearly a person of discerning taste and probably excellent at untangling Christmas lights. We're stoked to build a community that's ready to smash records in large-scale multiplayer interactions. Your brainpower is welcome, whether you're squashing bugs like a pro, dreaming up features that make players go "WHOA!", or slinging brilliant code. This document is your treasure map to contributing. Please give it a once-over before diving into the glorious fray. ## How Can I Contribute? (AKA "Choose Your Adventure!") There are many paths to glory and contributing to the Massive Game Server: * **Reporting Bugs (The Digital Exterminator):** Found a glitch in the matrix? A player phasing through walls? A bot convinced it's a teapot? Please, oh please, open an issue on GitHub! The more gory details, the better: * Steps to reproduce (so we can experience the chaos too). * What you *thought* would happen (the dream). * What *actually* happened (the often hilarious reality). * Server logs (the server's diary of despair). * Client console output (the client's cries for help). * Your environment (OS, browser, Rust version, favorite snack during coding – okay, maybe not the last one, but you get the idea). * **Suggesting Enhancements (The Idea Spark-plug):** Got a brilliant idea that'll make this server 10x cooler? Or a tweak that'll shave off precious microseconds? Don't keep it to yourself! Open an issue and let's brainstorm. We're all ears for performance boosts, scalability epiphanies, and gameplay mechanics that scream "MASSIVE!" * **Writing Code (The Code Whisperer):** If your fingers twitch to write some Rust, JavaScript, or even just elegant comments: * Check out issues tagged `"help wanted"` or `"good first bug"` (our gentle on-ramp to coding stardom). * Got a bigger vision? Pop open an issue first to chat about your grand plans. This helps us avoid two people accidentally building the same awesome (or catastrophically different) thing. * Then, follow the sacred Development Workflow scroll (see below). * **Improving Documentation (The Loremaster):** Is our documentation as clear as mud? Or perhaps *too* clear and lacking in witty anecdotes? Submit a PR with your edits or open an issue. Good docs are like a well-oiled trebuchet – essential for launching great things. * **Testing (The Constructive Demolition Expert):** Help us find the breaking points! Stress-test the server, try out new features with the enthusiasm of a toddler with a new toy, and help us pinpoint those sneaky performance bottlenecks. * **Providing Feedback (The Wise Sage):** Your thoughts on the project's direction, features, and whether the current shade of blue in the client is *really* working for us – all are welcome. ## Development Workflow (The Sacred Rituals) 1. **Fork the Repository (Claim Your Own Slice of the Code Pie):** Hit that "Fork" button on the `massive_game_server` GitHub page. It's like getting your own sandbox, but with more code and fewer cats. 2. **Clone Your Fork (Bring It Home):** ```bash git clone [https://github.com/YOUR_USERNAME/massive_game_server.git](https://github.com/YOUR_USERNAME/massive_game_server.git) cd massive_game_server ``` 3. **Create a Branch (Your Secret Laboratory):** Name it something that gives us a clue, like `feat/flaming-death-lasers` or `fix/server-occasionally-thinks-its-a-toaster`. ```bash git checkout -b your-super-descriptive-branch-name ``` 4. **Set Up Your Environment (The Pre-Flight Checklist):** Make sure you've got all the goodies from the main `README.md` (Rust, Cargo, `flatc`). No one likes a build that fails because of a missing ingredient. 5. **Make Your Changes (The Magic Happens Here!):** * Write code that's cleaner than your room after a visit from your parents. Well-commented too! * We bow to the mighty `rustfmt` for Rust. Let its wisdom guide your formatting. * **FlatBuffers Alert!** If you meddle with the sacred scrolls of `protocol/schemas/game.fbs` (and keep `server/schemas/game.fbs` mirrored): * Server-side Rust code: `cargo build` will magically invoke `build.rs` to do your bidding. * Client-side JS/TS: Unleash `scripts/generate_flatbuffers.sh` to appease the client gods. * Unit tests are your friends. They catch regressions before they embarrass you in a PR. * **Performance is King!** This is a *massive* game server. Changes that slow things down will be met with sad trombone sounds. 6. **Test Your Changes (Did It Work, Or Did You Unleash Cthulhu?):** * Run `cargo test` in the `server` directory. Appease the testing spirits. * Build and run the server (`cargo run --release` in `server`). Does it chug? Does it sprint? * Connect with the static client (`static_client/client.html`). Did your feature appear, or did the client just show a blank page of existential dread? * Performance changes? Benchmark it! Stress it! Make it sweat! 7. **Commit Your Changes (Etch Your Genius into History... or at least Git):** Make your commit messages a story, a haiku, or at least something better than "stuff." ```bash git add . git commit -m "feat: Implemented ultra-scalable player sneezes" ``` 8. **Push to Your Fork (Release the Hounds... of Code!):** ```bash git push origin your-super-descriptive-branch-name ``` 9. **Open a Pull Request (PR) (The "Pretty Please With a Cherry On Top" Request):** * Head to the original `TrebuchetNetwork/massive_game_server` GitHub. * GitHub should be practically screaming at you to make a PR from your branch. Click it. * Title: Make it shine! Description: Explain your masterpiece. Why is it awesome? What problem does it solve? What mysteries of the universe does it unravel? * Link to relevant issues (e.g., "Fixes the server's existential crisis outlined in #42"). * Target `main` (or the current dev branch, we'll let you know). 10. **Code Review (The Gauntlet of Friendly Scrutiny):** * Our maintainers will gaze upon your work. They might ask questions. They might suggest changes. It's all part of the process to make the code even *more* awesome. * Once everyone's happy and the CI robots give their blessing, your code will be merged into the collective! Confetti may or may not be involved. ## Coding Conventions (The Unwritten Rules... Written Down) * **Rust:** `rustfmt` is our benevolent style dictator. `cargo fmt` is your friend. Clippy (`cargo clippy`) is that slightly pedantic but usually right friend. Listen to them. * **JavaScript/TypeScript (Client):** Stick to common sense and good practices. If you're doing a major client overhaul, let's chat about linters. * **Commit Messages:** Again, make them useful. Future you (and us) will thank you. "Fixed stuff" isn't a story. * **Comments:** Explain your genius (or your temporary madness that somehow works). If the code is as complex as a Rube Goldberg machine, document the important bits. ## Issue Tracking (The Grand List of Adventures and Misadventures) * GitHub Issues is the place. Bugs, features, existential ponderings about the server's purpose – it all goes there. * Before you unleash your brilliant new issue, do a quick search. Someone might have already had the same brilliant idea (or encountered the same horrifying bug). * Details, details, details. The more info, the better we can help or understand. ## Communication (How We Talk About All This Cool Stuff) * **GitHub Issues & Pull Requests:** For the nitty-gritty of changes and bugs. * **[Future Placeholder]:** *If we summon a Discord server from the digital ether, or a forum, or start a carrier pigeon network, we'll tell you here.* ## Code of Conduct (The "Be Excellent To Each Other" Mandate) Yes, we have one! It's the "Funny but Serious Edition" and it's probably in a file called `CODE_OF_CONDUCT.md`. By participating, you agree to be excellent. If someone's not being excellent, please let the designated authorities know. --- A GIGANTIC thank you for wanting to make the Massive Game Server even more... well, massive and server-y! We're genuinely thrilled to see what you bring to the table. Let's build something legendary!