Git Product home page Git Product logo

cleverraven / cataclysm-dda Goto Github PK

View Code? Open in Web Editor NEW
9.5K 319.0 4.0K 7.64 GB

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.

Home Page: http://cataclysmdda.org

License: Other

Shell 0.20% C 0.08% Python 2.15% C++ 95.97% Makefile 0.20% CMake 0.30% Batchfile 0.01% Gnuplot 0.01% Perl 0.01% HTML 0.07% R 0.01% Java 0.92% JavaScript 0.02% CodeQL 0.01% PowerShell 0.03% jq 0.01% Dockerfile 0.02% Motoko 0.01% POV-Ray SDL 0.01%
cataclysm c-plus-plus game zombies hacktoberfest

cataclysm-dda's Introduction

Cataclysm: Dark Days Ahead

Cataclysm: Dark Days Ahead is a turn-based survival game set in a post-apocalyptic world. While some have described it as a "zombie game", there is far more to Cataclysm than that. Struggle to survive in a harsh, persistent, procedurally generated world. Scavenge the remnants of a dead civilization for food, equipment, or, if you are 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, who want what you have...

Tileset: Ultica

Downloads

Releases - Stable | Experimental

Source - The source can be downloaded as a .zip archive, or cloned from our GitHub repo.

Packaging Status

General build matrix Coverage Status Open Source Helpers Commit Activity Lines of Code TODOs

Packaging status

Arch Linux

Ncurses and tiles versions are available in the community repo.

sudo pacman -S cataclysm-dda

Fedora

Ncurses and tiles versions are available in the official repos.

sudo dnf install cataclysm-dda

Debian / Ubuntu

Ncurses and tiles versions are available in the official repos.

sudo apt install cataclysm-dda-curses cataclysm-dda-sdl

Compile

Please read COMPILING.md - it covers general information and more specific recipes for Linux, OS X, Windows and BSD. See COMPILER_SUPPORT.md for details on which compilers we support. And you can always dig for more information in doc/.

We also have the following build guides:

Contribute

Cataclysm: Dark Days Ahead is the result of contributions from over 1000 volunteers under the Creative Commons Attribution ShareAlike 3.0 license. The code and content of the game is free to use, modify, and redistribute for any purpose whatsoever. See https://creativecommons.org/licenses/by-sa/3.0/ for details. Some code distributed with the project is not part of the project and is released under different software licenses; the files covered by different software licenses have their own license notices.

Please see CONTRIBUTING.md for details.

Special thanks to the contributors, including but not limited to, people below:

Made with contrib.rocks.

Community

Forums: https://discourse.cataclysmdda.org

GitHub repo: https://github.com/CleverRaven/Cataclysm-DDA

IRC: #CataclysmDDA on Libera Chat, https://web.libera.chat/#CataclysmDDA

Official Discord: https://discord.gg/jFEc7Yp

Frequently Asked Questions

Is there a tutorial?

Yes, you can find the tutorial in the Special menu at the main menu (be aware that due to many code changes the tutorial may not function). You can also access documentation in-game via the ? key.

How can I change the key bindings?

Press the ? key, followed by the 1 key to see the full list of key commands. Press the + key to add a key binding, select which action with the corresponding letter key a-w, and then the key you wish to assign to that action.

How can I start a new world?

World on the main menu will generate a fresh world for you. Select Create World.

I've found a bug. What should I do?

Please submit an issue on our GitHub page using bug report template. If you're not able to, send an email to [email protected].

I would like to make a suggestion. What should I do?

Please submit an issue on our GitHub page using feature request template.

cataclysm-dda's People

Contributors

acidia avatar anothersimulacrum avatar atomicdryad avatar bevapdin avatar brettdong avatar codemime avatar coolthulhu avatar cyrano7 avatar dseguin avatar i-am-erk avatar i2amroy avatar illi-kun avatar irwiss avatar jbytheway avatar john-candlebury avatar ka101 avatar kevingranade avatar korggent avatar maleclypse avatar mlangsdorf avatar mugling avatar night-pryanik avatar ozoneh3 avatar pisskop avatar qrox avatar rivet-the-zombie avatar thedarklingwolf avatar vlasovvitaly avatar wapcaplet avatar zhilkinserg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cataclysm-dda's Issues

Clean up water purification

For something that's pretty central to survival, water purification is quite haphazard.

Some cleanups we can do:

  1. Differentiate between clear (but possibly contaminated), cloudy (obviously dirty), and tainted (from a very dangerous source) water.
  2. Differentiate between biological and chemical contamination. (internally, this will not be player-visible without a test)
  3. Carry contamination across recipes as called for.
  4. Differentiate between sterilized (boiled/chemically treated, not that tasty) and filtered/distilled water (very clean).

