Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 474 475 [476] 477 478 ... 777

Author Topic: Cataclysm: A Zombie-Survival Roguelike  (Read 1314421 times)

Whales

  • Bay Watcher
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7125 on: October 20, 2011, 12:56:06 am »

It's actually the worms tearing each other to pieces--I guess I'll change that, it doesn't work as intended!
Logged
Cataclysm Source Code:  https://github.com/Whales/Cataclysm
Official Cataclysm Forums:  http://whalesdev.com/forums/index.php
My Twitter - mostly Cataclysm related:  http://twitter.com/#!/whalesdev

Join me in #cataclysmrl on irc.quakenet.org!

Symbiode

  • Bay Watcher
  • Mushrooms = bad
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7126 on: October 20, 2011, 01:26:03 am »

Either way it's sloppy code that leads to a lot of more-or-less meaningless values in the item definitions that could leave future developers (or myself) scratching their head.  The kind of thing I like to try to avoid when I can see it happening.

As a preface: I don't know C++.

I threw the following together to hopefully make a jumping off point in pseudo-code. Looking at it again it would most likely be better do make the layer definitions a struct and store the INNERMOST and OUTMOST values in those, but hopefully you get what I was going for. I have no idea how you have the current data set up for the items or the player as, again, I don't know C++ and can't read the source very well due to that.

Code: [Select]
//constants for innermost items per slot
static int CHEST_INNERMOST_INNER;
static int CHEST_INNERMOST_MIDDLE;
etc..

//constants for outermost items per slot
static int CHEST_OUTERMOST_OUTER;
static int CHEST_OUTERMOST_EXTERNAL;
etc..

enum LAYER {
   INNER = 1,
   MIDDLE = 2,
   OUTER = 3,
   EXTERNAL = 4
};

void init() {
initLayerMap();
CHEST_INNERMOST_INNER = getChestInnermostInner();
etc...
}

