Loading...
  OR  Zero-K Name:    Password:   

Developing

[Developing]

10 posts, 933 views
Post comment
Filter:    Player:  
sort

Before modifying source:


ZK's Devving Philosophy (social rules)


  • Core devs have the last word.
  • "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
    • 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 Desktop
  • Locate the repository you want to edit and click the "Fork" button on the GitHub website to create your own copy on GitHub
  • Locate your fork and click the "Clone or download -> Open in Desktop" button on the GitHub website to create a local repository on your computer
  • Before you start modifying sources:
    • Use GitHub Desktop to create a new branch in your repository for the specific changes you want to make; create the new branch from the master branch in the original ZeroK-RTS repository
  • After you finish modifying sources:
    • Use GitHub Desktop to commit your changes to your local repository
    • Use GitHub Desktop to publish or sync your commits to your repository on GitHub
    • Submit your changes for review: Use GitHub Desktop or the GitHub website to create a Pull Request from your new branch in your fork (the "head fork") into the master branch in the original ZeroK-RTS repository (the "base fork")

Modifying the game


  • Fork the Zero-K game repository
  • Locate the folder where you installed the game
    • Example: C:\Users\<username>\Documents\My Games\Zero-K
    • This folder will have subfolders such as games, engine, and maps
  • Clone your repository into the games subfolder. GitHub Desktop will create a new subfolder under games.
    • Example: C:\Users\<username>\Documents\My Games\Zero-K\games\Zero-K
  • Rename the folder that GitHub Desktop created to zk.sdd
    • Example: C:\Users\<username>\Documents\My Games\Zero-K\games\zk.sdd
    • This folder will have subfolders such as LuaUI, units, and the .git folder.
    • The zk.sdd folder contains the game source files you will modify.
  • To test your modifications:
    • Launch the game lobby (chobby.exe)
    • Go to Settings -> Developer -> Singleplayer and change it to "Zero-K Dev"
    • Start a new game: Singleplayer -> Skirmish
    • The newly-started skirmish will use your modified source code

Modifying infrastructure/tools


  1. Install Visual Studio Community edition
  2. Install SQL Server express
  3. Clone to desktop Zero-K infrastructure
  4. 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:


See Development Artwork

Missions:


See Mission Editor start page

view edit history
+0 / -0
MYrankAdminHistidine
Edits: 3
First: 2 years ago
Last: 2 years ago
CZrankAdminLicho
Edits: 7
First: 2 years ago
Last: 2 years ago
DErank[2up]knorke
Edits: 1
First: 19 months ago
Last: 19 months ago
RUrankivand
Edits: 1
First: 19 months ago
Last: 19 months ago
USrankCrazyEddie
Edits: 1
First: 6 months ago
Last: 6 months ago


unknownrankAdminSprung
6 months ago
The entire "getting sources" part looks like a git basics tutorial. Just say we have a git repo, plenty of dedicated tutorials around that will do a better job.
+2 / -0



USrankCrazyEddie
6 months ago
What was there before was simpler, but wrong. The previous instructions only worked for people with write access to the official repository, which means they were of no use to anyone for whom they might have been written.

You could strip it all down to a single sentence: "Here's the GitHub repo." But if you want to encourage contributions from people who haven't used Git or GitHub before, then I think what I've written here is the bare minimum. People can figure out the rest on their own, but getting the nuts and bolts of a basic workflow down is a difficult task for a newbie - yes, there are guides, but most of them are a) much longer than this and b) still not very good at explaining what you need to do.

+3 / -0

GBrank2plus2is5
6 months ago
ok, downloading stuff now.
+0 / -0



MYrankAdminHistidine
6 months ago
Changes copied to Mediawiki.
+1 / -0

NZrankhedgehogs
6 months ago
Doesn't fork to my Githuub
+0 / -0


ILrankAdminhokomoko
6 months ago
quote:
Doesn't fork to my Github

Factually Incorrect
+5 / -0

NZrankhedgehogs
6 months ago
Thank you!
+0 / -0

GBrank2plus2is5
6 months ago
ok all done, is there a list of issues I can take a look at to fix for you?
+0 / -0


USrankFealthas
6 months ago
(edited 6 months ago)

Start here
+0 / -0