Workflow: Difference between revisions
Line 86: | Line 86: | ||
## Publish the store changes for the server | ## Publish the store changes for the server | ||
## Publish the store changes for the client | ## Publish the store changes for the client | ||
# Restart the Lobby. | |||
# Publish the changelog as a [http://steamcommunity.com/games/empires/announcements/create steam announcement] | # Publish the changelog as a [http://steamcommunity.com/games/empires/announcements/create steam announcement] | ||
# Publish the changelog to [https://reddit.com/r/Empires Reddit] | # Publish the changelog to [https://reddit.com/r/Empires Reddit] |
Revision as of 06:16, 31 May 2019
This page describes the workflow from a concept until release. Try to follow this when developing a new feature or releasing a new Empires version.
If you're working on something that impacts user experience or gamedesign, please look at the Guiding Principles
Creating an Issue
To ensure we don't duplicate effort and to allow team members to see what we're working on we add a short description of the thing we're trying to fix / achieve to an issue on the internal issue tracker.
An issue is a new feature, known bug, known exploit or anything that requires developer work/discussion.
When adding an issue, try to stick to formulating it as a user story. This makes it easier to evaluate whether a proposed change actually fixes the issue. To help discoverability you can add relevant tags.
If you plan on working on the issue yourself, be sure to assign yourself to it. For more information on how you can effectively use issues you can refer to the official issue documentation.
Cloning the Relevant Repository
If you've already performed this step in the past you can ignore this section
- Make sure you have an account on the internal gitlab and have received the appropriate permissions.
- Make sure you have added your public key to your acccount.
- Clone
git@git.empiresmod.com:empires_assets/empires_build.git
in a location of your choosing. Make sure you have at least 30gb free space. - Double click the
setup.bat
file on Windows or thesetup
file on Linux and wait for the process to finish. - Double click the
preview.bat
file on Windows or thepreview
file on Linux and wait for the process to finish. - You should now have a development version of Empires you can run in your preview folder.
C++ development setup
To get started with C++ development you just need to checkout empires_main and copy the file from steam (Steam\steamapps\common\Empires\empires) to empires_main/mp/game/empires. For more details on Visual Studio setup check the README in the repo.
If you also want to make changes to assets_base and empires_scripts and test them with your C++ changes, you can best checkout those repos next to the empires_main repo and then edit empires_main/mp/game/empires/gameinfo.txt
SearchPaths { game+mod |gameinfo_path|../../../../assets_base // <<--- Add this game+mod |gameinfo_path|../../../../empires_scripts // <<--- Add this game+mod |gameinfo_path|custom/*
Creating a New Branch
- Figure out which repository you should be editing. The
repos
folder contains a list of all the repositories you have access to. - Figure out if the issue you're working on should be categorized as a bugfix or as a feature. Bugfixes are changes which don't change the intended behavior of the game but purely fix a previous mistake. The rest are features.
- Create a new branch named
bugfix/your-description
orfeature/your-description
based on the master or develop branch. (Not all repositories have a develop branch, use master in that case) - Start working on this branch and regularly commit your changes. You can create a new preview for testing by clicking the preview script again. This will include the changes you just made.
Creating a Merge Request
- Push your changes to the remote server. In the console output you'll see a link you can visit to create a new merge request. If there is no link you can also manually go to the project in gitlab and click on the New Merge Request button under the Merge Request tab.
- Give the merge request a descriptive title and mention the issue number in the description as follows:
#123
- If your changes are not yet done or they don't yet pass all the build tests it's recommended to prefix the name of your merge request with
WIP:
. This is a signal to reviewers that they should wait a bit until they spend time reviewing the change. - Try to describe in the description field what you had to change and why.
- Configure the merge request to delete the source branch when it is merged. If you don't know how to do this you can skip this step.
Reviewing a Merge Request
- Start with a code review. A code review is meant to improve code quality and distributes knowledge about the codebase between team members. Code review is not meant to catch errors / bugs although it's not a problem if it does. Try to review the code on the following areas:
- Feature Completion (Does this change actually address the issue referenced)
- Side Effects (Does this change only impact the issue or does it negatively influence other features)
- Readability and Maintenance (The codebase is now 10+ years old and will probably have to be used for a long time, make sure we don't reduce our velocity)
- Consistency (Does the code look the same as the surrounding code and does it solve problems in the same way as we do elsewhere)
- Performance (If we can improve performance without impacting Readability and Maintenance or other side effects we should probably do so. When in doubt, measure the performance using profiling).
- Simplicity (Simpler code is usually better, even when it reduces performance)
- Reuse of Existing Code (A lot of our code looks copy pasted, we can reuse a lot more than we currently do. Try to review whether there is code that can be reused)
- Source Files (Make sure we have source files for all compiled assets that are in the merge request)
- Test the code. Check out the code and create a preview to test with on a local listen server.
- If everything works as intended add a thumbs up smiley as a response.
Merging Requests Into Alpha
You generally want to merge bugfixes as fast as possible. If you plan on releasing another point release (2.14.3 -> 2.14.4) you should probably wait with merging new features. Merging new features usually results in more bugs so queuing them for the next minor release (2.14.3 -> 2.15.1) is advised.
Once the Continuous Integration has been run after the merge you can press the play button on the empires_build Pipelines tab for the newly created version. After that has finished the alpha branch on Steam should have the latest development build. If you don't have the alpha branch on steam, please ask for the password on Hipchat.
Preparing a Beta Release
- Update the version in the alpha branch. Never release the game twice with the same version number, it'll cause weird issues if people try to connect to servers with the wrong version.
- Add the changes in this release to the Changelog.
- Push the new release to alpha.
- Create a new merge request from alpha to beta. Make sure to uncheck the box that removes the source branch.
- Test the alpha with some developers. If you encounter issues, fix them before releasing to beta.
Preparing a Full Release
- Merge the pull request from alpha to beta
- Schedule a beta test and a beta server.
- If you encounter issues, prepare a new Beta Release with a new version number until you're ready to release it.
Releasing a New Version
- On the Steam Partner page:
- Publish the latest beta to the default channel for the server
- Publish the latest beta to the default channel for the client
- Update the dedicated server version for the client
- Publish the store changes for the server
- Publish the store changes for the client
- Restart the Lobby.
- Publish the changelog as a steam announcement
- Publish the changelog to Reddit
- Publish the changelog to the forum
- Publish the changelog to Moddb
- Publish the changelog to Discord