int getChestInnermostInner() {

int innermost = null;

for (item : items) {

if (item.slot == CHEST_SLOT && item.layer == LAYER.INNER && (innermost == null || (item.priority < innermost) )
{

innermost = item.priority - 1;
}
}
}

item shirt() {
string slot = CHEST_SLOT;
string layer = LAYER.INNER;
//item will alwys be innermost item in inner slot
int priority = CHEST_INNERMOST_INNER;
}

item vest() {
string slot = CHEST_SLOT;
string layer = LAYER.INNER;
//item will always go over shirt
int priority = shirt.slot + 1;
}

item sweater() {
string slot = CHEST_SLOT;
string layer = LAYER.MIDDLE;
//arbitrary number, will be used only in cases where multiple items on the same layer.
int priority = 3;
}

item trenchcoat() {
string slot = CHEST_SLOT;
string layer = LAYER.OUTER;
int priority = CHEST_OUTERMOST_OUTER;
}

void equipitem (item i, String slot) {

//get currently equipped items
items[] items_equipped = player.getItemsEquipped(slot);

//add item to end of array
items_equipped[sizeof items_equipped+1] = i;

//sort array with new item
for () {
//sort array by layer and priority
}

}


You would still have arbitrary values, like the sweater, but it would still let you control where items go when it matters, such as the shirt or vest definitions.
« Last Edit: October 20, 2011, 01:27:48 am by Symbiode »
Logged

Whales

  • Bay Watcher
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7127 on: October 20, 2011, 01:45:59 am »

A minor update focused on bugfixes and minor features.

EDIT: Oops, original commit included a freeze when generating weed basements.  Fixed and re-upped.

A clean build is required.  Old saves are not compatible.

Features:
  • Repair Door, Board Up Door, and Board Up Window are now constructions.
  • Hammers and crowbars can pry off boards from boarded up doors / windows.
  • savanik's excellent patch merged.  This includes bows and arrows, craftable bows, a new Archery skill, and renames the Butchering skill to Survival.
  • Per savanik's all-too-obvious suggestion, a new psuedoitem, fire, for use only in crafting.  This allows you to cook using nearby fire!
  • Messages buffer updates when you die.  In theory, this should allow you to identify what killed you much more often, if not always.
  • This was present in the last release but I forgot to mention it; targeting a monster with a gun or thrown weapon will print the range.
  • New random map extra: Drug Deal Gone Bad
  • Two new basement types: junk basement (nothing special here) and Marijuana Grow.


Tweaks:
  • Clean Window construction reduced to 5 minutes (from 8 )
  • Wolf packs reduced in size from 4-10 to 3-6.
  • Giant worms no longer kill each other.
  • Swamp populations greatly reduced.
  • Thrown item damage greatly nerfed.


Bug Fixes:
  • Crafting using food items as a resource (e.g. cooking meth from pills) correctly uses charges, not bottles.  (Coders: see below)
  • Schizophrenics with Intelligence 0 (achieved through debuffs, e.g. pain penalty) will no longer scratch themselves to death.
  • Pressing 'g' when picking up items no longer selects/deselects all items.
  • Fixed a crash when canceling directional drop.
  • Fixed a rare crash during multidrop.
  • Warnings about dropping an item that is actually a bionic will only occur once per drop.
  • Smashing webs now works properly.
  • Fixed rare bionics showing up in common bionics rooms sometimes.
  • Experiencing an asthma attack when you don't have an inhaler will prompt you to cancel your activity.
  • Some typo fixes.


Misc/For Coders:
  • Updated the Makefile with the -pg option for profiling with gprof or similar (off by default)
  • Minor (and seriously incomplete) edit of TODO
  • Added count_by_charges() function to itype and item.  Returns true if crafting (or similar) should count this item by its charges--basically, ammo and multi-charge comestibles.
« Last Edit: October 20, 2011, 01:58:23 am by Whales »
Logged
Cataclysm Source Code:  https://github.com/Whales/Cataclysm
Official Cataclysm Forums:  http://whalesdev.com/forums/index.php
My Twitter - mostly Cataclysm related:  http://twitter.com/#!/whalesdev

Join me in #cataclysmrl on irc.quakenet.org!

ChairmanPoo

  • Bay Watcher
  • Send in the clowns
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7128 on: October 20, 2011, 01:56:13 am »

Quote
Thrown item damage greatly nerfed.
Nice. It was kind of strange to be able to kill monsters by throwing CLOTHES at them :p

(IMO a melee nerf is also in order, as I commented earlier. An experienced char killing regular zombies with a spiked board effortlessly is somewhat reasonable. Doing the same to hulks and bears, not that much :) )
Logged
Everyone sucks at everything. Until they don't. Not sucking is a product of time invested.

Whales

  • Bay Watcher
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7129 on: October 20, 2011, 01:59:48 am »

Yes, I started to look at retooling melee but decided to leave it until later and get this out tonight.  In particular, I think I am going to require a crit to pass three different checks; skill check, Dex check, and weapon to-hit check.  Maybe best 2 of 3 or something.  Crits are generally what make easy kills really easy, so.
Logged
Cataclysm Source Code:  https://github.com/Whales/Cataclysm
Official Cataclysm Forums:  http://whalesdev.com/forums/index.php
My Twitter - mostly Cataclysm related:  http://twitter.com/#!/whalesdev

Join me in #cataclysmrl on irc.quakenet.org!

S.K. Ren

  • Bay Watcher
  • I disbelieve and jump!!!
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7130 on: October 20, 2011, 02:13:09 am »

Not really... I deal non crit 40-60 damage and taking that to the head will decapitate most zombies. Crits usually land me 140 ish damage :P

Also
A clean build is required.  Old saves are not compatible.

Nooooooooooooooo!
Logged
Simon-v: How do you live in a world where Everything's Trying To Kill You?
xander_morhaime: Briefly.

Shades

  • Bay Watcher
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7131 on: October 20, 2011, 02:52:28 am »

