Difference between revisions of "Zero-K:Developing"
Jump to navigation
Jump to search
Debug data:
m (→Modifying the game: Clarification) |
(→Modifying the game: Update/clarify instructions) |
||
Line 34: | Line 34: | ||
== Modifying the game == | == Modifying the game == | ||
<ol> | <ol> | ||
− | <li> | + | <li>Create a folder <code>games/zk.sdd</code> in the Zero-K installation folder.</li> |
− | + | <li>Clone to desktop [https://github.com/ZeroK-RTS/Zero-K Zero-K game] and save it to <code>zk.sdd/</code>. This folder should contain multiple files/folders, such as <code>modinfo.lua</code>.</li> | |
− | <li>Clone to desktop [https://github.com/ZeroK-RTS/Zero-K Zero-K game] and save it to zk.sdd</li> | ||
<li>To test source modifications, you'll need to enable developer mode in Chobby. Do this by creating an empty text document "devmode.txt" in the same directory as Zero-K.exe. You may need to restart the lobby.</li> | <li>To test source modifications, you'll need to enable developer mode in Chobby. Do this by creating an empty text document "devmode.txt" in the same directory as Zero-K.exe. You may need to restart the lobby.</li> | ||
− | <li>In the Settings menu a new tab appears: Developer. Edit the Singleplayer setting to be Zero-K Dev</li> | + | <li>In the Settings menu a new tab appears: Developer. Edit the Singleplayer setting to be Zero-K Dev.</li> |
− | <li>Your skirmish games should now use your modified local copy of zk.sdd</li> | + | <li>Your skirmish games should now use your modified local copy of zk.sdd.</li> |
</ol> | </ol> | ||
Revision as of 07:42, 26 April 2018
New developers should read this before touching the source.
Contents
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."
- Optimize code but not to the point of unreadability. Remember the rules of optimization:
- Don't.
- Don't (yet).
- Profile before doing it.
- Optimize code but not to the point of unreadability. Remember the rules of optimization:
- "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
- you can read wiki about game development for spring engine
- 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 to submit your changes for review
Modifying the game
- Create a folder
games/zk.sdd
in the Zero-K installation folder. - Clone to desktop Zero-K game and save it to
zk.sdd/
. This folder should contain multiple files/folders, such asmodinfo.lua
. - To test source modifications, you'll need to enable developer mode in Chobby. Do this by creating an empty text document "devmode.txt" in the same directory as Zero-K.exe. You may need to restart the lobby.
- In the Settings menu a new tab appears: Developer. Edit the Singleplayer setting to be Zero-K Dev.
- Your skirmish games should now use your modified local copy of zk.sdd.
Modifying infrastructure/tools
- Install Visual Studio Community edition
- Install SQL Server express
- Clone to desktop Zero-K infrastructure
- Test by opening Zero-K.sln in Visual Studio
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.
- 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
- Note: in order 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.
Artwork
Missions
See Mission Editor
Engine
Debug data:
[SQLBagOStuff] MainObjectStash using store ReplicatedBagOStuff
[objectcache] MainWANObjectCache using store EmptyBagOStuff
IP: 3.145.159.123
Start request GET /mediawiki/index.php?diff=next&oldid=3774&title=Zero-K%3ADeveloping
HTTP HEADERS:
CONTENT-TYPE:
CONTENT-LENGTH: 0
USER-AGENT: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HOST: zero-k.info
ACCEPT-ENCODING: gzip, br, zstd, deflate
ACCEPT: */*
CONNECTION: close[localisation] LocalisationCache: using store LCStoreDB
[session] SessionManager using store SqlBagOStuff
[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: request info {
"IPAddress": "3.145.159.123",
"UserAgent": "Mozilla\/5.0 AppleWebKit\/537.36 (KHTML, like Gecko; compatible; ClaudeBot\/1.0; +claudebot@anthropic.com)",
"ChronologyProtection": false,
"ChronologyPositionIndex": 0,
"ChronologyClientId": false
}[DBConnection] Wikimedia\Rdbms\LoadBalancer::lazyLoadReplicationPositions: executed chronology callback.
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[session] SessionBackend "bk74tj9aqnoue9mgc6qmagquu606u95c" is unsaved, marking dirty in constructor
[session] SessionBackend "bk74tj9aqnoue9mgc6qmagquu606u95c" save: dataDirty=1 metaDirty=1 forcePersist=0
[cookie] already deleted setcookie: "wikidb229_mw__session", "", "1713816265", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_UserID", "", "1713816265", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_Token", "", "1713816265", "/", "", "", "1"
[cookie] already deleted setcookie: "forceHTTPS", "", "1713816265", "/", "", "", "1"
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
Title::getRestrictionTypes: applicable restrictions to [[Zero-K:Developing]] are {edit,move}
[ContentHandler] Created handler for wikitext: WikitextContentHandler
Article::view: showing diff page
DifferenceEngine old '3774' new 'next' rcid ''
[MessageCache] MessageCache using store SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] SqlBagOStuff::lock failed due to timeout for wikidb229-mw_:messages:en.
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
ParserFactory: using preprocessor: Preprocessor_Hash
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
DifferenceEngine old '0' new '0' rcid '0'
WikiPage::getParserOutput: using parser cache: no
[caches] parser: SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
Parser cache options found.
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:d0b7f631564eb528b05c9638cea3136f:0)
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:d0b7f631564eb528b05c9638cea3136f:0)
MediaWiki::preOutputCommit: primary transaction round committed
MediaWiki::preOutputCommit: pre-send deferred updates completed
MediaWiki::preOutputCommit: session changes committed
MediaWiki::preOutputCommit: LBFactory shutdown completed
Title::getRestrictionTypes: applicable restrictions to [[Zero-K:Developing]] are {edit,move}