|
|
| (177 intermediate revisions by 38 users not shown) |
| Line 1: |
Line 1: |
| Outlined below is information on assisting with the development of the Spring source itself.
| | {|width="100%" style="border: 0px; border-spacing:0px" |
| | |width="500px" valign="top" style="padding-left:10px; padding-right:10px"| |
|
| |
|
| ::<small>NOTE: For information about developing a mod (units, maps, etc.) see the [[Mod Development]] page.</small> | | '''[https://github.com/spring/spring GitHub and Source Code]''' |
|
| |
|
| Below you can find information on how to work with the Spring source in the current mainline (Windows platform) if you like to work on another platform (Linux & Mac) please look at the bottem of this page under "Multiplatform development"
| | Engine source code<br> |
|
| |
|
| ==Starting Development==
| | '''[[Links|Important Links]]''' |
| To start development, you'll need
| |
| #The latest version of the source
| |
| #A good code manipulation program
| |
| #Compiling your modified source
| |
|
| |
|
| ===Source Code Documentation===
| | Important Community and Development links to git repos & subprojects.<br> |
| A good place to start is the source code documentation, which can be found here: [http://taspring.clan-sy.com/doxygen/ doxygen]
| |
|
| |
|
| An explanation on how the code is executed ingame can be found in the [[Spring Engine Code]]
| |
| page.
| |
|
| |
|
| ===Obtaining the Source===
| | '''[[Building spring|Compiling Engine]]''' |
| One option is to manually download it along with the latest released version of the game. However, for serious developers, a better way would be to download the source straight from the CVS. The CVS is updated nightly, and is considered "bleeding edge" because it may or may not work properly. However, the CVS will always have the most up-to-date version of the source code. Look at this [[CVS tutorial]] for instructions on how to get the source code from the CVS, or download the nightly cvs tarball:
| |
| http://cvs.sourceforge.net/cvstarballs/springrts-cvsroot.tar.bz2
| |
|
| |
|
| ===Learning C++===
| | How to build the Spring engine from source.<br> |
| You will need to know C++ to modify or understand Spring's source code. If you're interested in learning C++, check out these links:
| |
| *[http://mindview.net/Books/TICPP/ThinkingInCPP2e.html Thinking in C++] An excellent C++ book available free online as HTML. Also available in [http://www.planetpdf.com/developer/article.asp?ContentID=6634 PDF format].
| |
| *[http://www.lysator.liu.se/c/ten-commandments.html The Ten Commandments for C Programmers] A comical introduction to the principles of the language.
| |
| *[http://www.parashift.com/c++-faq-lite/ C++ FAQ] An excellent guide to the many problems encountered when writing C++ and how to avoid them.
| |
| *[http://www.amazon.com/exec/obidos/tg/detail/-/0130384747/002-6409742-5712035?v=glance C++ How to Program] Although it's a commercial volume, it is an excellent introduction to the language.
| |
|
| |
|
| ===Properly Modifying the Source===
| |
| Although it is theoretically possible to use Notepad or Crimson Editor to modify the source, it is pragmatically unsound. The Spring engine is highly complex, and any serious developer will want to use a proper IDE such as Microsoft's Visual Studio .NET 2003 or Eclipse. Although the ad-hoc standard is Visual Studio, it is extremely expensive and heavy weight. Dev C++ is a light weight (around 3MB download), widely-used free and legal alternative to Visual Studio .NET, and can be downloaded here: http://www.bloodshed.net/devcpp.html. Code::Blocks is in the same vein as Dev C++, but slightly more advanced. It can be downloaded here: http://www.codeblocks.org/
| |
|
| |
|
| Another good free C++ editor is Eclipse. Eclipse does not come with C++ support by default but has a downloadable plugin that provides C++ support. See http://www.eclipse.org/ and http://www.eclipse.org/cdt/. It is much more fully featured than Dev-C++ but the download is much larger at around 100MB for the basic tool without the C++ plugin.
| | '''[[Development:Getting_Started|Engine Development]]''' |
|
| |
|
| Both Eclipse and Dev C++ rely on the GNU compiler, which does NOT produce compatible binaries with the MS VS C++ compiler, so whilst you can edit in either of these development environments, note that you won't be able to use them to build anything to work with the real Spring engine (as of 18/10/2005 - this will hopefully change in the future). Dev C++ can be downloaded with the compiler bundled in (total download around 10MB), but Eclipse expects you to have already configured your machine correctly: you need to install Cygwin and select gcc (in the Development section). Cygwin can be downloaded here: http://www.cygwin.com/
| | Information regarding contributing to the source code of the Spring engine. |
|
| |
|
| The bulk of the game engine is found inside the /rts/ folder. The AI and Lobby subsystems are located in respective folders. Take a peek and see where everything is.
| |
| You can take a look at http://taspring.clan-sy.com/doxygen/ for a good (graphical) and dynamic display of how the Spring engine code hangs together.
| |
|
| |
|
| ===Compiling the Source===
| | '''[[Lobby_Development|Lobby Development (Clients and Servers)]]''' |
| Compiling the source will make it into a playable .exe. The very same IDEs previously mentioned can compile the source, so see the appropriate documentation for the program you are using to compile properly. Make sure that you are in Release mode and not Debug mode when you compile.
| |
|
| |
|
| If you don't have access to this compiler, it should be possible to use the free version of Visual C++ instead. Look at the end of [http://taspring.clan-sy.com/phpbb/viewtopic.php?t=921 this forum thread] for more information. Hopefully this will be turned into a Wiki guide by someone who has gotten this to work.
| | Information regarding contributing to the source code of the different lobby clients and servers available for Spring. |
|
| |
|
| ==Development Suggestions==
| |
|
| |
|
| Before starting to make modifications to the source, take a look at the [[development guidelines]] which outlines some important things to think about. To find something interesting to work on, look at the list of [[example projects]]. You can also check the list of [[whois doing what]] to see what others are doing. If you do edit the code, please add [[Doxygen style comments]] to the code, which will then enhance the source code documentation.
| | '''[[Gamedev:Main|Game Development]]''' |
|
| |
|
| ===How to get your code included===
| | Lots of links to valuable Articles and forum threads regarding Game, Mod & Unit Development. |
| If you create something that you think should be included in the official source tree, you can submit a patch (also known as a .diff file) to Spring's [http://sourceforge.net/tracker/?group_id=137982&atid=739725 SourceForge] page. It's also considered standard practice to post one's modifications in the [http://taspring.clan-sy.com/phpbb/viewforum.php?f=12 development forum] and get feedback.
| |
|
| |
|
| ==Multiplatform development==
| |
| The Spring code is made portable in a separate branch at BerliOS.<br>
| |
| We intent to merge the (portable) code into mainline once it's stable.<br>
| |
| At this moment our goal is to make Spring run on Linux, if you would like to work on the Linux port please look at the [[Linux]] page.<br>
| |
| A [[Mac]] version is possible if enough developers like to port it.<br>
| |
| Although we advise to wait with full mac development until the Linux port is merged into mainline.<br>
| |
| Chris Han leads the [[Linux]] porting effort and this is done in cooperation with the lead "Windows" developers.<br>
| |
| Once the two versions are merged the terms Windows and Linux developers will probebly disapear as all developers will be working on the same portible Spring codebase.<br>
| |
|
| |
|
| | '''[[Mapdev:Main|Map Development]]''' |
|
| |
|
| See [[Glossary]]
| | Tutorials and other useful information for creating maps. |
|
| |
|
| [[Category:Development]] | | |
| | '''[[Lua_Scripting|Lua Development]]''' |
| | |
| | Information regarding the use of the supplementary Lua scripting language for Widgets and beyond. |
| | |
| | |
| | '''[[AI:Development|AI Development]]''' |
| | |
| | All you ever wanted to know about Skirmish AI Development for Spring, and more. This includes Skirmish and Lua AIs. |
| | |
| | |
| | '''[[Infrastructure:Development|Infrastructure Development]]''' |
| | |
| | Information about springs infrastructure |
| | |
| | |valign="top" style="padding:0px"| |
| | |
| | == Quick Links == |
| | |
| | {|width="100%" class="" |
| | ! '''[http://spring.clan-sy.com/phpbb/viewforum.php?f=12 Development forums]''' |
| | |- |
| | | Look at the development forums for ongoing progress and discussion |
| | |} |
| | |
| | |
| | {|width="100%" class="" |
| | ! '''[http://springrts.com/mantis/ Report Bugs]''' |
| | |- |
| | | Submit patches and bug reports here |
| | |} |
| | |
| | |
| | {|width="100%" class="" |
| | ! '''[https://github.com/spring/spring/ Source Code]''' |
| | |- |
| | | View and fork the project on GitHub. |
| | |} |
| | |
| | |
| | |
| | {|width="100%" class="" |
| | ! '''[https://github.com/spring/spring/commits/develop.atom Commit Newsfeed]''' |
| | |- |
| | |View git commits as they happen. |
| | |} |
| | |
| | |
| | |
| | |} |
| | |
| | [[Category: Development]] |