Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Wasteland People Bitching About Jamming

toro

Arcane
Vatnik
Joined
Apr 14, 2009
Messages
14,919
Terrible optimization? That shit can fetch one integer and add it to another up to THREE TIMES per someone shooting a gun. Hello framerate killer!
Premature optimization is the root of all evil.

What happens when there is no other way to implement something except ... in a optimized way? Like for embedded systems, automotive, aviation, space stuff?
 

Norfleet

Moderator
Joined
Jun 3, 2005
Messages
12,250
What happens when there is no other way to implement something except ... in a optimized way? Like for embedded systems, automotive, aviation, space stuff?
Then it wouldn't be premature, now would it?
 

tuluse

Arcane
Joined
Jul 20, 2008
Messages
11,400
Serpent in the Staglands Divinity: Original Sin Project: Eternity Torment: Tides of Numenera Shadorwun: Hong Kong
What happens when there is no other way to implement something except ... in a optimized way? Like for embedded systems, automotive, aviation, space stuff?
The key word is premature.

Edit: oops
 

Jasede

Arcane
Patron
Joined
Jan 4, 2005
Messages
24,793
Insert Title Here RPG Wokedex Codex Year of the Donut I'm very into cock and ball torture
lol jamming

The best guns have 4% jamming chance
You can get the -4% jamming chance items at level 1

I'm on SJ and nothing has ever jammed for me, only for enemies - on account of my jam chance being 0%. If anything the jamming needs to be more frequent.
 

toro

Arcane
Vatnik
Joined
Apr 14, 2009
Messages
14,919
What happens when there is no other way to implement something except ... in a optimized way? Like for embedded systems, automotive, aviation, space stuff?
The key word is premature.

Edit: oops

The key word is not applicable to certain software projects (embedded/HW drivers) because usually either the code is optimized and it works or it doesn't work at all. There is no proper time to do optimizations or not.
 

Shadenuat

Arcane
Joined
Dec 9, 2011
Messages
11,977
Location
Russia
lol jamming

The best guns have 4% jamming chance
You can get the -4% jamming chance items at level 1

I'm on SJ and nothing has ever jammed for me, only for enemies - on account of my jam chance being 0%. If anything the jamming needs to be more frequent.
except only rifles of both types and pistols can get magazines mods. well, lazors don't jam too.
great fun running in front of cluster of mobs with Jackhammer, jam, cry cock, use unspent action points to run all way back before you get raepd
 

Jasede

Arcane
Patron
Joined
Jan 4, 2005
Messages
24,793
Insert Title Here RPG Wokedex Codex Year of the Donut I'm very into cock and ball torture
I don't mean to sound like a combat-fag, but it'd never occur to someone like me (or Mondblut) to ever use weapons that aren't statistically the best. In this case that'd mean either 4x Assault Rifles or 3x Assault Rifles 1x Sniper/GammaRay.

Unless you're a casual and don't play SJ, then you can pick whatever weapon you want since the game was apparently balanced for The New Generation.
 

Shadenuat

Arcane
Joined
Dec 9, 2011
Messages
11,977
Location
Russia
I don't mean to sound like a combat-fag, but it'd never occur to someone like me (or Mondblut) to ever use weapons that aren't statistically the best. In this case that'd mean either 4x Assault Rifles or 3x Assault Rifles 1x Sniper/GammaRay.

Unless you're a casual and don't play SJ, then you can pick whatever weapon you want since the game was apparently balanced for The New Generation.
So... weapons that are suboptimal and can't be upgraded are alright because you are too good of a player to use them?
:retarded:

Also, Jackhammer is a fine weapon, it's 3x burst like rifle but in cone. You don't even need 4-5 assault rifles to play on highest difficulty, 2 suffice. Only melee/heavy/pistols get short end on SJ.
Well, heavy/pistols just suck.
 

tuluse

Arcane
Joined
Jul 20, 2008
Messages
11,400
Serpent in the Staglands Divinity: Original Sin Project: Eternity Torment: Tides of Numenera Shadorwun: Hong Kong
Pistols are good for spreading damage to multiple targets because of the low AP cost. Great for finishing off when enemies are super low on health.
 

Spockrock

Augur
Joined
Jan 2, 2011
Messages
457
I would really like to see you stumbling in explaining the O(n) shit.

73075.jpg
 

toro

Arcane
Vatnik
Joined
Apr 14, 2009
Messages
14,919
Sorry for the late reply.

Basically I don't see anything wrong with the code but we don't have all the code in that picture: please post the content of current.GetBonus("chanceToJam") function.

Until then my assumption is that Unity's RNG generator might be fucked meaning that it generates more numbers closed to 0 (could be a special case just for some type of processors).

Other than this, the code is unoptimized: the addition of chanceToJam each fucking time is retarded. I wonder why?
What is wrong with calculating each chance by itself? That's what random means.

There is nothing wrong with checking the chance-to-jam for each shoot, in fact that's the purpose of that code and what is needed.

