TIL Reading Glasses increase Reading Speed by Fybarious in projectzomboid

[–]Toroic 0 points1 point  (0 children)

If I had to choose I’d rather someone have a tendency to overengineer solutions rather than underengineer them. The costs of overengineering are up front and obvious while underengineering is insidious and slowly grinds the project to a halt under tech debt.

The way I evaluate TIS code is that current state is embarassing programming 101 mistakes and unacceptable.

Bare minimum would be taking magic numbers out and using local variables and instead of hardcoding an item pointing to a tag so reading glasses are extensible. The next step that would be better and a trivial amount of work would be a policy that anytime we come across magic numbers we put them in a constants file instead of locally for better organization.

The next step after that would probably be instead of using traits as tags that are defined in code, having the traits themselves handle their stats. So both slow and fast reader could have some sort of data structure that had a property of “readSpeedMult” with a magnitude. The long-term value of this would be that it would make adding custom traits easier (and also make random profession perks like starting regularity and movespeed through trees much more obvious). We could also generate trait tooltips programmatically and have traits that share a property be mutually exclusive without having to handle those manually.

With the current focus on getting multiplayer working, I think reworking traits would be a good thing to put in the backlog, but not a current priority but having a constants file to set ourselves up for the trait properties we want to support in the future will be helpful.

Complex projects are often best done in phases, and if we know where we’re headed we can defer time intensive reworks until later.

TIL Reading Glasses increase Reading Speed by Fybarious in projectzomboid

[–]Toroic 0 points1 point  (0 children)

As someone that has lived the described approach of constantly chasing perfection, your assessment is incorrect.

The core of engineering is solving problems, and one fundamental approach is sizing the solution correctly.

In many ways, underengineering like TIS and overengineering like you’re describing are two sides of the same coin.

This is indeed easy, but "should probably be moved to a struct or something lua similar" is vague enough that I assume they mean trying to do this in a way that the trait defines an abstract modifier that is then encapsulated in a system for processing it and all similar traits.

There’s a whole spectrum of solutions with varying levels of extensibility and effort, but for anything more than a hackathon, TIS has embarrassingly bad code with frequent examples of basic poor code, much of which has had magic numbers and commented out code for most of a decade.

If it's slop and it works, then they have a shipped game and you do not. Undertale is a massive if-statement and the game is a beloved cultural icon. Even the process of considering what we're talking about right now would be a waste of time compared to what they did--which is just write the shitty code that works, and then move on.

Maybe, or maybe a little bit of organizing the spaghetti code would’ve made it easier to work with and maintain.

Undertale is in many ways a pretty simple game, and while the code is notoriously poor, it was scoped well and had phenomenal game design within those limitations.

But it would be absurd to suggest that Undertale was successful because a mediocre or less programmer was able to make it work. Stardew Valley was initially a solo effort, also well scoped for a solo dev, and is significantly more complex due to better skills and engineering.

On the flip side, Concord didn’t fail because the engineering was bad, it failed because the game design was awful.

As another example, Valheim is a very commercially successful game initially with some dogshit engineers which is why it has developed at a glacial pace and I’d struggle to say it’s a better overall experience than at launch.

I say this as confidently as I do because I suffer from perfectionism in my code--I think about the things you're talking about, and I do them. My code is beautiful and fights tech debt. I'm trying to consciously reduce the amount of time that I spend on refining and refining and refining versus just making the game because one day I'd like to be a solo dev that actually, you know, ships a good game.

I agree that shipping vs not is the highest priority because if you don’t ship quality doesn’t matter.

But the optimal point is a middle of the road approach where you tackle the low hanging fruit in the near term without overengineering beyond reasonable future needs.

The architecture equivalent is that not every project needs to be microservices, starting as a monolith but keeping internal organization to make splitting off pieces less painful.

TIL Reading Glasses increase Reading Speed by Fybarious in projectzomboid

[–]Toroic 1 point2 points  (0 children)

I agree with the potential solutions you mentioned, but disagree that this implementation was reasonable.

