Difference between revisions of "Development:CyanWorlds.com Engine"

(Add autocrlf instructions)
 
(28 intermediate revisions by 6 users not shown)
Line 1: Line 1:
=Git=
+
The Guild of Writers development team, H'uru, is currently developing a fork of the [[CyanWorlds.com Engine]
The Guild of Writers fork of the CyanWorlds.com Engine uses [http://git-scm.com git] for its source control needs. If you're already familiar with git, some of these instructions may seem obvious to you. If you're not familiar with git, it is recommended that you read through some of the excellent articles in the [http://help.github.com/ GitHub help area].
+
(formerly known as Plasma). This article provides information on the development process of this fork.
  
=Dependencies=
+
== Building ==
* [http://cmake.org CMake]. When you install, make sure you tell the installer to add CMake to the system PATH.
+
If you want to build CWE for yourself using H'uru's fork, you should consult the [[CWE:Getting Started|getting started tutorial]] to help you compile and set up a fully working client. Additionally, a (slightly outdated) [http://www.youtube.com/watch?v=HZbMf5W67UI video tutorial] has been made available.
* PhysX 2.6.4. This is available from NVIDIA's [http://developer.nvidia.com/physx-downloads PhysX Developer Center]
+
* [http://connect.creativelabs.com/openal/Downloads/OpenAL11CoreSDK.zip Creative Labs' OpenAL SDK 1.1]
+
* The November 2008 [http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5493f76a-6d37-478d-ba17-28b1cca4865a DirectX SDK]
+
* The [http://guildofwriters.com/tools/devlibs.zip CWE development libraries bundle]
+
* Microsoft Visual Studio 2008 SP1. The express edition is not supported at this time.
+
  
=Building the Code=
+
== Contributing ==
==Getting the Code==
+
GitHub provides a robust set of tools to allow you to easily share your changes with the main Guild repository. These tools revolve around two concepts: forks and [http://help.github.com/pull-requests/ pull requests].
''If you intend to contribute to the codebase, you should follow the '''''Getting the Code''''' section below under '''''Contributing'''.
+
* First, you'll need git. Follow the first section of the [http://help.github.com/win-set-up-git/ Windows git setup guide]. You don't need a GitHub account if you just want read-only access, and you don't need to generate an SSH key. This page will assume you install both the "Git Bash" and "Git GUI" context menu options, so please do so.
+
* Open Git GUI from the Start menu, and click "Clone Existing Repository"
+
* Enter <code>git://github.com/H-uru/Plasma.git</code> as the source, and select your preferred destination folder.
+
* Click 'Clone'
+
* Congratulations, you've now got a copy of the CyanWorlds.com Engine sources
+
  
==Configuring and Building==
+
Using a GitHub fork, you can develop your changes in a repository that you have full access to. Once you're ready to share that change, you can issue a pull request. The GoW development team will be notified and we'll review your changeset for inclusion. After a few good patches, you will probably be offered direct access to the GoW repository, meaning faster turn around for your patches and less management work for the core dev team.
''If you haven't already, make sure you've installed and unpacked all the files listed in the '''''Dependencies''''' section. If you're not using Visual Studio 2008, you may need to build some or all of these dependencies yourself.''
+
  
* Open a Visual Studio 2008 command prompt
+
It is recommended that when you begin work on a bugfix or feature, you do so in a git branch. This will make it easier for us to merge your changes into the main repository. Try to avoid merging other branches into your work branch (including updates to master). The cleaner your branch is the easier it will be to integrate.
* run the command <code>set CMAKE_PREFIX_PATH="C:\cwe-prefix\"</code>, where '''C:\cwe-prefix\''' is the directory where you unpacked the development libraries bundle
+
* run <code>cmake-gui</code>.
+
* Select your clone of the Plasma repository as the source directory, and select a build directory. <code>source_directory\build</code> is recommended.
+
* Click '''Configure''', and select either ''Visual Studio 9'' or ''nmake makefiles''. If you aren't sure, go with ''Visual Studio 9''.
+
* CMake won't automatically find PhysX or OpenAL.
+
**For PhysX, set '''PHYSX_SDK_PATH''' to <code>C:\physx_2.6.4\SDKs\</code> (replace <code>C:\physx_2.6.4</code> with your PhysX SDK installation path).
+
**For OpenAL, you'll need to select both the include directory and the library. For a default OpenAL SDK install, these will be <code>C:\Program Files\OpenAL 1.1 SDK\include</code> and <code>C:\Program Files\OpenAL 1.1 SDK\libs\Win32\OpenAL32.lib</code>
+
* Click ''Configure'' again
+
* Click ''Generate''
+
  
You should now have a complete Visual Studio 2008 build environment (either a solution or nmake file). You can now compile and debug the code.
+
Once you are satisfied with your work, you should issue a [http://help.github.com/pull-requests/ pull request], which will let us know that you are ready for your changes to be merged into the main branch of development--the master branch. Once you have submitted your pull request, we will review your code and ask any applicable questions. Once your code passes our review(s), we will merge it into the master branch.
  
=Contributing=
+
=== Code Guidelines ===
GitHub provides a robust set of tools to allow you to easily share your changes with the main Guild repository. These tools revolve around two concepts: forks and pull requests.
+
To improve the chance of your contributions being accepted, please consider the following guidelines.
 
+
Using a GitHub fork, you can develop your changes in a repository that you have full access to. Once you're ready to share that change, you can issue a pull request. The GoW development team will be notified and we'll review your changeset for inclusion. After a few good patches, you will probably be offered direct access to the GoW repository, meaning faster turn around for your patches and less management work for the core dev team.
+
  
It is recommended that when you begin work on a bugfix or feature, you do so in a git branch. This will make it easier for us to merge your changes into the main repository.
+
* Indentation should be 4 ''spaces''. '''Tabs will not be accepted.''' Be sure to change your Visual Studio text editor settings to ''insert spaces'' if you have not already!
==Forking the Code==
+
* More detailed code guidelines are maintained on [https://github.com/H-uru/Plasma/wiki/Preferred-Code-Style Github]
* The first thing you'll need is an [https://github.com/signup/free account at GitHub]. Once you have an account, you should follow all the steps in the [http://help.github.com/win-set-up-git/ Windows git setup guide]. This page will assume you install both the "Git Bash" and "Git GUI" context menu options, so please do so.
+
* Run <code>git config --global core.autocrlf true</code> '''''Note:''' If you're familiar with git, you may wish to enable this on a per-repository basis instead of globally'.'
+
* Go  to the [http://github.com/H-uru/Plasma Plasma repository page].
+
* Click the 'fork' button
+
* Open Git GUI from the Start Menu, and click "Clone Existing Repository"
+
* Enter the SSH clone URL from your GitHub This should be of the form <code>git@github.com:''username''/Plasma.git</code>, and select your preferred destination folder
+
* Click 'Clone'
+
* Congratulations, you've now got a copy of the CyanWorlds.com Engine sources
+
''If you came here from '''''Building the Code''''', you can continue with '''''Configuration''''' in that section now.''
+
  
==Sharing Changes==
+
== Roadmap ==
''If you need help comitting changes and pushing them to your local GitHub repository, please read some of the excellent documentation in the [http://help.github.com/ GitHub help area], or join us in IRC.''
+
Short version: There is none. This is open-source software, and each developer works on what he (dis)likes most. Since we do that in our free time, there is little point in trying to make us do something we do not want.
  
When you're ready, you'll probably want to share your changes with the main Guild of Writers repository. This is very easy!
+
That said, the efforts of many developers are currently aimed at making CWE cross-platform, so that it runs natively on Linux and Mac. This requires rewriting the network code, replacing the physics engine and adding an alternative rendering backend. Another major goal is to eliminate code duplication and code smells. However, if you want to work on any other area, that's perfectly fine! Here's the current [[Open Source Task List|task list for open source]]. There is also an alternate roadmap being maintained by developers on [https://github.com/H-uru/Plasma/wiki/Roadmap Github].
  
* Go to the GitHub page for your copy of the Plasma repository. This should be <code>http://github.com/''username''/Plasma</code>.
+
[[Category:Projects]]
* If you're trying to share a branch (the recommended route), click the "Switch Branch" button to choose the branch you want to share.
+
[[Category:CWE]]
* Click the "Pull Request" button.
+
* From here you can enter information about the changes you've made, and the merge approval process will begin.
+

Latest revision as of 20:38, 5 January 2016

The Guild of Writers development team, H'uru, is currently developing a fork of the CyanWorlds.com Engine  (formerly known as Plasma). This article provides information on the development process of this fork.

Building

If you want to build CWE for yourself using H'uru's fork, you should consult the getting started tutorial to help you compile and set up a fully working client. Additionally, a (slightly outdated) video tutorial has been made available.

Contributing

GitHub provides a robust set of tools to allow you to easily share your changes with the main Guild repository. These tools revolve around two concepts: forks and pull requests.

Using a GitHub fork, you can develop your changes in a repository that you have full access to. Once you're ready to share that change, you can issue a pull request. The GoW development team will be notified and we'll review your changeset for inclusion. After a few good patches, you will probably be offered direct access to the GoW repository, meaning faster turn around for your patches and less management work for the core dev team.

It is recommended that when you begin work on a bugfix or feature, you do so in a git branch. This will make it easier for us to merge your changes into the main repository. Try to avoid merging other branches into your work branch (including updates to master). The cleaner your branch is the easier it will be to integrate.

Once you are satisfied with your work, you should issue a pull request, which will let us know that you are ready for your changes to be merged into the main branch of development--the master branch. Once you have submitted your pull request, we will review your code and ask any applicable questions. Once your code passes our review(s), we will merge it into the master branch.

Code Guidelines

To improve the chance of your contributions being accepted, please consider the following guidelines.

  • Indentation should be 4 spaces. Tabs will not be accepted. Be sure to change your Visual Studio text editor settings to insert spaces if you have not already!
  • More detailed code guidelines are maintained on Github

Roadmap

Short version: There is none. This is open-source software, and each developer works on what he (dis)likes most. Since we do that in our free time, there is little point in trying to make us do something we do not want.

That said, the efforts of many developers are currently aimed at making CWE cross-platform, so that it runs natively on Linux and Mac. This requires rewriting the network code, replacing the physics engine and adding an alternative rendering backend. Another major goal is to eliminate code duplication and code smells. However, if you want to work on any other area, that's perfectly fine! Here's the current task list for open source. There is also an alternate roadmap being maintained by developers on Github.