And yeah, encumbrance was my first instinct but obviously doesn't necessarily work.  I might just end up adding an extra variable to clothing items to decide which layer they're on... but that isn't very expandable (if t-shirt is layer 1 and sweatshirt is layer 2, what happens when I add a button-down shirt, intended to be worn between the two?  I'd have to rewrite layer values all over).

Surely the solution here is for a t-shirt to have a layer of LAYER::TSHIRT and a sweatshirt LAYER::SWEATSHIRT and then have an enum class LAYER { TSHIRT, SWEATSHIRT } and then forget about the fact they are numbers?
If you want things to use the same layer they could be more generically named and then use the order put on, and increase the encumbrance for multiple one the same layer.

I'm just glad all the clothes stores (and peoples houses..) only have clothes in your size, imagine what pain it would be if had to find a size M or size XXL t-shirt ;)
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

The Merchant Of Menace

  • Bay Watcher
  • Work work.
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7132 on: October 20, 2011, 02:53:39 am »

It's the future, everything is one size fits all.
Logged
*Hugs*

BishopX

  • Bay Watcher
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7133 on: October 20, 2011, 09:41:50 am »

So I've decided to play an ultra rational character (geniuses can be schizophrenic too). To that end, once I established my supply of food and morale items I headed staight for a gun store, where I picked up a USP. 45 (my big gun) and a Sig Mosquito (my little gun). Since I had absolutly no skill with guns, I decided the rational thing to do would be to practice. So I picked up some crappy ammo for my Mosquito, took a couple of swings of whiskey, smoked a blunt, read some porn and then proceeed to target shoot, and shoot, and shoot. After expending 150 rounds (with periodic porn and whiskey breaks), I had skill 3(2%) firearms and skill 2(79%) handguns. I also had a few observations. Shooting at a wall in boring, especially when the game tells me I keep missing. Using a .22 to target shoot seems very risk free so far, I've been shooting for more than 2 hours now (including breaks) and no zombies have shown up. At this level of risk it would be nice for an abstracted process for practice. Granted, if I was skeet shooting with my trusty 12 gauge, it would be slightly different. My final observation is that it seems nonsensical that the general skills (melee, firearms) increase faster than the more specific skills (e.g. Pistols). Why is it easier to generalize your abilities than to become better at the specific thing you are doing?
Logged

Whales

  • Bay Watcher
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7134 on: October 20, 2011, 01:05:46 pm »

So I've decided to play an ultra rational character (geniuses can be schizophrenic too). To that end, once I established my supply of food and morale items I headed staight for a gun store, where I picked up a USP. 45 (my big gun) and a Sig Mosquito (my little gun). Since I had absolutly no skill with guns, I decided the rational thing to do would be to practice. So I picked up some crappy ammo for my Mosquito, took a couple of swings of whiskey, smoked a blunt, read some porn and then proceeed to target shoot, and shoot, and shoot. After expending 150 rounds (with periodic porn and whiskey breaks), I had skill 3(2%) firearms and skill 2(79%) handguns. I also had a few observations. Shooting at a wall in boring, especially when the game tells me I keep missing. Using a .22 to target shoot seems very risk free so far, I've been shooting for more than 2 hours now (including breaks) and no zombies have shown up. At this level of risk it would be nice for an abstracted process for practice. Granted, if I was skeet shooting with my trusty 12 gauge, it would be slightly different. My final observation is that it seems nonsensical that the general skills (melee, firearms) increase faster than the more specific skills (e.g. Pistols). Why is it easier to generalize your abilities than to become better at the specific thing you are doing?

It's for this reason that I think I'm going to change the XP system.  Instead of using a skill to spend points, the game will keep track of how often you use your various skills--say, 20% melee, 15% bashing, 5% cutting, 10% firearms, 10% handguns, 15% first aid, 15% mechanics, 10% dodging.  Then, as soon as you gain XP, it spends it in the correct area.  I might also implement turning off skills a la DCSS, so that players don't have to shoot a wall if they want their firearms skill to be more likely to receive XP.
Logged
Cataclysm Source Code:  https://github.com/Whales/Cataclysm
Official Cataclysm Forums:  http://whalesdev.com/forums/index.php
My Twitter - mostly Cataclysm related:  http://twitter.com/#!/whalesdev

