Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 3.93 KB

Contributing.md

File metadata and controls

50 lines (31 loc) · 3.93 KB

Contributing

Delta Client is completely open source and I welcome contributions of all kinds. If you're interested in contributing, you can checkout the delta client issues and delta client website issues ( on GitHub for some tasks. Some of the tasks don't even require Swift! But before you get too excited, make sure that you've read the contributing guidelines, and make sure that your contributions follow them. If you need any help with a contribution, feel free to join the Discord and chat :)

Note: when you've decided on an issue to work on, please leave a comment on it so that everyone else knows not to work on it.

Guidelines

If your contributions follow these guidelines, they'll be much more likely to get accepted first try 👍

  1. Make sure your indent size matches the repository (in the case of delta-client that's 2 spaces).
  2. Be conscious of copyright and don't include any files distributed by Mojang in these repositories.
  3. Be concise, only make changes that are required to achieve your end goal. The smaller your pull request, the faster I'll get around to reviewing it.
  4. Add documentation comments for any methods or properties you create unless their usage is completely self-evident. Be sure to also document potentially unexpected side-effects or non-obvious requirements of methods.
  5. Remove file headers from all files you create, they're unnecessary. swift-bundler will automatically remove them for you whenever you build.
  6. Use log for logging (not just print statements everywhere).
  7. If in doubt, consult Google's Swift style guide because that's the one I try to follow.

Getting setup

Delta Client

Important: Only Xcode 13 is supported, Xcode 12 builds don't work because Delta Client uses new automatic Codable conformance and there are some weird discrepancies between Xcode 12's swift compiler and Xcode 13's swift compiler

Delta Client uses the swift-bundler build system.

You can use any ide you want to work on Delta Client (vscode and xcode are the best supported), but you'll need Xcode installed anyway because sadly that's currently the only way to get Metal and SwiftUI build support.

Next, fork Delta Client and then clone it.

git clone [url of your delta-client fork]
cd delta-client

To run Delta Client, you can run swift bundler run -c release. If you are working on the UI you can leave out the -c release, it is only required when working with computationally intense parts of the client such as rendering, because without optimizations those parts of the client are unusable. See the swift-bundler repo for more commands and options.

If you are using Xcode as your IDE run swift bundler generate-xcode-support and then open Package.swift with Xcode (open Package.swift should work unless you've changed your default program for opening swift files). Make sure to choose the DeltaClient target in the top bar instead of the DeltaClient-Package target.

Note: Xcode puts DeltaCore in the dependencies section of the file navigator instead of at its physical location in the directory structure. This is due to the way the plugin system had to be implemented.

You can now make changes and when you're done, just open a pull request on GitHub.

Website

The website is built with svelte. Just follow these steps to get started;

  1. Fork and clone delta-website
  2. Run npm i
  3. Run npm run dev to start a development server. Whenever you save changes to a file, the page will almost instantly reload with the changes, and most of the time it'll retain its state too (pretty cool)