--- menu: after: name: Developer docs weight: 5 title: Developer docs --- # Contributing to Blastmud ## Get the source * [Main Blastmud game](https://git.blastmud.org/blasthavers/blastmud) - includes the listener that accepts connections, and the gameserver. * [This website (including WebSocket play interface)](https://git.blastmud.org/blasthavers/blastmud-site) * [Android app](https://git.blastmud.org/blasthavers/blastmud-android) ## Making changes Make changes and test them locally (see dev env setup). If everything works correctly, submit a PR. Feel free to discuss in an issue first before starting work - we can tell you if we think your idea is a good idea. PRs are reviewed, and if we think it is appropriate for the game, it will be merged to main by a member of the core (Wizards) team. Merged PRs are tested, and if tests pass, they are automatically deployed. You can watch the status of the deployment over at [https://concourse.blastmud.org/]. Note that changes to the gameserver can be made without disconnecting all users, due to the design of the game. Changing the listener is a larger affair because it involves disconnecting all users. Confining your changes to the gameserver part of the code will mean we need to do less coordination to deploy it. If you propose a change to us, you agree that unless you explicitly state otherwise, you grant everyone a licence to use it under the same licence terms (as documented in the LICENSE file) as the other code in the repository you are contributing to. ## Rules to increase the chances your change will be accepted * The game must stay within [the guidelines](https://www.legislation.gov.au/Details/F2023L01424) to be rated as PG in Australia, rather than M, MA15+, R18+ or Refused Classification (i.e. illegal to distribute in Australia). No content that would make it RC can be accepted - this includes any content about any form of sexual violence, characters under 18 years of age (due to the interaction with the nature of this game), detailed instruction or promotion in crime or violence, incest or hard fetishes, or incentivised drug use (including any kind of buff from anything that could be construed as drugs). No PRs or other content of the kind described under this point may be submitted to any Blastmud resource (i.e. this restriction does not apply solely to PRs for the main branch). To avoid a higher classification, it is also necessary that violence remains mild and infrequent (taking the game as a whole), and that there is nothing more than infrequent discreet references to sexual activity (and not related to incentives / rewards). * Your change shouldn't compromise security or privacy. It shouldn't create a risk that users can execute arbitrary code, access confidential information, misuse resources, or deny service to users. It should respect the privacy of users and not use personally-linked information for any purpose not mentioned in the privacy policy. It should not leak secrets such as deployment keys or the actual IP addresses of the systems on which Blastmud is deployed (other than the public proxy). * Your change should be appropriate to the theme of the game. * Your change should be safe to roll-back if it doesn't work correctly (if this is genuinely not possible, please discuss it with us). * Your game should ensure the game remains balanced and fair both for players who primarily want to engage in PvE play, and those who want to engage in PvP with other willing participants. ## Setting up a blastmud development environment * Check it out locally with git. `git clone https://git.blastmud.org/blasthavers/blastmud.git`. * Ensure you have Rust installed. Visit [https://rustup.rs/](https://rustup.rs/) for help getting started. * Run `cargo test && cargo build` to test and install the code. * Setup postgresql. See [the Postgres docs](https://www.postgresql.org/docs/current/tutorial-install.html) for help. Create a postgresql database (in these instructions, I assume you call it blast) and user (called `blast` in these instructions as well) for Blastmud. * Run `psql -d template1 <schema/schema.sql` as a user with access to create databases. * Install migra - `pip3 install migra`. * Diff the blast DB from the temporary blast_schemaonly DB with `migra "postgres:///blast" "postgres:///blast_schemaonly" > /tmp/update.sql` * Check `/tmp/update.sql` and if it looks good, apply it with `psql -U blast -d blast