Editing Zero-K:Developing

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 7: Line 7:
 
** Have responsibility for your changes/commit. Do not leave bugs that require other people to fix.
 
** Have responsibility for your changes/commit. Do not leave bugs that require other people to fix.
 
* "Readability & performance are equally important."  
 
* "Readability & performance are equally important."  
** Optimize code, but not to the point of unreadability. [//c2.com/cgi/wiki?RulesOfOptimization Remember the rules of optimization]:
+
** Optimize code but not to the point of unreadability. [http://c2.com/cgi/wiki?RulesOfOptimization Remember the rules of optimization]:
 
*** Don't.
 
*** Don't.
 
*** Don't (yet).
 
*** Don't (yet).
Line 73: Line 73:
 
== Modifying the game ==
 
== Modifying the game ==
 
:''For personal modding, see [[Mod Creation]]''
 
:''For personal modding, see [[Mod Creation]]''
Follow the instructions in 'Getting sources' the download the Zero-K game sources. Feel free to inspect and edit the game files. Most developers using Windows edit lua files with [//notepad-plus-plus.org/download/ Notepad++].
+
Follow the instructions in 'Getting sources' the download the Zero-K game sources. Feel free to inspect and edit the game files. Most developers using Windows edit lua files with [https://notepad-plus-plus.org/download/v7.6.6.html Notepad++].
  
 
To test your changes:
 
To test your changes:
Line 148: Line 148:
 
=== Debugging infrastructure ===
 
=== Debugging infrastructure ===
 
* 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.
*[[File:Startup projects.png|thumb|Startup projects 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.
+
* 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]
 
* To run asp.net:
 
* To run asp.net:
 
** It's required that you install MS SQL Server on your local PC.  
 
** It's required that you install MS SQL Server on your local PC.  
Line 156: Line 156:
 
** 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> (currently line 46) to say something like:<br/><code>Data Source=<hostname (usually your computer name)>\SQLSERVER</code>
 
** 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> (currently line 46) to say something like:<br/><code>Data Source=<hostname (usually your computer name)>\SQLSERVER</code>
 
** To make things run smoothly the following changes might also be a good idea: In <code>Shared/PlasmaShared/GlobalConst.cs</code> (currently line 137) replace the DefaultEngineOverride with whatever engine version is current. Comment out lines 190 and 238-298 of <code>Zero-K.info/AppCode/PlasmaServer.cs</code> unless somebody can supply instructions on how to make the torrent errors go away.
 
** To make things run smoothly the following changes might also be a good idea: In <code>Shared/PlasmaShared/GlobalConst.cs</code> (currently line 137) replace the DefaultEngineOverride with whatever engine version is current. Comment out lines 190 and 238-298 of <code>Zero-K.info/AppCode/PlasmaServer.cs</code> unless somebody can supply instructions on how to make the torrent errors go away.
**(As of June 2023) a few extra steps: in Visual Studio open Tools - Options - Projects and Solutions - Web Projects and tick "Use the 64 bit version of IIS Express...". In <code>ZkLobbyServer/ZkLobbyServer.cs</code> you may need to comment out the line <code>Task.Factory.StartNew(()=>ReplayStorage.Instance.MigrateReplays(), TaskCreationOptions.LongRunning);</code> currently on line 104.
 
  
 
TODO: add download links for sample database tables here. Users and clans are probably easier to make yourself for most purposes. For now, if you need this ask Licho, Histidine, DeinFreund or Anarchid. Aquanim has sample tables for maps and Planetwars structures, if that is all that you need.
 
TODO: add download links for sample database tables here. Users and clans are probably easier to make yourself for most purposes. For now, if you need this ask Licho, Histidine, DeinFreund or Anarchid. Aquanim has sample tables for maps and Planetwars structures, if that is all that you need.

Please note that all contributions to Zero-K are considered to be released under the Creative Commons Attribution-ShareAlike (see Zero-K:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)