Join me in #cataclysmrl on irc.quakenet.org!

ThtblovesDF

  • Bay Watcher
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7135 on: October 20, 2011, 01:24:28 pm »

Refilling a lighter (windows version) from a gas pump crashes the game, no error report.
Logged

G-Flex

  • Bay Watcher
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7136 on: October 20, 2011, 01:48:49 pm »

I'm honestly not sure an XP system is even necessary. Surely there are ways that morale could more directly affect skill gain and cut out the middleman, and I'm pretty sure I've heard a couple decent proposals for how that could be done.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

S.K. Ren

  • Bay Watcher
  • I disbelieve and jump!!!
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7137 on: October 20, 2011, 01:50:57 pm »


It's for this reason that I think I'm going to change the XP system.  Instead of using a skill to spend points, the game will keep track of how often you use your various skills--say, 20% melee, 15% bashing, 5% cutting, 10% firearms, 10% handguns, 15% first aid, 15% mechanics, 10% dodging.  Then, as soon as you gain XP, it spends it in the correct area.  I might also implement turning off skills a la DCSS, so that players don't have to shoot a wall if they want their firearms skill to be more likely to receive XP.

That's exactly what Dungeon Crawl Stone Soup did. However if you go this route, you should also look into how they implemented it cause training new skills will be a bitch if they have to compete with every previous action to get EXP.
« Last Edit: October 20, 2011, 01:53:09 pm by S.K. Ren »
Logged
Simon-v: How do you live in a world where Everything's Trying To Kill You?
xander_morhaime: Briefly.

Whales

  • Bay Watcher
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7138 on: October 20, 2011, 01:56:49 pm »

Refilling a lighter (windows version) from a gas pump crashes the game, no error report.

Fixed.  Thank you
Logged
Cataclysm Source Code:  https://github.com/Whales/Cataclysm
Official Cataclysm Forums:  http://whalesdev.com/forums/index.php
My Twitter - mostly Cataclysm related:  http://twitter.com/#!/whalesdev

Join me in #cataclysmrl on irc.quakenet.org!

Whales

  • Bay Watcher
    • View Profile
Re: Cataclysm: A Zombie-Survival Roguelike
« Reply #7139 on: October 20, 2011, 02:09:02 pm »


It's for this reason that I think I'm going to change the XP system.  Instead of using a skill to spend points, the game will keep track of how often you use your various skills--say, 20% melee, 15% bashing, 5% cutting, 10% firearms, 10% handguns, 15% first aid, 15% mechanics, 10% dodging.  Then, as soon as you gain XP, it spends it in the correct area.  I might also implement turning off skills a la DCSS, so that players don't have to shoot a wall if they want their firearms skill to be more likely to receive XP.

That's exactly what Dungeon Crawl Stone Soup did. However if you go this route, you should also look into how they implemented it cause training new skills will be a bitch if they have to compete with every previous action to get EXP.

I thought DCSS used something similar to the current system, where using a skill spends XP?  Hence victory dancing and such.

But yeah the percentage thing would take time into account.  Recent actions would be weighted much more than those you performed a while ago.  Or maybe it'd just be the ratios of the actions you performed during the past two hours or something.


I'm honestly not sure an XP system is even necessary. Surely there are ways that morale could more directly affect skill gain and cut out the middleman, and I'm pretty sure I've heard a couple decent proposals for how that could be done.

What I'm proposing is exactly that actually.  There is no XP--as you get skill points from morale, they're directed immediately into skills.
Logged
Cataclysm Source Code:  https://github.com/Whales/Cataclysm
Official Cataclysm Forums:  http://whalesdev.com/forums/index.php
My Twitter - mostly Cataclysm related:  http://twitter.com/#!/whalesdev

Join me in #cataclysmrl on irc.quakenet.org!
Pages: 1 ... 474 475 [476] 477 478 ... 777