Skip to content
Cataclysm - Dark Days Ahead. A fork/variant of Cataclysm Roguelike by Whales.
Branch: recharge_from_…
Clone or download
Pull request Compare This branch is 1 commit ahead, 67792 commits behind CleverRaven:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
code_doc
data
msvc100
tests
.gitignore
.travis.yml
CODE_STYLE
COMPILING
CataclysmWin.cbp
DEVELOPER_FAQ.txt
LICENSE
Makefile
Makefile.Windows
README
README.md
SIGNOFF
TESTING
action.cpp
action.h
addiction.cpp
addiction.h
artifact.cpp
artifact.h
artifactdata.h
basecamp.cpp
basecamp.h
bionics.cpp
bionics.h
bodypart.cpp
bodypart.h
calendar.cpp
calendar.h
cataclysm-launcher
catacurse.cpp
catacurse.h
catajson.cpp
catajson.h
color.cpp
color.h
computer.cpp
computer.h
construction.cpp
construction.h
crafting.cpp
crafting.h
cursesdef.h
debug.cpp
debug.h
defense.cpp
dialogue.h
disease.cpp
disease.h
enums.h
event.cpp
event.h
facdata.h
faction.cpp
faction.h
field.cpp
game.cpp
game.h
gamemode.cpp
gamemode.h
graffiti.cpp
graffiti.h
help.cpp
helper.cpp
helper.h
icon.rc
iexamine.cpp
iexamine.h
input.cpp
input.h
inventory.cpp
inventory.h
inventory_ui.cpp
item.cpp
item.h
item_factory.cpp
item_factory.h
item_group.cpp
item_group.h
itype.h
itypedef.cpp
iuse.cpp
iuse.h
keypress.cpp
keypress.h
lightmap.cpp
lightmap.h
line.cpp
line.h
main.cpp
main_menu.cpp
map.cpp
map.h
mapbuffer.cpp
mapbuffer.h
mapdata.cpp
mapdata.h
mapgen.cpp
mapgenformat.cpp
mapgenformat.h
mapitems.h
mapitemsdef.cpp
melee.cpp
mission.cpp
mission.h
mission_end.cpp
mission_fail.cpp
mission_place.cpp
mission_start.cpp
missiondef.cpp
monattack.cpp
monattack.h
mondeath.cpp
mondeath.h
mongroup.h
mongroupdef.cpp
monitemsdef.cpp
monmove.cpp
monster.cpp
monster.h
morale.h
moraledata.h
mtype.h
mtypedef.cpp
mutation.cpp
mutation.h
mutation_data.cpp
name.cpp
name.h
newcharacter.cpp
npc.cpp
npc.h
npcmove.cpp
npctalk.cpp
omdata.h
options.cpp
options.h
output.cpp
output.h
overmap.cpp
overmap.h
picojson.h
player.cpp
player.h
pldata.h
posix_time.cpp
posix_time.h
profession.cpp
profession.h
ranged.cpp
resource.rc
rng.cpp
rng.h
settlement.cpp
settlement.h
setvector.cpp
setvector.h
skill.cpp
skill.h
text_snippets.cpp
text_snippets.h
tileray.cpp
tileray.h
trap.h
trapdef.cpp
trapfunc.cpp
tutorial.cpp
tutorial.h
veh_interact.cpp
veh_interact.h
veh_type.h
veh_typedef.cpp
vehicle.cpp
vehicle.h
version.cpp
wdirent.h
weather.cpp
weather.h
weather_data.cpp
wish.cpp

README.md

Cataclysm: Dark Days Ahead

Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world. While some have described it as a "zombie game", there's far more to Cataclysm than that. Struggle to survive in a harsh, persistant, procedurally generated world. Scavenge the remnants of a dead civilization for for food, equipment, or, if you're lucky, a vehicle with a full tank of gas to get you the hell out of Dodge. Fight to defeat or escape from a wide variety of powerful monstrosities, from zombies to giant insects to killer robots and things far stranger and deadlier, and against the others like yourself, that want what you have...

How to Compile

The current instructions on how to compile C:DDA can be found here.

How to Contribute