To be more concrete, I'm proposing:
New Items:
cloudy water (obviously dirty, probably unsafe, from rivers)
toxic water (obviously dirty water from an obviously dangerous source)
sterilized water (flat or chemical-tasting water, biologically safe, output of boiling or chemical purification, lower morale boost than clean water)
water test kit (item used to detect chemical contamination in water)
New item attributes:
bio_contamination
chem_contamination
Code changes:
Enhancing recipe code to copy contamination from inputs to output
Enhance recipes to indicate whether they transfer contamination
Item changes:
Let iodine be used to sterilize (percent chance?) water.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Segfault when descending stairs near a site with static spawns.

Thanks qurvax for reporting.

Ran into reproducible error message popping up. Reads "DEBUG: centadodecamonant (phew, i managed to write it!) doesn't exist in grid; within add_spawn (20, 1, 4, 9) (<-numbers can be quite random).. It pops up near a mega store (some over-map tiles away) AND there is a evac shelter too ("safe zone" conflict?). The closer to the shelter - the more of it, to the point when i tired of pressing spacebar.
Third: that shelter have basement (obviously). If i try to descend there, it's segfaults. Let's load, debug and catch some info, shall we?

program received signal SIGSEGV, sigmentation fault.
0x80d2e53 in std::vector<spawn_point, std::allocator<spawn_point> >:: push back (this=0x1691),
__x= ...)
at tmp/tcloop/gcc/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../include/c++/4.4.3/bits/stl_vector.h:735 --
735 if (this-> _M_impl._M_finish != this _M_impl._M_end_of_storage)

(gdb) backtrace
#0 0x080d2e53 in std::vector<spawn_point, std::alocator<spawn_point> >::push_back (this=0x1691 __x=...)

at tmp/tcloop/gcc/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../include/c++/4.4.3/bits/stl_vector.h:735
#1 0x080a9b87 in map::add_spawn (this=0xbfbfdf34, type=mon_zombie, count=1 x=9, y=8,

firendly=false, faction_id=-1, mission_id=-1, name=...) at mapgen.cpp:6888
#2 0x08a9d56 in map::add_spawn (this=0xbfbfdf34, mon=0xa71fb38 at mapgen.cpp:6909
#3 0x086ce9e7 in game::vertical_move (this=0xb73e7008, movez=-1, force=false) at game.cpp:7446
#4 0x086a662c in game::get_input (this=0xb73e7008, timeout_ms=34590) at game.cpp:1450
#5 0x086a25c0 in game::do_turn (this=0xb73e7008) at game.cpp:674
#6 0x0831d053 in main (argc=0, argv=0xbfc824f8) at main.cpp:75

(dgb)

In summary, there seems to be an issue with map corruption when a static spawn site is too close to a shelter, and it causes a segfault in the despawn code called from vertical_move().

Slight issue with compound bows

Quick thing that I saw, but I haven't been able to replicate as I haven't been able to get a compound bow since. Basically, I had a steel spear equipped when I got into a fight with some bee-sting zombies, got some distance on them, switched to my compound bow, then shot them a couple of times. Issue is, when I went to get my spear again it was nowhere to be found, at the time I thought I might have dropped it or something, but then it happened again shortly thereafter with my hatchet.
tl;dr, Had a weapon in my hand, 'e'quipped a compound bow, and the weapon I was holding is banished to the abyss

Make saves backward- and forward- compatable.

This is a really long-term issue. Currently data is pushed out to the save file by exporting the value of various enums, and some data is position-dependent, e.g. a certain point in the save file there is a list of skill values, and which values is associated with which skill depends on its order in the list. Similarly items are stored as the value of their enum, and if the enum changes between builds items will be read back from the save as a different item.

In order to make saves backward and forward compatible, all data in the save file must be labelled or positioned in a way that is stable across builds. The simplest way to do this is to label each value with a string indicating its type, but this might be prohibitive for some aspects of the save, such as map data. Since serialization is handled separately by each class, each class can be updated independently to handle this so we can slowly proceed toward supporting full save compatibility.

In addition, to make saves backwards-compatible, the code reading in the save will have to either ignore or interpolate unknown values. So with a new skill, the code would discard unknown skills, but with e.g. guns, the game might substitute a different gun that exists in the current version.

Controlled fire

There are several issues with using fire in a civilized manner. It falls into several categories, containment, intensity control and smoke control.

The only things that currently contain fire are pits and the brazier item (trap). We could use a variety of additional containments for fire, such as fireplaces and stoves. In order to not make a mess of the code with this, I propose two new terrain flags, restricts_fire and isolates_fire. restricts_fire would just prevent spread of fire to different terrain types, which is what pits currently do. isolates_fire would keep fire from spreading, even to terrain of the same type. For portable fire-making purposes, there is also the brazier, which is a trap with no trigger for technical reasons. We can similarly make a firepit that can be built with only a shovel, but if we start multiplying portable fire-containment, we probably want to consider a cleaner way of detecting it than listing all the items in the fire update code.