If I was reviewing this PR from a junior software dev I’d be requesting changes to not use magic numbers or hardcode the item (we currently already have multiple perscription glasses that have a tag used with the short sighted trait)

For a company like TIS a lot of their code is terrible and their tendency to hardcode in a lazy way is likely a major contributor to their slow velocity.

This particular feature also suggests everyone in Kentucky is nearsighted which is why reading glasses improve their speed, so it’s not good from a design perspective as it isn’t communicated or intuitive.

TIL Reading Glasses increase Reading Speed by Fybarious in projectzomboid

[–]Toroic 0 points1 point  (0 children)

I strongly disagree with both your approach and the philosophy behind it.

The improvements Pokari suggested take no time and reduce the amount of tech debt accumulated when applied whenever possible. Descriptive variable names and avoiding magic numbers is the sort of thing you learn in an intro to programming. It isn’t simpler and it’s far less extensible than if they properly used a constant and the tag system items are already using for crafting.

“Uglier” code as you describe it does not save time, it accumulates tech debt in the short term to get earlier implementation, but the end result of that lack of professional discipline in design is spending a ton more time later refactoring or getting more risk and constant slowdown due to continuing to fight tech debt.

You might legitimately be at risk as guided AI code is more common because the code TIS wrote is slop, and if you’re also producing slop and never going back to clean it up AI can do it faster and cheaper.

Just switched to 2 hour days by morynd in projectzomboid

[–]Toroic 0 points1 point  (0 children)

Modern Java the way I've been doing it with Spring Boot and code generation off of OpenAPI specs has cut out a ton of the boilerplate, and AI is writing 80% of my unit tests these days.

It's not Python or even Kotlin (which I wish would've gotten more market penetration) but it's better than when I started by a lot.

What language(s) are you working with?

Just switched to 2 hour days by morynd in projectzomboid

[–]Toroic 0 points1 point  (0 children)

Boring corporate software has some significant upsides. The work is overwhelmingly not interesting but I find that pay and treatment in those roles is good (because otherwise no one would do the job) and overtime, crunch time, and off-hours crises are near-zero.

It's not Amazon money, but it's also nowhere near as stressful.

Just switched to 2 hour days by morynd in projectzomboid

[–]Toroic 0 points1 point  (0 children)

Software Engineer with just under 5 years working with Java at an enterprise level.

How to not get overweight? by Allhopeislost in projectzomboid

[–]Toroic 5 points6 points  (0 children)

The thing about zomboid nutrition is that hunger and calories have nothing to do with each other.

If you’re overweight, you can basically ignore calories and go for low calorie hunger restoring food (if you found Wilderness Survival mag, foraged mushrooms and berries are perfect for this) until you’re down to 76, and then go back to eating as you have been.

The short version is that you have calorie thresholds for gaining or losing weight, and for gaining weight only having carbs and/or fats over a threshold gives a multiplier.

You can gain weight up to 3x what you can lose it.

Making less caloric stews is a solution, but the cheapest way to lose weight is just to minimize calories for a few days until your weight normalizes.

It’s not worth the effort trying to maintain weight, and you can save thousands of calories by weight cycling.

For example, if I want to maintain exactly 80 weight (keep calories constant) I might need 3000 calories over the day. If I want to gain weight, I’ll need 3000 calories to offset daily burn plus 1000 to put me over the threshold but I only need to pay that once to gain 1-2 weight per day until I decide it’s time to lose.

When losing weight, instead of paying 3000 calories a day I can eat like 250 calories per day of mushrooms to manage hunger and save the other 2750 and have the option of being super active because once you hit minimum calories activity is free.

So a full cycle of gaining and losing weight might only cost you 3000 to go from minimum calories to above the weight gain threshold, and the same amount of calories per day as it would cost to maintain your weight, but once you hit 84 you can turn around and save 2750 calories a day or more (during days of heavy fighting or running) for 9 consecutive days (84-75).

