Difference between revisions of "Developing"

From Zero-K
Jump to navigation Jump to search
m (→‎What is in source codes: Fix bullet list)
Line 1: Line 1:
 
= Before modifying source: =  
 
= Before modifying source: =  
 
== ZK's Devving Philosophy (social rules) ==
 
== ZK's Devving Philosophy (social rules) ==
* Core devs have the last word.
 
 
* "War is anticommunication!"  
 
* "War is anticommunication!"  
 
** Communicate with other devs about your changes/fixes, let them understand the issue. Do not make 'random' changes.
 
** Communicate with other devs about your changes/fixes, let them understand the issue. Do not make 'random' changes.
Line 34: Line 33:
  
 
== Modifying the game ==
 
== Modifying the game ==
<ol>
+
* Locate data folder of your game - in Zero-K lobby settings click open game data folder
  <li>Locate data folder of your game - in Zero-K lobby settings click open game data folder</li>
+
* Create a folder games/zk.sdd in game data folder
  <li>Create a folder games/zk.sdd in game data folder</li>
+
* Clone to desktop [https://github.com/ZeroK-RTS/Zero-K Zero-K game] and save it to zk.sdd
  <li>Clone to desktop [https://github.com/ZeroK-RTS/Zero-K Zero-K game] and save it to zk.sdd</li>
+
* To test source modifications set your game in lobby client settings (under Development tab) to Zero-K Dev and start a skirmish game
  <li>To test source modifications run the game using skirmisher (Zero-K settings tab) and pick game named [b]Zero-K $VERSION[/b]</li>
 
</ol>
 
  
 
== Modifying infrastructure/tools ==  
 
== Modifying infrastructure/tools ==  
<ol>
+
* Install [https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx Visual Studio Community edition]
<li>Install [https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx Visual Studio Community edition]</li>
+
* Install [http://www.microsoft.com/en-us/server-cloud/products/sql-server-editions/sql-server-express.aspx SQL Server express]
<li>Install [http://www.microsoft.com/en-us/server-cloud/products/sql-server-editions/sql-server-express.aspx SQL Server express]</li>
+
* Clone to desktop [https://github.com/ZeroK-RTS/Zero-K-Infrastructure Zero-K infrastructure]
<li>Clone to desktop [https://github.com/ZeroK-RTS/Zero-K-Infrastructure Zero-K infrastructure]</li>
+
* Test by opening Zero-K.sln in Visual Studio
<li>Test by opening Zero-K.sln in Visual Studio</li>
 
</ol>
 
  
 
=== Debugging infrastructure ===
 
=== Debugging infrastructure ===
* Right click asp.net -> properties -> web -> check "Specific Page" and leave it blank. Otherwise you get errors when trying to host locally.
 
 
* To run a project right click it, choose "set as startup project" and hit F5 to run using debugger.
 
* To run a project right click it, choose "set as startup project" and hit F5 to run using debugger.
 
* You can enable multiple startup projects to test entire infrastructure locally (game servers, lobby etc). Enable asp.net, springie and ZeroKLobby projects to test it all together. [http://i.imgur.com/2mgizUJ.png Setup]
 
* You can enable multiple startup projects to test entire infrastructure locally (game servers, lobby etc). Enable asp.net, springie and ZeroKLobby projects to test it all together. [http://i.imgur.com/2mgizUJ.png Setup]
* Note: in order to run asp.net it's required that you install MS SQL Express on your local PC. Get one from [https://www.microsoft.com/en-us/download/confirmation.aspx?id=42299| here]. The file you will need is called SQLEXPR_x64_ENU or SQLEXPR_x86_ENU. Make sure you install version that matches your version of Windows (i.e. x86 vs x64). During the installation leave all the parameters default except that I changed server name to SQLEXPRESS in one of the first steps of wizard.
+
* To run asp.net:
 +
** It's required that you install MS SQL Express on your local PC. Get one from [https://www.microsoft.com/en-us/download/confirmation.aspx?id=42299| here]. The file you will need is called SQLEXPR_x64_ENU or SQLEXPR_x86_ENU. Make sure you install version that matches your version of Windows (i.e. x86 vs x64). During the installation leave all the parameters default except that I changed server name to SQLEXPRESS in one of the first steps of wizard.
 +
** Right click asp.net -> properties -> web -> check "Specific Page" and leave it blank. Otherwise you get errors when trying to host locally.
 +
** Make sure SQL Server is running (check the Sql Server Configuration Manager in the Start Menu). If you can't connect, edit the data source for <code>ModeType.Local</code> in <code>GlobalConst.cs</code> to say something like:<br/><code>Data Source=<hostname (usually your computer name)>\SQLEXPRESS</code>
  
 
== Artwork: ==
 
== Artwork: ==
See [http://zero-k.info/Wiki/Development_Artwork| Development Artwork]
+
See [http://zero-k.info/Wiki/Development_Artwork|Development Artwork]
  
 
== Missions: ==
 
== Missions: ==

Revision as of 07:15, 25 February 2017

Before modifying source:

ZK's Devving Philosophy (social rules)

  • "War is anticommunication!"
    • Communicate with other devs about your changes/fixes, let them understand the issue. Do not make 'random' changes.
  • "Do not create work for other people."
    • Have responsibility for your changes/commit. Do not leave bugs that require other people to fix.
  • "Readability & performance are equally important."
  • "If it ain't broke, don't fix it."
    • Don't code fixes that nobody wants to problems that don't exist.

What is in source codes

  • Zero-K contains the game proper
    • units folder contains unit definition files
  • Zero-K-Infrastructure
    • ZeroKLobby - is the lobby program for windows used as main interface and downloader
    • Zero-K.info - is the website sources
  • Zero-K-Artwork contains sources for 2D art, 3D art and sounds
  • SpringRTS-tools contains various dev tools
    • Upspring - required to edit the .3do and .s3o model files used in the game
    • MapIconBuilder - unit map icon sources are here
  • Zero-K-Missions contains source files for official ZK missions

Getting sources

  • Get a GitHub account and download Github for desktop
  • Locate repository you want to edit and click "clone in desktop" button on website
  • After you finish modifying sources click *Pull request* in Github for windows and submit your changes for review


Modifying the game

  • Locate data folder of your game - in Zero-K lobby settings click open game data folder
  • Create a folder games/zk.sdd in game data folder
  • Clone to desktop Zero-K game and save it to zk.sdd
  • To test source modifications set your game in lobby client settings (under Development tab) to Zero-K Dev and start a skirmish game

Modifying infrastructure/tools

Debugging infrastructure

  • To run a project right click it, choose "set as startup project" and hit F5 to run using debugger.
  • You can enable multiple startup projects to test entire infrastructure locally (game servers, lobby etc). Enable asp.net, springie and ZeroKLobby projects to test it all together. Setup
  • To run asp.net:
    • It's required that you install MS SQL Express on your local PC. Get one from here. The file you will need is called SQLEXPR_x64_ENU or SQLEXPR_x86_ENU. Make sure you install version that matches your version of Windows (i.e. x86 vs x64). During the installation leave all the parameters default except that I changed server name to SQLEXPRESS in one of the first steps of wizard.
    • Right click asp.net -> properties -> web -> check "Specific Page" and leave it blank. Otherwise you get errors when trying to host locally.
    • Make sure SQL Server is running (check the Sql Server Configuration Manager in the Start Menu). If you can't connect, edit the data source for ModeType.Local in GlobalConst.cs to say something like:
      Data Source=<hostname (usually your computer name)>\SQLEXPRESS

Artwork:

See Artwork

Missions:

See Mission Editor start page