The second problem is there is no way to prevent fires from becoming "raging inferno" stage except to avoid feeding them fuel. Similarly to containment, we can add some flags to limit rate of fuel consumption, and to cap fire intensity. Related to this is fire duration, we should be able to build a fire and have it last all night for warmth, and ideally be able to just add more wood to replenish the process.

Finally for indoor fires smoke becomes a problem because any smoke produced lasts a very long time. Again, the solution is probably to add a terrain flag to suppress smoke generation.

NPC fires at player despite intervening wall.

A NPC got angry at me and started shooting. I ducked around the corner of a building, and the NPC kept firing at me. Also the bullet paths kept being drawn, allowing me to see through walls in a limited way.

Integrate with xUnit++ for unit testing.

Pretty self-explanatory, get some basic unit-testing going with XUnit++, including hooking it up to the makefile and adding some documentation on how to proceed with adding new tests. Let me know if you have any preferences on a framework to use, xUnit++ looks like a good one, but it's pretty obnoxiously up-to-date, requiring gcc 4.7+ and SCons just to build, and the windows support seems pretty iffy.

Weather radio.

Enhance the radio system to report upcoming weather conditions.
Make some radio towers weather stations.
Possibly add stations to the radio.

Siphon fuel from vehicle into a held container.

Probably just need an iuse method for a rubber hose that allows it to be used on a vehicle, then you designate what container to siphon into.
Bonus points for adding a chance of choking on gasoline and/or spilling it everywhere.

Save/Load takes too long when large areas of the map have been explored.

The mapbuffer code reads/writes the entire map save file as a single operation at game start/exit, this can take several seconds with a not-all-that-old game, and it will continue to take longer and longer as more map is revealed. Since it takes so long it also doesn't get executed often enough, causing chronic map consistency issues.

I don't see any obvious bottlenecks in a profiling run of a save/load sequence.

Two options:
Raw performance:
If there is a bottleneck somewhere (such as I/O waits) such that map save/load could be accelerated by several orders of magnitude, that may be a viable option.
Things to look into in this vein are:

  1. Buffered read like outlined here: http://stackoverflow.com/questions/132358/how-to-read-file-content-into-istringstream#138645
  2. Compressing the map data to prevent I/O overhead. A quick check shows a compression ratio of 95% with ordinary zip. I have an old stab at this at https://github.com/kevingranade/Cataclysm/tree/save-compression but it didn't seem to help at the time.
  3. Spawning a worker thread to do the I/O in parallel with processing the data. http://stackoverflow.com/questions/266168/simple-example-of-threading-in-c

The other option is to break the map data (back) into multiple files or add an index so we can deal with map chunk I/O on-demand instead of all at once. We should have enough time to write out distant submaps after each invocation of do_turn(), and if we limit the number of outstanding submaps we have to deal with at once, save/load should be fairly trivial.
The strength and weakness of multiple files seems to be the same, it offloads lookup of individual submaps onto the filesystem, and the filesystem on windows doesn't seem to be up to the task. I wonder though if a hierarchical layout of files might make that manageable, like:
gamedir/save/map//submap.txt
Though now that I think of it that's still too many, but you get the idea, we just need to break it into enough subdirectories so that each directory is manageable. Also it doesn't have to be one submap per file Each submap is a few KB, we could trivially group them into 2x2 tiles per file, and possibly larger groupings until we reach a good balance. 2x2 is nice because that matches overmap coordinates, and submaps are generated a 2x2 block at a time.

Adding an index at the start of the map data file is difficult because the individual submaps aren't fixed size, so we can't just do fixed offsets into the file. Even log-structured is a PITA because we want to change submaps when they're saved. We could do a sync that rewrites the index and writes out

Radio direction finder

New item, Radio Direction Finder gives a direction to the dominant radio signal in the area when used with a radio. Essentially it's an antenna you plug into a radio.

Can be used to locate the source of interesting radio signals.

Bicycle enhancements 0#0

Some basic new features to round out bicycles.
Limit foot crank to operating when the player or a NPC is in the same square.
Derive foot crank power from player or NPC in same square.
Rebalance bicycle speed.

Stealth support.

Add a "spotted" and "identified" flag to the monster structure. Might expand to more flags in the future. "visibility"?
Add a perception check in ??? to determine if the monster is spotted, and another to determine if it's identified.
Augment game::draw_ter() or monster::draw() to either draw nothing, an alternate glyph*, or the actual glyph for the monster.
Also need to augment game::mon_info() to only display spotted/identified monsters.
Need to make sure non-monster glyphs don't appear on this list, need another flag for that?
Same for look_around readout.

