Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Procedural game development?

Discussion in 'Game Design' started by imaginaryhuman, Jan 3, 2017.

  1. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    Was there something to ruin? Everyone I know hated the original game, didn't buy the TWD version, and isn't buying the sequel either. And yet, it seems to have a fanbase all the same... 10,280 reviews with 91% positive, 151 recent with 84% positive, that following is...

    Wait for it...

    OVER 9,000!

    Honestly, I don't get it.
     
    CarterG81 likes this.
  2. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I believe I get it. I both love/hate the game. I understand the positive reviews, but feel like it is a severely flawed game.

    Why the love? Why the fantasy and good reviews?

    Simple. There is nothing else like it.

    This is a pretty strong factor for A LOT of games. Especially ones which carve out a strong niche. It is even, IMO, the only real reason some games (like Bethesda's) are so beloved despite their endless bugs, issues, and outdated engines or repetitive sequels.

    What other game lets you break out of prison? What other game gives you a 'Shawshank Redemption' vibe? Only The Escapist. So if you are like me and love that experience, what else can you do? Hate the only game that exists for that feel, just because it is S***ty? Some levels were fantastic, even if the game as a whole sucked hard.

    Dwarf Fortress is another great example of this phenomenon. It is simultaneously one of the greatest and S***tiest games to ever exost. It is simultaneously popular with everyone claiming to play it AND a game that no one actually plays (DL numbers are abysmal even considering its age, when compared to successful or even mediocre games.)

    And what other games are like Skyrim? Fallout? Even successes like Witcher 3 force you to be the same guy- no character customization. GTA V is a completely different theme. Open world survival games blow hard and don't even come close. So if you want Skyrim you play Skyrim or Oblivion or ESO. Then when something like Vampire Masquerade Bloodlines comes out it gets a huge niche and high reviews. That's why.

    Finally look at FTL. The only game to ever give you a 'star trek feel'. Even star trek games fail to do this, lol. No wonder it is such a success.

    It's all about Demand. Almost every game is a fking platformer for God's sake. There are games from the 90's that are more innovative than 99.99% of what came out before the indie explosion. And most of that explosion is green light S***. We're only just now seeing a lot of new game systems, and they're rare or often plagued with flaws.

    And honestly, negatively reviewing The Escapists will probably assure you never see another prison breakout game like it ever again. That would be awful for ppl who would love a better one.
     
    Last edited: Mar 14, 2017
  3. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    That's how every Elder Scrolls game starts. ;)

    But paradoxically, positively reviewing it probably assures you never get a better one, because everybody loves the one you have. The niche exists, but it's also full. Nobody is saying "we need another one." In fact, the Steam Workshop probably hamstrings the competitive market even more.

    Secondary example, where are the competitors to Stardew Valley?

    We screamed and cried about wanting Harvest Moon on the PC for over a decade before we got one, and now we still have just that: ONE. And it's not even particularly good. But it's something, which is better than nothing, so we give it good reviews and nobody makes another one.
     
  4. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I'd have to disagree there. Stardew Valley is an extremely well designed, high quality game.

    The demand finally came, and we got one. It was so good, maybe it did hurt the competition. In for one would not feel comfortable making a game like it unless I could match the quality. Otherwise your game will just be a 'crappie stardew valley'.

    At the same time as a consumer, I would immediately nab any Stardew Valley clone; especially if it had the same quality standard. Oh boy would gamers be happy.

    I think you are right in that a highly reviewed game will hinder clones. That lack of confidence would have real ramifications on developer's choice in projects. It is very hard to compete with a game like Stardew. But it would be trivial to make a better game than Escapists.

    That is my opinion anyway. I believe that I could tangibly show evidence that Escapist is bad design while Stardew is great design. That it isn't merely an opinion, but a scientific fact based on verifiable criteria. I could be wrong, but I doubt it.

    So part of success then, in this context, would be one's ability to differentiate between real quality and -somehow- great reviews despite bad quality. And confidence to believe you can make a better version as well as the competence required to actually do so. Three factor restraints absolutely must reduce likelihood of a clone. So you're right I think.
    .
    .
     
  5. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I'd also like to note that Stardew Valley is a very recent release. It takes years for clones to appear.

    Don't Starve released on April 2013, despite its incredible success didn't see a clone until Jan 2016.

    Crashlands is an inferior clone (sales pale in comparison to DS), but still did very well as a game.

    I think you're right though. Some major successes, just like DS, don't see clones for some reason. That is the only game remotely like it. Darkest Dungeon(Jan 2016) may never see a clone despite success. But games like Minecraft have seen endless voxel clones. But Minecraft is from 2011.

    Could be a time thing. Then again Rinworld is seeing its iteration/clone now. Klei.s new title in development is Oxygen, and Rimworld released Jul 2016. But idk if that includes early access.
     
  6. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    But it's not Harvest Moon, primarily because it lacks the focus. There's too much stuff. Like, way too much. It's around five times the scope of HM.

    That doesn't make it a bad game, but it does mean it lacks the particular element of HM that I personally wanted: when you play HM, you only have a limited number of things you can do. SV has those things, but it also has these things and some other things and there's this and that and those and it never ends. I end up paralysed by the sheer quantity of choice.

    Again, not because it's a bad game. But because it's not what I want from an HM clone.

    Who cares?

    Look at the huge glut of clicker games. There are five thousand different clones of Clicker Heroes, and most of them aren't as good. Look at all the Minecraft clones that don't even have a meaningful crafting system.

    I am betting that if you made a game half as good as Stardew Valley and charged a higher price, you would still sell to damn near everybody who bought Stardew Valley and get a good review from them. Because this is a market that bought a half dozen Harvest Moon games for $40-$60 each that were all very nearly the same game.

    I think that's the worst mindset I see in this industry. I spent the last eight years among online marketers, for various reasons, and they are all convinced that if they sell "how to make money with AdSense" their goal is to be the only AdSense course their customers ever buy. Meanwhile, in the community of people who buy these courses, all of them are on the same mailing lists. The guy buying from Perry Marshall is also buying from Bill Hugall and John Schwartz and Omar Martin, because he doesn't care who teaches him. He just wants to learn.

    And then I turn around and look at game developers, and Origin is trying to convince you to use their portal so all you ever play are Origin games. Kalypso wants you to only play their games. UPlay is trying to get you only playing theirs. But who are the big winners? Microsoft, Apple, and Valve - for making places where anyone and everyone can put their games.

    Nobody is just playing one game, or just one developer's games, or even just one publisher's games. I have 357 games on Steam. And that's not even my largest collection - it's just the one where the count is easiest to check.

    Gamers will buy every damn game they want to play, no matter who makes it, to the limits of their budget. You don't have to be better than the competition. You just have to be good.

    Same here. And I think you're on target with the direction you're thinking, even if we disagree on the specifics like whether Stardew Valley is good or not. I do agree that it has amazing production values, is incredible for a one-man passion project, and is absolutely a great design. I just don't like it, because it's not what I wanted when I said "I want Harvest Moon on the PC." Also, get off my lawn. ;)
     
    CarterG81 and Martin_H like this.
  7. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,434
    I unfortunately haven't played any of those games yet, including the escapists, but could you sum up for me what they did wrong in the grind department? I'm interested because my opinions on grind are ambivalent. I hate the Call of Duty style grind where you just need to sink time to get all the options, but I can see some positives to resource grind where you acquire special things you need for something, and there is more of a choice in what you really want to gain and what you are willing to invest to get it.

    I'll be avoiding that one then. I already own the original escapists from a bundle, so I'll give that a try some day - but now with lowered expectations.
     
  8. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I dont remember exactly all the flaws of The escapists, but grinding for duct tape is very annoying. Nearly every recipe in the game requires duct tape, and the items sold each day are random. So you eventually hit a snag where RNG makes duct tape rare, but you need it to progress. I've had 5 days pass (a lot of game time) without a single duct tape, in a game I needed like 6 in.

    Eventually I quit playing bc I found myself wasting 8 hours playing a game where I was essentially waiting to het duct tape only to discover my escape plan was literally impossible - but only learning it after succeeding in a long grind. I mist admit the game was very addictive. I was more angry playing than having fun, and had to tell myself to stop grinding bc I was wasting my life away, heh. I love prison escape stuff... but the game is seriously lacking (not just flawed).

    That and the AI guards would see through walls and in a single buggy moment destroy hours of progress.

    Darkest Dungeon forced you to spend endless hours to progress. To orogress in the story, you have to beat bosses. To get to a boss you have to play the dungeons.

    Each Boss is beaten 3 times.
    To get to one boss you have to play like 3 times in a dungeon.
    A single dungeon run takes alot out of you.

    To finish the game would take me scores of hours and I began to get bored after like 40h. I didnt even see most of the content before dying of boredom from repetition.

    Most games bore me after the 40h mark. 80h if I love the game. 120h to infinity for my favorites (ex. Planetside 2, I quit bc of rage / real life wasting, not bc of boredom, hehe, prob have hundreds of hours in that game.)

    So I consider a game grindy when I'm required to invest my entire life just to see the content. Bethseda games arent grindy though. I guess I find games grindy when after 40h I am still at the start of the game, like Darkest dungeon... or when I dont get to play the gameplay bc I'm stuck doing some minor repetitive task for hours (grinding for duct tape just to play bc RNG hates me).

    I really think that RNG games need to take the time to have smart RNG. I know Neo Scavenger developer puts in some code to make the RNG more fair. Or atleast he wanted to do that. At the start if RNG hasnt given you anything good, he has an event pop up to help you. And he either wants to or did add some balance code, where you will eventually find *something* if RNG screws you over for too long.
     
    Last edited: Mar 14, 2017
    Martin_H likes this.
  9. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Well, the most effective one is the "truly" (I know it can't truly be) random one. Case in point, B. F. Skinner.
     
  10. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Any sort of randomness needs to be counterbalanced in a video game. Otherwise you are guaranteeing a small percent of users are disatisfied due to the game being too hard (impossible) or too easy.

    RNG of any kind, without balance, is a surefire way to make sure you get negative reviews. There will always be a small percent who get nothing but awful RNG and nothing but amazing RNG.
     
    Martin_H likes this.
  11. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    The question is whether the amount of users it manages to ensnare with that approach is smaller or greater than the ones turned off by it. Couldn't say the answer.
     
  12. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    No, it's win-lose with pure RNG. With intelligent RNG it's win-win if you just add some extra logic to ensure everyone gets a good run, even if the RNG is bad. It's not a matter of "You can only have the benefits if you also have some of the negatives." It's "Just make sure the negatives don't happen."

    The difference is RNG vs PCG. The former is truly random - ensuring you get a percent of negativity for consumers. FTL seemed to do this, and suffered for it (its biggest complaint and the result of the majority of engative reviews). This happens in some roguelikes too I believe.

    PCG is just more intelligent RNG. Using randomness with constraints, having a lot of non-random aspects to the system, or some kind of intelligence to keep track of how the player is doing.

    For example in FTL, every bad roll could result in a bonus to the next roll. Eventually it would guarantee a good roll (after a series of bad ones. Which would be very fun. It would be satisfying to finally get relief after almost losing - if you haven't lost by then, anyway.)

    So if Neo Scavenger was pure randomness, then a large portion of playthroughs would end up with the player suffering hypothermia. That is why the developer added in some rules to balance bad RNG. If at the start of the game, and you're beginning to freeze, you will automatically find a bedroll which will save your life. There are still problems in the game, but I've read him talk about how he should have done more of this, as it's the biggest problems with the game (what people complain about the most, which he takes seriously. There are some things that are complained about that he ignores, unfortunately.)
     
    RavenOfCode and Martin_H like this.
  13. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    I'd argue that assigning wins and losses to an RNG makes it impure. Pure RNG would be you click a button and you get a 4. You don't win. You don't lose. You just get a 4. Click it again, maybe you get a 2. Or a 7. Or even another 4. And nothing else happens. Whether you want a given result is just arbitrary. Is 5 better than 3? Why?

    No reason. It's inherently balanced. Click the button. Get a number. You don't know which one you'll get until you click it. Every number is equally numeric.

    It's when you start assigning meaning to the numbers that you start running into trouble...

    I'd say the RNG is the minimal form of PCG: the procedure is just "select at random" with a lack of any rules. You can develop PCG in either a good direction where it is better, or a bad direction where it is worse. For example, you might make PCG worse than randomness by simply assigning the rule "if you get a 2, you will hear an unpleasant noise" without having any kind of win condition. And you can make it better by saying "if you get a 4, you will hear a pleasant sound" without assigning a loss condition. Or you can say both, and have a reasonably balanced "game."

    However, if your player is deaf, he can't tell the four games apart. The notion that any of them is better or worse than the others is confusing to him. The differences don't matter.

    It comes down to values. I personally hate what roguelikes have turned into. You take a game like Don't Starve: you start a game, and you play until you lose. Every game is different. Every game starts from the same place. Every game will ultimately be lost. The game will decide when you lose.

    Flip any one of those, and you get a game I will like better. If every game is the same, then the early game becomes comforting and familiar. If every game starts from a different place, then it becomes exciting and adventurous. If it's possible to win, then I have a meaningful goal. And if I get to decide when I lose, e.g. with a prestige system, I never get mad because I didn't want to lose right then.

    But plenty of people love the same things I hate about roguelikes, or just plain don't care about them. Their idea of what makes the PCG better is not the same as mine.
     
    RavenOfCode likes this.
  14. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    In case anyone is interested, especially since this pertains to Procedural Game Development in Unity, the random number generator used by Unity is very flawed, according to PCG, A Family of Better Random Number Generators.

    It should be pretty elementary to add your own (superior) random number generator (PCG).

    Although I'm not sure how accurate this information is, I have little reason to not believe it. I have heard quite a lot of how crappy Unity's RNG is.

    Which is XorShift 128/32, I believe. Although my research shows that to be pretty excellent compared to all of the others (besides PCG). Not exactly sure why Unity's RNG gets bashed so frequently.
     
    Last edited: Mar 15, 2017
    EternalAmbiguity likes this.
  15. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    So? Unless you are anal about number distribution, there isn't any non-security reason to care about RNG. Your math will always have more impact on the quality of the game than the RNG will.
     
  16. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    Well depend on wether your rng allow for duplicate number or not, having rng that shuffle number around (ie don't repeat) is rather good for some design when you want to enforce some sort of uniqueness, it guarantee that you will have each number at least once. Also most RNG are sequential generator, they depend on the former state, sometimes you need random hash, ie have the randomness be accessible using an index (also because seed in rng follow a pattern), and sometimes you need a perfect random hash to ensure every number is unique inside the period (aka if the number of elements map to the rng hash isn't superior to the period of the rng).

    When creating world random hash and perfect random hash is what you should go after for pcg.
     
    CarterG81 likes this.
  17. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    It's important in some cases. I have a cellular automaton program which uses an RNG with probabilities. I'm using this for scientific purposes and my professor, who's pretty well connected in his field of research, wants to use my work for a submission to Nature...so it's kind of important that my RNG be correct.

    Thankfully my stuff doesn't actually use Unity's RNG so I'm good.

    Additionally, it's never a bad thing to be more right. If it's taking valuable time away from other things you should be doing, sure, but there's nothing wrong with fixing it.
     
    CarterG81, MV10 and Martin_H like this.
  18. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    I'm gonna go out on a limb and say you're single.

    But seriously though, do you notice any difference? Unless you're seriously trying to collect data from the model (and that's as good of a joke as the being single one), whatever biases that are put into place are just as likely to show. Short of the RNG repeating and creating a periodic cycle, I doubt there is anything wrong with it that can't be summarized as nerds being nerds.
     
  19. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    If you think you need a better RNG, but you are using Unity's Random() function to get a binary floating point result with 23-bit resolution, you are either wrong or stupid and quite likely both.

    Single precision datatypes are like a big flashing neon sign that says "do not use for real work."
     
  20. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,434
    http://www.gamasutra.com/blogs/Rune...505/A_Primer_on_Repeatable_Random_Numbers.php

    What's with all the low blows in this thread? Why are you all so mad about literally random numbers.
     
    CarterG81 and EternalAmbiguity like this.
  21. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Lol, I'm not talking about human interaction. I've long since stopped caring about being "right" in that sense.

    Why is it a joke to use data from the model? Would it be because of Unity's version of the RNG, or something else? I'm not using Unity's RNG, so that isn't a problem for me, but if there's some other problem I'd love to know it.

    They aren't trying to be mean, some people just have abrasive personalities.

    And for what it's worth I'm pretty sure one is a joke, and the other is referring to a hypothetical (I already mentioned that I'm not using Unity's RNG).
     
    Last edited: Mar 15, 2017
  22. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    Unless you are working on something that's damn near emergent, where late stages are hypersensitive to starting conditions, chances are that good ol' calculus applied to your formulas reaches about the same answer. Data from a model is only good when the model is accurate (spoiler: they never are).
     
  23. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    I'm not mad about anything. Sometimes people are wrong; it doesn't make me mad when they're wrong. Sometimes people are stupid; it doesn't make me mad when they're stupid.

    And if you think certain things, it is just a fact of life that you are either wrong or stupid and probably both.

    Like if you think you can fix a VTR with a ham sandwich, for example. Even if you're not wrong, that's stupid. Given a broken VTR, anything you could fix with a ham sandwich can be done better with something else, and I could rattle off a pretty long list of things you can't fix with a ham sandwich even if you tried with both hands.

    It doesn't make me mad.
     
  24. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    The use of the RNG and the probabilities makes what I'm doing stochastic so there's no automatic answer. The formulas are deterministic. See a couple of attached pictures of different results of the same set of starting parameters.

    Plus it allows for examining limiting cases, while the formulas are for the macro scale.
     

    Attached Files:

  25. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    So? Well...

    The quality of your random numbers will be reflected in your content generation.

    The numbers do effect many things, so they will give different results.

    And to pretend you have to be anal to take a few minutes to add your own PCG rng or add in an open source PCG.cs file to your project is quite childish, IMO. It isn't like it is a difficult or time consuming task.
     
    Last edited: Mar 16, 2017
  26. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Wow. Just wow. The intellectual curiosity of this one has exploded, accidentally splattering all over the ignore button of my browser.
     
  27. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    Do you actually have any examples of when a sub-optimal pRNG created problems in a game? I'll even let you use examples from far crappier generators than Unity's. Just saying they give different results doesn't mean jack.
     
    RavenOfCode likes this.
  28. RavenOfCode

    RavenOfCode

    Joined:
    Apr 5, 2015
    Posts:
    869
    +1

    I do agree that RNG can be done wrong, yet that doesn't mean that Unity's RNG is this "wrong." For some games having a PNG would be wrong. Imagine trying to play poker with PNG, it would lesson the experience and make the game seem off. For some games (roguelikes I'm looking at you), having PNG can be really helpful to make runs feel balanced. It comes down to a game design decision with many ups and downs for both RNG and PNG. Making a game feel "fair" can sometimes ruin the experience and break the idea that this game world is harsh. Sometimes pure RNG can feel harsh as well. In the end it comes down to a design choice with one being better for some games while the other being better for others.
     
  29. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    I kind of have to wave a hand here and say "not precisely."

    The quality of your random numbers will set a boundary on your content generation.

    Imagine, for example, that you have a statistically even random number generator from which you intend to generate standard die rolls of a six-sided die on a computer.

    The probability of any given result on a six-sided die is 1/6 or 0.16666... which cannot be precisely represented on the computer in the first place. Your statistically even RNG will not produce statistically even results from the die. Ever.

    However, if you use the same generator to produce coin flips, which can be precisely represented? You will get statistically even results. You may not get statistically even results from a four-sided die or an eight-sided die, however.

    If you use a "flawed" RNG that isn't statistically even, your results will also not be statistically even. Usually. Although there are ways around this. But the real key is that in many cases, your results cannot be statistically even anyway.

    And then, whether it is anal or not, using a statistically-valid RNG is a waste of time.

    PCG can't usually use random numbers unmodified in the first place, because a random number does not make good content. You can't just create a texture by throwing 32-bit random numbers into RGBA pixels. You can start there, but then you have to perform a number of filtering and smoothing operations on it to make it useful. And those operations are basically a form of noise reduction, which removes data from your initial RNG content anyway.

    Statistical anomalies are also noise. If the RNG isn't statistically valid, chances are you are removing the effects of that anyway.
     
  30. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    The great rng debate of 2017
    There is actually entire course about it, though not much course on how to apply it to pcg so it's mostly each people experience. I still haven't found good random hash and perfect random hash to apply to pcg ... I just learned recently I need them what were their name (I mean for the perfect random hash, until now I wasn't sure what I was chasing for was possible)

     
    CarterG81 likes this.
  31. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I have to fully disagree here.

    Balancing your game and giving a more fair playthrough isn't mutually exclusive with any experiencr, difficulty, or "harshness".

    In design, you're merely balancing the RNG to prevent it from becoming impossible. Not to make things easier, but make things possible.

    Not a single person, even the most hardcore, want a run that is mathematically impossible to win. The user will always complain.

    Good design, even in high difficulty, REQUIRES the ability of the player to overcome the odds and win.

    Afterall, that is what people like - challenge. There is no challenge in an impossible scenario.

    How you tailor the RNG is up to the designer. But to simply let random numbers determine play is guaranteeing bad reviews, decreased sales, and end user disastisfaction. Even for high difficult audiences.

    Imagine a game where after 20 hours, you get a loading screen that said, "The planet explodes and everyone dies. There is nothing you can do. The End." And this happened in 1% to 10% of playthroughs. Or ANY playthroughs. Talk about bad design...

    FLOW requires challenge. "Impossible" is not a challenge. Intelligent AI to tailor challenge to the player? Ingenius of pulled off at varying levels of difficulty (everyone of all styles are challenged and have a great time).
     
    Last edited: Mar 17, 2017
  32. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    First, you cannot assume all projects make this a waste of time.

    Second, there are plenty of valid arguments and reasoning to have a better RNG. The creators of other RNG would especially argue this is nonsense.

    Third, we already have seen in this thread people who mentioned their need for more accurate rng. Not just theory, but application.

    Finally, sending a few minutes to take one of many open source C# projects to place in your Unity project is hardly wasting any real measure of time. A few minutes wasted? Irrelevant to all of game development. The feeling of satisfaction alone is worth such petty time invested.

    This is getting ridiculously silly, so after this post I'm out.
     
  33. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Also even if you throw the user a bone, if they get bad RNG it means a single user error (not rng roll) will end them, making the margin for victory razor thin anyway. So to assume this would destroy challenge is a bit silly in real practice (users making multiple errors). They'll either lose, or feel like they, at the last opportunity, became miraculously victorious.

    Since RNG is all blackboxed, the player has absolutely no knowledge they are being "gifted". Instead, you could (theoretically) be the game that gives everyone that feeling of utter despair followed by "player skill" being the factor which lets people win at the last moment in a miraculous way (no matter the skill level). Application is harder, I'm sure, as you'd have to cleverly hide assistance, and still allow for failure, but could make for some epic "close calls" which gamers would LOVE.

    Some ideas: keep track of the average reaction time for the player, and then tailor intense scenes based on that variable. If itbworked in practice (intelligent AI smart enough to accurately get their reflex time in milliseconds) then you vould do reflex events with challenge based on the user's real life ability, without them ever knowing it. If successful, that means nearly all reviews saying "Intense!! Challenging!! Fun!!" despite such large gamets of player skill among any base.

    But that goes into procedural gameplay...and this thread is suppose to be about procedural development.

    But in a system designed with millisecond thin margins for RNG, having more accurate random numbers would be well worth it IMO. And more accuracy means more control (predictability) by the developer. There are benefits to unique rng too this way. Interesting subject, unique rng is.

    But this thread should die (make another), being off topic for quite alot of posts.
     
    Last edited: Mar 17, 2017
  34. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    Largely because "balance" is a subjective term.

    And yet, people play slot machines. Knowing the machines by design pay out less than what you put into them, they still go stuff money in them anyway. They're paying for bells and lights, but they could just buy their own bells and lights and play with them whenever they wanted. You can, in fact, buy decommissioned slot machines and put them in your house. Why would anyone go to a casino and shove fifty dollars into a slot machine when they could have one of their own for a few hundred bucks, and play it for free forever?

    Allow me to repeat what I said, including the important part you seem to have ignored:

    "...in many cases, your results cannot be statistically even anyway. And then, whether it is anal or not, using a statistically-valid RNG is a waste of time."

    That is not an assumption about all projects. It is a specific identification of projects where it is definitely a waste of time.

    If you take a statistically-even distribution of 128 bit numbers and cram them into a single-precision floating point number with a positive sign and a mantissa of zero, you have just flushed 105 bits of every result down the toilet, so your new results are not statistically even.

    How much time did you spend on every iteration of your RNG making sure they were?

    It's not about developer time. It's about game time. Every millisecond you spend on statistically robust numbers is a millisecond you are not spending on something else. It has an opportunity cost. And if it's not producing a better game, it's definitely not worth it.
     
    neoshaman likes this.
  35. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    That is the seminar about the site I linked for the bes RNG.

    You can find all info here:

    http://www.pcg-random.org/

    And just google this specific RNG (pcg) for a c# implementation for use in Unity.
     
  36. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    ah damnit, breaking my own rule. cant sleep! Im out for real this time!

    In game design, you are creating game systems (programs) which mathematically account for each specific user's experience. While each individal user's opinions are subjective, their tangible skill levels, desired challenge level, etc. are not opinions but facts.

    In this context, it is the job of the designer to give every player a balanced experience.

    And in that context, balance is NOT subjective. It is defined by that individual user's skill level.

    It is like saying fun is subjective, when designing a game with intelligent code that ca tailor gameplay to each individual user to allow eveyone to have fun even though eavh user is different.

    And no, fun is not necessarily subjective. There are ways to measure fun, quantify what people find fun, and through such a method get a higher percent of satisfied users than without such a system.

    For example it is not fun for the majority of users to remove Skyrim's character generator and replace it with a square gif of someone being murdered IRL. You would actually find a 99.9999999% rate of loss in both fun and sales. In this way we could prove "Having a more cohesive game that makes more sense is DEFINITELY more fun than not."

    Another example: A developer claiming 100% of mac users crashing to desktop on level 2 is "a feature, not a bug" is simply not fun for anyone. Literally 0 users. While it would certainly give majority users the opposite of fun (anger).

    And those who enjoy that and say it is more fun? Besides being liars, we could easily agree that they are simply wrong. No one would disagree with that except devil's advocates and we could safely ignore those people as trolls or idiots.

    Broaden this same way of thinking and it is still valid enough where you could have most developers with good taste (the ones who would be more respected, more profitable, and thus allowed more access to develop tangible products) agree to specific criteria that although not absolute, are still pretty damn accurate definitions of fun.

    And furthermore some psychologists woulf actually argue, using theories like FLOW, that you indeed CAN have tangible design components which enhance or remove FLOW and thus

    FLOW = FUN, via scietific fact (how the human brain interprets fun).

    In fact some day, if not already, we will probably be able to scan the brain to determine what is fun and what is not. Brain chemistry ftw.

    So yes, balance is a requirement of fun, because it is a requirement of flow. And programs have the capacity to allow different users to enter flow despite different skill levels.

    And while fun is subjective in most cases, it is certainly not in some.
     
    Last edited: Mar 17, 2017
  37. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    On what planet are desires not opinions?

    And you're going down a road that basically amounts to "with the right math, I can read people's minds." There's nothing good down that road. Go somewhere else.
     
    RavenOfCode likes this.
  38. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    Facebook tried to read people mind, result? Trump got elected, whether that's bad or not, it's up to you, but it wasn't facebook intent and now they are backtracking hard with counter measure.
     
  39. RavenOfCode

    RavenOfCode

    Joined:
    Apr 5, 2015
    Posts:
    869
    That is like saying that the bad PNG in my poker game lets me know with a certainty that if I play x then the ai will play y. Thus: all PNG is BAD!

    The problem is that isn't a number issue its a game design issue.

    RNG and PNG have their respective uses, coupling poor game design with them gives a bad product. Your looking at a poorly used mechanic and saying that the mechanic is wrong not the poor implementation.
     
  40. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    It's not like rogue like or even tetris are bad game either, you literally can't win based on bad luck draws. And on top of that they added permadeath in rogue like to make sure you feel it, and if you don't like it, they also randomize item effects so the same colored potion don't have the same effect on the next run. Result? they had a dedicated niche until it blew up in the mainstream with minecraft and spawn a new genre (rogue lite because F*** ascii graphics) based on those harsh element. There is a difference between bad design and not your cup of tea.
     
    RavenOfCode likes this.
  41. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Who are you talking to? I must have missed someone saying permadeath is bad design.
     
  42. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    I didn't say permadeath is bad design either, you have cut my entire statement to purposefully miss my point
     
  43. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I just asked who you were talking to. No one accused you of saying "bad design". I literally just asked you who said it was.

    You should probably reread that post.
     
  44. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    My god, this question... I almost didn't answer it because of how bad it is. If you weren't so arrogant about it (as if you know a bad RNG is the same as a good RNG in all cases) then I'd be happier to answer.
    The answer is so obvious, this doesnt deserve an answer: It all depends on your game.

    Let me use one real life example to show you a real application where the RNG is vital to the game, and then show you why that means something for every game.
    This isn't the only application, but a good singular example to express the logic behind game design.

    In any game of chance, such as a Slots game or any casino game, the RNG's statistcal accuracy is extremely important.
    A bad RNG could result in paying out more often than it should. The Casino loses money, is pissed at the developer, and you lose a huge client. Or the opposite happens - it doesn't pay out at all. The casino loses people who go elsewhere because they rightly feel theyre being cheated.

    Now, how does this logic fair in non-casino games?
    Just as I have said two times already in this thread, bad RNG and bad PCG will result in negative reviews.
    Since games live or die based on reviews, articles, and youtubers, what does good RNG mean?

    Statistical accuracy = More predictability = More control = Tangible Design Improvements.

    Bad RNG means less statistical accuracy. It means there are higher percents of circumstances where the RNG is NOT very random. That means riskier chancr that PewDiePie gets all .9's on your RNG all 5 times he plays. It means higher chance for a worldgen you didnt balance the game for in testing. It means higher possibility of your testers getting a different game than you played. It means there are more users who generate your world and get the same thing every time, resulting in more bad reviews.
    It's statistics. Impossible to measure if this means an increase in 1 negative review or 1% or more.

    Anyway, this shouldn't have to be explained. Especially when I already explained it before. But especially necause there wouldnt be a need for better RNG if it didnt matter.

    Unlike what you think, "nerds" do things for a reason. Not because "nerds being nerds" and they think more accurate RNG is fun for them to create.
     
  45. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    The selection of an example can be arbitrary. You can say "for example, look at this thing I just made up." That's a valid way to construct an example. Demanding to know where someone got their example aggressively misses the point.

    That's what I keep saying. Let me say something out loud, because it seems to be getting lost out of your posts.

    Not all games are for fun, and not all Unity projects are games.

    The canonical example of a "serious game" is Foldit, the protein folding game from the University of Washington in my own backyard. (It is not written in Unity, but that does not matter for purposes of this example.) They spent many years developing genetic algorithms and AI to figure out how to fold proteins. Researchers became frustrated when they looked at the AI results and saw that (a) the computer's solution was wrong, and (b) it could be made right with just a minor tweak.

    Unfortunately, they didn't have the tools to make that tweak, so they just had to keep waiting for the AI to figure things out on its own. So they made a game. In the game, you don't even start with computer AI. You start with a protein and you use the same tools the computer would to fold it. The best results then end up getting checked by a team of researchers who use a real lab and a real protein.

    Now, that doesn't really have any use for a random number generator. But some "serious games" do, and in many cases - particularly medicine and particle physics - the one in Unity is simply not acceptable.

    No it isn't. The xorshift-128 RNG is statistically accurate to 45,000 iterations. If it takes five seconds to make a spin, that is seventy-two hours of continuous spins before you have any meaningful statistical deviation. If you simply reseed the RNG before you reach that point, you will never have statistical anomalies.

    Furthermore, casino games have built-in house percentages of 5 4/9 % on the average. Over a long enough period of time, they will win 5 4/9 % of all money bet. On slot machines, they manipulate the odds to produce a higher house percentage on the more frequent wins, and a lower one on the jackpots - so when you win the $10,000 jackpot on a one-dollar machine, your odds are very very close to 10,000:1. But down at the lower end, the odds of everything else are much much lower, sometimes by over 10% on a particular payout.

    The deviation of an RNG has to be really, really bad before the casino starts losing money. And even if it is, they don't need a better RNG. They just need to recalculate the odds to compensate.

    That's kind of how I feel.
     
  46. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    The first thing that casinos care about is that there isn't a knowable pattern. After that, they don't care. The statistical distribution doesn't matter when they are going to figure it out, and finely tune the results for maximum engagement regardless.

    You are absolutely correct, in theory. In practice however, this is nonsense.

    I'll just start with negative reviews. Has any reviewer ever blamed a game's RNG specifically? XCOM 2 might be the closest one to actually have people blame the generator, but all accounts point to it's generator being fine, it's just people blaming their luck. I will guarantee that far more people have cited an over-reliance of randomality in a game's design, than have ever found legitimate fault in the RNG.
    At this point, I'm getting the sneaking suspicion that you don't know much about random number theory. For one, truly random results show patterns all the time. If anything, it's more common for lesser RNG to not have patterns by the creator's intent (usually because of the fallacy that random means being indiscernible, which fundamentally undermines the brain's desire to make some kind of sense out of things).
    So blame the numbers and not the way you're balancing things...?
    So more people get totally different results that are just like everyone else's?

    Do you have much experience with PCG? I would like to think I'm experienced enough with S***ty PCG that I can tell why the system is S***. I have seen a mountain of cases that all point to systems built on terrible assumptions (mostly about it's place in gameplay), but I have yet to see a system and think it's just not random enough. If anything, the bane of PCG is too much randomness and not enough order.

    I'm going to assume you haven't spent much time outside academia yet. Once you stop doing things just for fun and only have the time to do what's needed, you might start understanding the other side. Currently this is just a theory versus practice debate, where you have presumed there is far more significance to a minor factor. You are presuming there is a massive gap in quality, and worse yet, underplaying how much control the developer ultimately has over what is entirely his own creation.
     
    RavenOfCode and cdarklock like this.
  47. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    RE procedural stuff in unity:

    Yeah it can be very handy for high level stuff like map/scenery generation.
    I suppose for games where the scene layout is very important to gameplay (like run-n-jump platformer) then procedural stuff can get stale quickly, but for more passive stuff it works well and can save a ton of time.

    I'm using procedural stuff in my current WIP, it makes it viable for me to hit multiple triangle budgets for various platforms easily (without getting RSI).

    Solution was made general by making the algo spatially aware: it lays down the road map first and then chain encodes the road system using vertical raycasts, this way I can add new road building blocks with minimal prep (just need to put node marker objects on their open ends in 3D modelling tool). Then all buildings and vehicles are laid down using the overall chain encode for correct pos/angle.



    As with everything: variety is the spice of life. So the bigger your model palette for such a case; the better.

    In this case I'm just using unitys Random.range func as I just want a deterministic pseudorandom sequence.

    For procedural content gen: determinism is way more important than randomness, certainly when generating geometry: without determinism anything produced is untestable and thus useless. Say a truly random source was used, like microphone noise derived data, then every game instance would get a different map: un-testable. All that's needed is a deterministic non repeating sequence, not randomness, even a naive Fibonacci like function is fine.
     
    Last edited: Mar 24, 2017
    RavenOfCode and Martin_H like this.
  48. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,434
    Is it deterministic accross all plattforms? I vaguely remember reading it's not, but that was long ago.

    What were the biggest problems you faced when working on your procedural content generation and how did you solve them?
     
  49. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    I can only speak for Windows/Android, over those two... yes the same seed will result in Random.Range giving exactly the same sequence in both int and float flavors.

    The example I mentioned above is not my first crack at procedural content and it's fairly simple, it's pretty much a 2D problem, just laying out 3D models on a 2D plane.

    I've been practicing the art over the past 2 years in another engine. Things step up a notch when you start to runtime create meshes, like runtime stitching a golf course:
    https://twitter.com/SiliconDroid/status/740332182250606592
    or procedural planetoids that run on low end mobile:
    https://twitter.com/SiliconDroid/status/686351695157313541

    hardest thing I solved was runtime stiching a 3D pipe into a random circuit, making pipe have K sections and have it meet up smoothly while following a randomized locus was a more difficult problem and I had to resort to mixing in iterative methods:
    https://twitter.com/SiliconDroid/status/690639341656346625

    So the biggest challenge this time was finding my way around the Unity C# API, which turns out to be rather nice.

    I would imagine a first timer may struggle with keeping track of the map and scenery as it's built, maybe they would be tempted to make a grid like LUT (look up table) to store positions already occupied as I did when first experimenting with procedural stuff, but I soon worked out... the scene is the LUT: enumerate the seperate objects you've already laid down if you want to check bounding boxes, probe around using raycasts as needed to check for existing geometry/edges as you build the scene up. Then combine everything into one mesh per material when you're done.
     
    Last edited: Mar 24, 2017
    Martin_H likes this.
  50. jballou

    jballou

    Joined:
    Sep 21, 2016
    Posts:
    7
    Procedural generation is a great tool, but it is only half of the loop necessary for it to work. If you aren't refining the procedural pieces with feedback and data from what the balance and quality of the output, and using it to continually improve the outcomes of the procedural systems, then it becomes a bottleneck for design.

    Automation in and of itself is a great first step, but just like a person making the assets, it needs to learn from experience and refine its work to more closely match the desired outcomes. Doing things like having AI play the maps and compare outcomes for balance, instrumenting real-world game data correlated by seeds and settings, and simply being able to score overall happiness with the outcomes of each artifact generated are essential to have a procedural system which stays with the team.

    You and your teammates will improve with everything you do, as you learn your way to where you want the game and experience to be. If your tools aren't keeping up with you, they're keeping you down.
     
    RavenOfCode likes this.