Contributing to C:DDA is easy - simply fork the repository here on GitHub, make your changes, and then send us a pull request - but there are a couple of guidelines we suggest sticking to:

  • Add this repository as an upstream remote.
  • Keep your master branch clean. This means you can easily pull changes made to this repository into yours.
  • Create a new branch for each new feature or set of related bug fixes.
  • Never merge from your local branches into your master branch. Only update that by pulling from upstream/master.

An Example Workflow

Setup your environment

(This only needs to be done once.)

  1. Fork this repository here on GitHub.

  2. Clone your fork locally.

     $ git clone https://github.com/YOUR_USERNAME/Cataclysm-DDA.git
     # Clones your fork of the repository into the current directory in terminal
    
  3. Add this repository as a remote.

     $ cd Cataclysm-DDA
     # Changes the active directory in the prompt to the newly cloned "Cataclysm-DDA" directory
     $ git remote add -f upstream https://github.com/TheDarklingWolf/Cataclysm-DDA.git
     # Assigns the original repository to a remote called "upstream"
    

Update your master branch

  1. Make sure you have your master branch checked out.

     $ git checkout master
    
  2. Pull the changes from the upstream/master branch.

     $ git pull --ff-only upstream master
     # gets changes from the "upstream" remote for the matching branch, in this case "master"
    

Make your changes

  1. Update your master branch, if you haven't already.

  2. For each new feature or bug fix, create a new branch.

     $ git branch new_feature
     # Creates a new branch called "new_feature"
     $ git checkout new_feature
     # Makes "new_feature" the active branch
    
  3. Once you've committed some changes locally, you need to push them to your fork here on GitHub.

     $ git push origin new_feature
     # origin was automatically set to point to your fork when you cloned it
    
  4. Once you're finished working on your branch, and have committed and pushed all your changes, submit a pull request from your new_feature branch to this repository's master branch.

  • Note: any new commits to the new_feature branch on GitHub will automatically be included in the pull request, so make sure to only commit related changes to the same branch.

Advanced Techniques

These guidelines aren't essential, but they can make keeping things in order much easier.

Using remote tracking branches

Remote tracking branches allow you to easily stay in touch with this repository's master branch, as they automatically know which remote branch to get changes from.

$ git branch -vv
* master      xxxx [origin/master] ....
  new_feature xxxx ....

Here you can see we have two branches; master which is tracking origin/master, and new_feature which isn't tracking any branch. In practice, what this means is that git won't know where to get changes from.

$ git checkout new_feature
Switched to branch 'new_feature'
$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.

In order to easily pull changes from upstream/master into the new_feature branch, we can tell git which branch it should track. (You can even do this for your local master branch.)

$ git branch -u upstream/master new_feature
Branch new_feature set up to track remote branch master from upstream.
$ git pull
Updating xxxx..xxxx
....

You can also set the tracking information at the same time as creating the branch.

$ git branch new_feature_2 --track upstream/master
Branch new_feature_2 set up to track remote branch master from upstream.
  • Note: Although this makes it easier to pull from upstream/master, it doesn't change anything with regards to pushing. git push fails because you don't have permission to push to upstream/master.

     $ git push
     error: The requested URL returned error: 403 while accessing https://github.com/TheDarklingWolf/Cataclysm-DDA.git
     fatal: HTTP request failed
     $ git push origin
     ....
     To https://github.com/YOUR_USERNAME/Cataclysm-DDA.git
     xxxx..xxxx  new_feature -> new_feature
    

Frequently Asked Questions

####Why does git pull --ff-only result in an error?

If git pull --ff-only shows an error, it means that you've committed directly to your local master branch. To fix this, we create a new branch with these commits, find the point at which we diverged from upstream/master, and then reset master to that point.

$ git pull --ff-only upstream master
From https://github.com/TheDarklingWolf/Cataclysm-DDA
 * branch            master     -> FETCH_HEAD
fatal: Not possible to fast-forward, aborting.
$ git branch new_branch master          # mark the current commit with a tmp branch
$ git merge-base master upstream/master
cc31d0... # the last commit before we committed directly to master
$ git reset --hard cc31d0....
HEAD is now at cc31d0... ...

Now that master has been cleaned up, we can easily pull from upstream/master, and then continue working on new_branch.

$ git pull --ff-only upstream master
# gets changes from the "upstream" remote for the matching branch, in this case "master"
$ git checkout new_branch
You can’t perform that action at this time.