MineCloneJEpC/CONTRIBUTING.md

335 lines
13 KiB
Markdown
Raw Permalink Normal View History

2021-10-24 20:13:34 +02:00
# Contributing to MineClone2
2022-06-06 23:56:25 +02:00
So you want to contribute to MineCloneJEpC?
2017-02-12 22:02:50 +01:00
Wow, thank you! :-)
2022-06-06 23:56:25 +02:00
MineCloneJEpC is maintained by Lazerbeak12345.
2017-02-12 22:02:50 +01:00
2022-06-06 23:56:25 +02:00
You can help with MineCloneJEpC's development in many different ways,
whether you're a programmer or not.
2021-10-26 11:42:33 +02:00
## MineClone2's development target is to...
2021-10-26 11:42:33 +02:00
- Crucially, create a stable, moddable, free/libre clone of Minecraft
2022-06-06 23:56:25 +02:00
`old_alpha rd-132211` based on the Minetest engine with polished features.
No other features will be added.
2021-10-26 11:42:33 +02:00
- Optionally, create a performant experience that will run relatively
well on really low spec computers. Unfortunately, due to Minecraft's
mechanisms and Minetest engine's limitations along with a very small
playerbase on low spec computers, optimizations are hard to investigate.
2021-10-24 20:13:34 +02:00
## Using git
2022-06-06 23:56:25 +02:00
MineCloneJEpC is developed using the version control system
[git](https://git-scm.com/). If you want to contribute code to the
project, it is **highly recommended** that you learn the git basics.
For non-programmers and people who do not plan to contribute code to
2022-06-06 23:56:25 +02:00
MineCloneJEpC, git is not required. However, git is a tool that will be
referenced frequently because of its usefulness. As such, it is valuable
2021-10-27 18:54:39 +02:00
in learning how git works and its terminology. It can also help you
keeping your game updated, and easily test pull requests.
2021-10-24 20:13:34 +02:00
## How you can help as a non-programmer
As someone who does not know how to write programs in Lua or does not
know how to use the Minetest API, you can still help us out a lot. For
example, by opening an issue in the
[Issue tracker](https://git.minetest.land/MineClone2/MineClone2/issues),
you can report a bug or request a feature.
2021-10-24 20:13:34 +02:00
### Rules about both bugs and feature requests
* Stay polite towards the developers and anyone else involved in the
discussion.
* Choose a descriptive title (e.g. not just "crash", "bug" or "question"
).
2021-10-25 19:25:48 +02:00
* Please write in plain, understandable English. It will be easier to
communicate.
* Please start the issue title with a capital letter.
* Always check the currently opened issues before creating a new one.
Don't report bugs that have already been reported or request features
that already have been requested.
* If you know about Minetest's inner workings, please think about
whether the bug / the feature that you are reporting / requesting is
actually an issue with Minetest itself, and if it is, head to the
[Minetest issue tracker](https://github.com/minetest/minetest/issues)
instead.
2021-10-24 20:13:34 +02:00
### Reporting bugs
* A bug is an unintended behavior or, in the worst case, a crash.
However, it is not a bug if you believe something is missing in the
game. In this case, please read "Requesting features"
2022-06-06 23:56:25 +02:00
* If you report a crash, always include the error message. Post a
screenshot of the message that Minetest showed when the crash happened
(or copy the message into your issue). If you are a server admin, you
can find error messages in the log file of the server.
* Tell us which MineCloneJEpC and Minetest versions you are using.
* Tell us how to reproduce the problem: What you were doing to trigger
the bug, e.g. before the crash happened or what causes the faulty
behavior.
2021-10-24 20:13:34 +02:00
### Requesting features
* Ensure the requested feature fulfills our development targets and
goals.
* Begging or excessive attention seeking does not help us in the
2022-06-06 23:56:25 +02:00
slightest, and may very well disrupt MineCloneJEpC development. It's
better to put that energy into helping or researching the feature in
question.
After all, we're just volunteers working on our spare time.
2022-06-06 23:56:25 +02:00
* Ensure the requested feature has not been implemented in
MineCloneJEpC latest or development versions.
2021-10-24 20:13:34 +02:00
### Testing code
If you want to help us with speeding up MineClone2 development and
making the game more stable, a great way to do that is by testing out
new features from contributors. For most new things that get into the
game, a pull request is created. A pull request is essentially a
programmer saying "Look, I modified the game, please apply my changes
to the upstream version of the game". However, every programmer makes
mistakes sometimes, some of which are hard to spot. You can help by
downloading this modified version of the game and trying it out - then
tell us if the code works as expected without any issues. Ideally, you
would report issues will pull requests similar to when you were
reporting bugs that are the mainline (See Reporting bugs section). You
can find currently open pull requests here:
2022-06-06 23:56:25 +02:00
<https://git.minetest.land/Lazerbeak12345/MineCloneJEpC/pulls>. Note
that pull requests that start with a `WIP:` are not done yet, and
therefore might not work, so it's not very useful to try them out yet.
2021-10-24 20:13:34 +02:00
2021-10-26 14:28:40 +02:00
### Contributing assets
2022-06-06 23:56:25 +02:00
Due to license problems, MineCloneJEpC unfortunately cannot use
2021-10-26 14:28:40 +02:00
Minecraft's assets, therefore we are always looking for asset
contributions. To contribute assets, it can be useful to learn git
basics and read the section for Programmers of this document, however
2022-06-06 23:56:25 +02:00
this is not required.
Contribute your assets upstream to MineClone2, and they will
eventually make it here if it fits within the design goals.
2021-10-26 14:28:40 +02:00
#### Textures
2022-06-06 23:56:25 +02:00
For textures we use the Pixel Perfection texture pack.
2021-10-26 14:28:40 +02:00
#### Sounds
2022-06-06 23:56:25 +02:00
There (should be) no sounds.
2021-10-26 14:28:40 +02:00
#### 3D Models
Most of the 3D Models in MineClone2 come from
[22i's repository](https://github.com/22i/minecraft-voxel-blender-models).
2022-06-06 23:56:25 +02:00
Contribute your assets upstream to MineClone2, and they will
eventually make it here if it fits within the design goals.
2021-10-26 14:28:40 +02:00
2021-11-04 12:26:14 +01:00
#### Crediting
Asset contributions will be credited in their own respective sections in
CREDITS.md. If you have commited the results yourself, you will also be
credited in the Contributors section.
2021-10-26 14:28:40 +02:00
2021-11-04 12:26:14 +01:00
### Contributing Translations
2022-06-06 23:56:25 +02:00
There (should be) nothing to translate.
2021-10-26 14:28:40 +02:00
2021-10-24 20:13:34 +02:00
### Profiling
2022-06-06 23:56:25 +02:00
If you own a server, a great way to help us improve MineCloneJEpC's
code is by giving us profiler results. Profiler results give us
detailed information about the game's performance and let us know
places to investigate optimization issues. This way we can make the
game faster.
2021-10-26 11:59:32 +02:00
#### Using Minetest's profiler
Minetest has a built in profiler. Simply set `profiler.load = true` in
your configuration file and restart the server. After running the server
for some time, just run `/profiler save` in chat - then you will find a
file in the world directory containing the results. Open a new issue and
upload the file. You can name the issue "<Server name> profiler
results".
2021-10-24 20:13:34 +02:00
### Crediting
2022-06-06 23:56:25 +02:00
See `CREDITS.md`
2021-10-24 20:13:34 +02:00
## How you can help as a programmer
2022-06-06 23:56:25 +02:00
(Almost) all the MineCloneJEpC development should be done using pull requests.
2021-10-24 20:13:34 +02:00
2021-10-26 11:55:08 +02:00
### Recommended workflow
2021-10-24 20:13:34 +02:00
* Fork the repository (in case you have not already)
2017-02-12 22:02:50 +01:00
* Do your change in a new branch
2021-04-12 14:03:51 +02:00
* Create a pull request to get your changes merged into master
2021-11-03 21:06:08 +01:00
* Keep your pull request up to date by regularly merging upstream. It is
2021-10-25 19:56:03 +02:00
imperative that conflicts are resolved prior to merging the pull
request.
2021-10-24 20:13:34 +02:00
* After the pull request got merged, you can delete the branch
2021-10-26 11:55:08 +02:00
### Discuss first
If you feel like a problem needs to fixed or you want to make a new
feature, you could start writing the code right away and notifying us
when you're done, but it never hurts to discuss things first. If there
is no issue on the topic, open one. If there is an issue, tell us that
you'd like to take care of it, to avoid duplicate work.
2021-11-03 21:06:58 +01:00
### Maintain your own code, even if already got merged
2021-10-26 11:55:08 +02:00
Sometimes, your code may cause crashes or bugs - we try to avoid such
2021-11-03 21:07:28 +01:00
scenarios by testing every time before merging it, but if your merged
2021-10-26 11:55:08 +02:00
work causes problems, we ask you fix the issues as soon as possible.
### Changing Gameplay
Pull Requests that change gameplay have to be properly researched and
2022-06-06 23:56:25 +02:00
need to state their sources. These PRs also need approval before they
are merged.
2021-10-26 11:55:08 +02:00
You can use these sources:
* Testing things inside of Minecraft (Attach screenshots / video footage
of the results)
* Looking at [Minestom](https://github.com/Minestom/Minestom) code. An open source Minecraft Server implementation
2021-10-26 11:55:08 +02:00
* [Official Minecraft Wiki](https://minecraft.fandom.com/wiki/Minecraft_Wiki)
(Include a link to the specific page you used)
### Stick to our guidelines
2021-10-26 11:55:08 +02:00
#### Git Guidelines
2021-10-24 20:13:34 +02:00
* We use merge rather than rebase or squash merge
* We don't use git submodules.
* Your commit names should be relatively descriptive, e.g. when saying
"Fix #issueid", the commit message should also contain the title of the
issue.
* Try to keep your commits as atomic as possible (advise, but completely
optional)
2021-10-24 20:13:34 +02:00
2021-10-26 11:55:08 +02:00
#### Code Guidelines
2021-10-24 20:13:34 +02:00
* Each mod must provide `mod.conf`.
* Mod names are snake case, and newly added mods start with `mcl_`, e.g.
`mcl_core`, `mcl_farming`, `mcl_monster_eggs`. Keep in mind Minetest
does not support capital letters in mod names.
* To export functions, store them inside a global table named like the
mod, e.g.
```lua
mcl_example = {}
function mcl_example.do_something()
-- ...
end
```
* Public functions should not use self references but rather just access
the table directly, e.g.
```lua
-- bad
function mcl_example:do_something()
end
-- good
function mcl_example.do_something()
end
```
* Use modern Minetest API, e.g. no usage of `minetest.env`
* Tabs should be used for indent, spaces for alignment, e.g.
```lua
-- use tabs for indent
for i = 1, 10 do
if i % 3 == 0 then
print(i)
end
end
-- use tabs for indent and spaces to align things
some_table = {
{"a string", 5},
{"a very much longer string", 10},
}
```
* Use double quotes for strings, e.g. `"asdf"` rather than `'asdf'`
* Use snake_case rather than CamelCase, e.g. `my_function` rather than
`MyFunction`
2021-10-26 11:55:08 +02:00
* Don't declare functions as an assignment, e.g.
```lua
-- bad
local some_local_func = function()
-- ...
end
my_mod.some_func = function()
-- ...
end
-- good
local function some_local_func()
-- ...
end
function my_mod.some_func()
-- ...
end
```
2021-10-24 20:13:34 +02:00
### Developer status
2022-06-06 23:56:25 +02:00
Active and trusted contributors may be granted write access to the
MineCloneJEpC repository.
#### Developer responsibilities
- You should not push things directly to
2022-06-06 23:56:25 +02:00
MineCloneJEpC master - rather, do your work on a branch on your private
2021-11-03 21:08:11 +01:00
repository, then create a pull request. This way other people can review
your changes and make sure they work before they get merged.
2021-11-04 12:21:06 +01:00
- Merge PRs only when they have recieved the necessary feedback and have
been tested by at least two different people (including the author of
the pull request), to avoid crashes or the introduction of new bugs.
- You may also be assigned to issues or pull
requests as a developer. In this case it is your responsibility to fix
the issue / review and merge the pull request when it is ready. You can
also unassign yourself from the issue / PR if you have no time or don't
want to take care of it for some other reason. After all, everyone is a
2021-11-03 21:09:13 +01:00
volunteer and we can't expect you to do work that you are not interested
in. **The important thing is that you make sure to inform us if you
won't take care of something that has been assigned to you.**
- Please assign yourself to something that you want to work on to avoid
duplicate work.
- As a developer, it should be easy to reach you about your work. You
should be in at least one of the public MineClone2 discussion rooms -
preferrably Discord, but if you really don't like Discord, Matrix
or IRC are fine too.
2021-10-24 20:13:34 +02:00
### Maintainer status
Maintainers carry the main responsibility for the project.
#### Maintainer responsibilities
- Making sure issues are addressed and pull requests are reviewed and
merged, by assigning either themselves or Developers to issues / PRs
- Making releases
- Making sure guidelines are kept
2021-11-03 21:14:22 +01:00
- Making project decisions based on community feedback
- Granting/revoking developer access
- Enforcing the code of conduct (See CODE_OF_CONDUCT.md)
- Moderating official community spaces (See Links section)
- Resolving conflicts and problems within the community
#### Current maintainers
2022-06-06 23:56:25 +02:00
* Lazerbeak12345 - I do it all, but may forward things upstream to MineClone2
2021-10-24 20:13:34 +02:00
#### Release process
* Run `tools/generate_ingame_credits.lua` to update the ingame credits
from `CREDITS.md` and commit the result (if anything changed)
2021-01-26 17:21:05 +01:00
* Launch MineClone2 to make sure it still runs
* Update the version number in README.md
* Use `git tag <version number>` to tag the latest commit with the
version number
* Push to repository (don't forget `--tags`!)
* Update ContentDB
(https://content.minetest.net/packages/Wuzzy/mineclone2/)
* Update first post in forum thread
(https://forum.minetest.net/viewtopic.php?f=50&t=16407)
2021-01-26 17:21:05 +01:00
* Post release announcement and changelog in forums
2021-10-24 20:13:34 +02:00
### Licensing
By asking us to include your changes in this game, you agree that they
fall under the terms of the GPLv3, which basically means they will
2021-11-04 12:56:34 +01:00
become part of a free/libre software.
2021-10-26 11:42:33 +02:00
### Crediting
Contributors, Developers and Maintainers will be credited in
`CREDITS.md`. If you make your first time contribution, please add
2022-06-06 23:56:25 +02:00
yourself to this file.