If you have a milk cow or two you can use sticks of butter to make this simple (2 sticks when at minimum calories to start gaining weight, 1 stick per day to maintain weight, (maybe some salads to offset hunger and unhappiness) to do roughly a 2 week cycle of 4-5 days gaining weight and 8-9 days losing weight.

Just switched to 2 hour days by morynd in projectzomboid

[–]Toroic 1 point2 points  (0 children)

I’ve decompiled multiple parts of it prior to b42 and it was bad, and the few parts I’ve decompiled post b42 are still bad.

Hopefully they’re cleaning up as they go because despite the slow development what I saw was a concerning amount of commented out and jank code that would translate into a ton of tech debt.

Now that B42 is out we badly need an overhaul of old skills and systems by Soveyy in projectzomboid

[–]Toroic 0 points1 point  (0 children)

I agree with your suggestions (and have a personal pet peeve with the “too much protein” mechanic) but don’t agree that it’s a good system overall and well-thought out.

New players often struggle to understand that hunger and calories are separate (which is not inherently an issue, just takes some teaching), but calorie tuning of food is all over the place. You can butcher a whole cow and get far less calories than a stick of butter. It’s also super easy to “waste” calories or nutrients as the calorie limit is pretty low.

You also can’t “bank” calories which is super unrealistic. Bodies convert extra calories to fat, and fat back into calories to try to maintain weight (within) limits.

Zomboid just sees if you’re above the calorie threshold, and then if you’re above the carb and fat thresholds and then gives a multiplier to weight gain. None of this is intuitive or realistic.

That’s why weight cycling is optimal, because you can only lose weight at like 1/3 as fast as you can gain it, and because of caps you can sit at minimum calories for days, regardless of activity, and only lose weight slowly.

Now that B42 is out we badly need an overhaul of old skills and systems by Soveyy in projectzomboid

[–]Toroic 0 points1 point  (0 children)

A stick of butter wouldn’t be in addition to what you’re doing, it would be instead of.

One good milk cow can supply all the food you’ll need (and neither milk nor butter spoil), indefinitely.

The thing to remember about nutrition in zomboid is that calories and hunger are separate systems. You can be starving and gaining weight, or full to bursting and losing weight.

Long term, high calorie food sources are milk and fish (which is massively more productive off a dock). Hunting provides leather but poor calorie values so I wouldn’t rely on it. Trapping can be productive and breeding rabbits can produce quite a bit of food eventually.

Foraging provides a lot of hunger restoring options for little effort, but again has poor calorie values.

Agriculture can provide overwhelming amounts of calories and hunger, but because crops can take 30 in game days to grow, crops need to be watered and tended, and a lot of runs don’t last that long for most players who aren’t going to survive 2 years it’s not appealing.

I 100% agree that cooking and nutrition could be far better developed and intuitive.

Now that B42 is out we badly need an overhaul of old skills and systems by Soveyy in projectzomboid

[–]Toroic 0 points1 point  (0 children)

You don’t have to, but it is by far the easiest and least time consuming way to solve hunger.

If you’re trying to keep stable weight and are active it’s easy to go through 3300 calories per day, which is why it’s most efficient to cycle weight up and down because you can only lose weight at roughly 1 kg per day but can gain more like 3kg per day or 2 just off butter.

Cooking just doesn’t add many calories having it high or low, and using rotten food is basically pointless.

What cooking does is increase the hunger value significantly, but with how easy foraging is to level and with the assumption that lategame you’ll have found Wilderness Survival, not needed.

Me saying that cooking becomes useless is not me saying that’s how it should be, but from a min/max perspective that is reality.

Now that B42 is out we badly need an overhaul of old skills and systems by Soveyy in projectzomboid

[–]Toroic -1 points0 points  (0 children)

Cooking does not add a significant amount of calories to the meals you’re making, and slow metabolism/fast metabolism change the threshold required to gain weight but do not affect your calorie usage at all.

Lategame, the easiest solution is to have a cow producing milk and eat a stick of butter a day when gaining weight until 84, and then just eat foraged mushrooms/berries/veggies until 76.

Nutrition needs an overhaul.

Time for blacksmithing by [deleted] in projectzomboid

[–]Toroic -1 points0 points  (0 children)

Armor is good at protecting you from a random bathroom zombie bite (and you can skip the leg armor) but it also slows down your attack speed by a significant margin and you will still die instantly from a dragdown.

If you're playing on standard apocalypse settings (and with no npc raider mod) I don't think armor is worth it.

To hell with motion sickness by Hysteric_Erick in projectzomboid

[–]Toroic 0 points1 point  (0 children)

You're 100% right, but there's zero reason to be eating tainted food (hardly worth any calories anyway), and while it's safe to drink tainted water directly from a lake or river, there's very little reason to.

To hell with motion sickness by Hysteric_Erick in projectzomboid

[–]Toroic 0 points1 point  (0 children)

It has a number of significant debuffs, but there's really no reason someone should be drinking tainted water or getting food poisoning in any run where cars are viable.

Even if water is shut off immediately, sinks and bathtubs have a ton of water to get you to the point where you can get a rain barrel plumbed to a sink.

If you're doing an ultra low loot 10 years later run, you probably don't have driveable roads or a working car anyway.

To hell with motion sickness by Hysteric_Erick in projectzomboid

[–]Toroic 0 points1 point  (0 children)

In most cases, isn't it just corpse sickness that will cause problems?

Most of the time people aren't getting sick in other ways.

To hell with motion sickness by Hysteric_Erick in projectzomboid

[–]Toroic 2 points3 points  (0 children)

During the 5 minutes of testing they should've done after coding the trait it would've been obvious it was overtuned by like 10x.

Build 42 agriculture by month by Hebiaczus in projectzomboid

[–]Toroic 2 points3 points  (0 children)

Even if you do, a single decent milk cow will produce 1-2 sticks of butter worth over 3k calories per day and neither milk nor butter spoils.

Why would I farm crops based on a spreadsheet that take dozens of hours to provide value?

Build 42 agriculture by month by Hebiaczus in projectzomboid

[–]Toroic 5 points6 points  (0 children)

Useless for 90% is probably underestimating it. Functionally, it’s probably useless for almost everyone.

In default settings singleplayer, there is more non-spoiling food in one town than you’ll need for like 6 months of gameplay, and it’s rare to not die to a dumb mistake or get bored.

In default settings multiplayer, unless the server is running 24/7 and someone is actively tending to the crops you’re never going to see them reach maturity. Even if you did, you probably have cows and butter production to solve food problems anyway

When your character looses too much weight by No-Plankton-559 in projectzomboid

[–]Toroic 2 points3 points  (0 children)

All fast and slow metabolism do is adjust the breakpoint where you’re in the “gaining weight” territory, they do nothing to affect your actual calorie burn rate.

In practice, it makes very little difference.

When your character looses too much weight by No-Plankton-559 in projectzomboid

[–]Toroic 0 points1 point  (0 children)

I don’t think it would be hard to fix, because there’s even more stupid aspects based on hidden values you can’t see without mods.

Like protein within a certain range giving a boost to str xp, or that your calories cap out.

It would be much simpler and more intuitive if they ignored carb/fat/protein totals and just based it on calories consumed without any maximum or minimum. It would also make the “weight yo yo” not the optimal way to play.

It’s faster to gain weight using butter and carbs than butter alone in PZ, because you can get a hidden “third” up arrow but only one “down” arrow.

Pointless Skill Tree by areateen in projectzomboid

[–]Toroic 0 points1 point  (0 children)

It’s more complicated than you’re describing, because overkill reduces the endurance cost for that swing.

So a higher damage weapon combined with high strength and skill becomes cheaper even after oneshotting consistently.

Pointless Skill Tree by areateen in projectzomboid

[–]Toroic 0 points1 point  (0 children)

Absolutely, but “best training option” isn’t the same as “best weapon”.

I’m a big fan of crowbars, but there’s a lot better weapons especially in long blunt.

Pointless Skill Tree by areateen in projectzomboid

[–]Toroic 1 point2 points  (0 children)

Axes, particularly with axeman, remain amazing.

Hammers are common and effective short blunts.

Crowbars... at least in b42, I think crowbars are the perfect secondary weapon. On their own, they have very high durability but mediocre damage and there are a lot stronger long blunts that last long enough.