*Examples of alternate glyphs: triffid: sapling zombie: corpse

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Allow automatic gas pumping.

Add an option to latch the gas pump when pumping gas, which will make gas continue pumping if you walk away. This would spawn a "pump hose" item that would "click" when it's finished, and you'd 'e'xamine it to disconnect. Failing to do so would tear the hose off the pump, triggering a massive gasoline spill and disabling the pump. Possibly damaging the vehicle as well.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Firecrackers

An item that works basically like dynamite, except it just makes noise (and light?).

Possibly have two variants, a firecracker bundle with x charges (25, 50, what's a generic size?) that when lit, creates a random-ish number of bangs per turn until it runs out of charges. These could be deconstructed into individual firecrackers that generate a single bang.

segfault on going downstairs

Haven't been able to reproduce since it didn't generate a save. Had a segfault when going downstairs in starting evac shelter, caused by a has_flag check in the stairs-searching loop (presumably due to x or y out of bounds of tmpmap)
#0 0x000000000075fadd in map::has_flag (this=0x7fffffffcb10, flag=goes_up, x=36, y=47) at map.cpp:726
#1 0x00000000005a0c06 in game::vertical_move (this=0x7ffff7ee9010, movez=-1, force=false) at game.cpp:6925
#2 0x00000000005796bb in game::get_input (this=0x7ffff7ee9010, timeout_ms=-1) at game.cpp:1309
#3 0x0000000000576274 in game::do_turn (this=0x7ffff7ee9010) at game.cpp:670
#4 0x00000000007418e2 in main (argc=1, argv=0x7fffffffdc58) at main.cpp:47

Pushable/Pullable/Dragables

Add option to drag an item that is too heavy to lift.
Drug items will occupy one or more hands, and slow the player down based on weight of the item. Also may cause additional noise and impose movement limitations.

Draggable containers would accept objects dropped on them, and provide a bonus to being dragged (reducing the effective weight for the purposes of being dragged) based on the type of item..

Pushable containers would act like draggable ones, but have an override to make the pushable container lead instead of following when moving. e.g. shopping cart.

Hurricane Lantern

A long-lived simple light source, traditionally uses kerosene, but we can use gasoline.

The body is made of glass, with a small wick holder made of metal and a belt-like piece of cloth for a wick. Potentially we could make the light level/fuel consumption rate configurable.

Versioned save files.

Add version number to save files and warn that game may be unstable if old saves are loaded.
Ideally make the version number a hash of the executable or something so it automatically changes any time the exe is changed.

Make some monsters steal food and possibly other items. [$40]

Need several pieces of infrastructure for this:
Monster flag for STEAL_FOOD.
Adjustment to monster::plan() to make monsters with this flag consider food a target.
Probably a new monster function take_item() for the monster to use on it's target once it acquires it, which will probably flip the monster plan to either being neutral or running away.
Code in monster::die() to dump contents of inventory when monster is killed.

Similar flag/code for STEAL_SHINY, possibly others.

There is a $25 open bounty on this issue. Add to the bounty at Bountysource.

Off-center explosion when crashing truck with view shifted.

I wrecked a truck while I had my view shifted, and the engine explosion animation was drawn outside the truck. I'm guessing that there's some code somewhere that assumes the view is centered on the player and uses that to determine where to draw vehicle-related things.

Increase resolution of item weight/volume and give all items weight/volume

There are currently quite a lot of 0 weight and/or volume items, which makes for highly unrealistic scenarios.

Increase the resolution of volume/weight such that all items in the game have at least 1 weight/volume.

Also divide the number by a corresponding factor so that there is no user-facing change, except large piles of small items will acquire a non-zero weight.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Give player feedback when vehicle engine condition is deterioriating.

Vehicle engines deteriorate and eventually break when driven higher than their safe speed. This can surprise players because there hasn't been any feedback that they're doing something wrong.

Add messages indicating when the vehicle engine is taking damage from being run too fast, and possibly when it's in danger of taking damage as a warning.

Drawing bugs in overmap display.

After updating the overmap draw code in overmap::draw() to be sized based on the view distance option, there are draw artifacts along the right side of the map and in the area where the type of the currently highlighted terrain is printed.

Probably just needs a clear of some kind.

Centralize item marshalling code into inventory.

The item crafting, vehicle building, and construction classes each have code that implements marshalling and consuming components and charges when using them. This code should be centralized. A likely candidate is the inventory class.

One symptom of this is that held containers are not considered valid targets for crafting if they aren't empty.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Radio frequencies

Add multiple channels to radio transmitters and receivers so multiple signals can be received at a given location rather than only a single signal being received at a time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.