The problem is that the code is calculating the chance-to-jam threshold every-time a player/npc is shooting -> the threshold is the return of GetChanceToJam() function.

There is no need to compute the chance-to-jam each time you shoot because this threshold doesn't change between shoots (unless inXile implements weapon degradation).

And it's obvious that a sane implementation would save this threshold per avatar/npc and then update it only when change conditions are present: weapon was changed, new mod was applied or removed and so on.

But I guess you want them to use a table that is filled in advance, so it is "fair" and jams exactly 2 times in every 100 shots, if it's 2%?

This is actually the point of the entire discussion. Maybe there is a confusion on my side or not but imweasel stated something like that: "5% chance to jam ≙ statiscally, 1 out of 20 shots will cause your gun to jam"

The fact is that the implemented code has nothing to do with what imweasel stated cause it just does the following:
- compute chance-to-jam threshold, which is redundant in my opinion irrelevant of run-time penalties,
- takes a random number in the 0 to 100 range,
- compares this to the threshold and return true/false depending on the comparison result.

It is pretty evident that this entire implementation depends on the RNG quality and that it doesn't implement a statistical model.

I have no strong personal preferences but a statistical model might be better for one reason -> reducing save scumming.

Basically with the current implementation, as long as you have 1% chance of opening a safe then you can save scum until you will open that safe.

But if a statistical model system was implemented like imweasel said then it would be impossible to open some safes because the model will dictate that you must have 2% percent of failures.

How this statistical mode is implemented is not really important. It can be done with lists or math formulas considering the past success rate or other factors. It really depends what the developer wants.
 

gromit

Arcane
Joined
Jan 31, 2005
Messages
2,771
Location
Gentrification Station
There is no need to compute-and-store the threshold on weapon / swap. There's no need to add calls to recalculate in every "and so on." There's no need to introduce the potential for any of those numbers to ever fall out of sync, for any reason, no matter how "wrong" the code that causes that to happen would be.

The code adds four numbers together each time you shoot, in a turn-based game.

A "sane implementation" of anything would avoid creating any complication, or adding any work, no matter how minor, for a benefit that would be barely noticeable... even in ideal conditions and under massive workload.

I gave you a very trustingly-written bit of theory which you chose to ignore.

So look, here: will this make you happy?
gromit said:
toro has correctly identified three numbers which could be summed prior to that point
 
Last edited:

toro

Arcane
Vatnik
Joined
Apr 14, 2009
Messages
14,919
There is no need to compute-and-store the threshold on weapon / swap. There's no need to add calls to recalculate in every "and so on." There's no need to introduce the potential for any of those numbers to ever fall out of sync, for any reason, no matter how "wrong" the code that causes that to happen would be.

The code adds four numbers together each time you shoot, in a turn-based game.

A "sane implementation" of anything would avoid creating any complication, or adding any work, no matter how minor, for a benefit that would be barely noticeable... even in ideal conditions and under massive workload.

I gave you a very trustingly-written bit of theory which you chose to ignore.

So look, here: will this make you happy?
gromit said:
toro has correctly identified three numbers which could be summed prior to that point

I did not see ur post. Sorry. I'm not happy.
 

Immortal

Arcane
In My Safe Space
Joined
Sep 13, 2014
Messages
5,070
Location
Safe Space - Don't Bulli
There is no need to compute the chance-to-jam each time you shoot because this threshold doesn't change between shoots (unless inXile implements weapon degradation).

Or if a player could spend AP to attach a mod in combat between gun shots..
What kind of horrible developers would design logic that accounted for that?
 

Foobar

Barely Literate
Joined
Oct 7, 2014
Messages
3
ITF: people don't understand probability.
Most people, both designers, and users, see values of 90% or better as "very good". An engineer will tell you that even 99% is shit. Any engineer building you something that only works 99% of the time is going to find himself embroiled in a vicious lawsuit and/or lose his job.
It's true, my PCs tried to file a class action suit against negligent gun manufacturers. Sadly, most of those jerks (and the civil court system) got away on the technicality of being killed by the apocalypse.

TL;DR for this entire topic: Melee, Sturdy Mag, Energy. Done.
 

Norfleet

Moderator
Joined
Jun 3, 2005
Messages
12,250
Or if a player could spend AP to attach a mod in combat between gun shots..
What kind of horrible developers would design logic that accounted for that?
Actually, I believe the issue in question stems from the fact that the function is called multiple times for the SAME gunshot. This is sort of a programming sin, since calling that blackbox function may entail numerous redundant computations on something that should not be changing anyway. A decent compiler would probably optimize that, albeit I would not call the .NET compiler very decent, if that kind of structure is appearing when you decompile it back. However, I don't really think this is important. It's a relatively small function where the redundant calls are only made very infrequently relative to the rest of the program, as the game is not exactly a thousand-round all-you-can-eat projectile buffet. It's bad coding, but it's not bad coding that affects anything important. There are certainly bigger fish to fry.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom