The Problem With Procedural Generation

Поделиться
HTML-код
  • Опубликовано: 29 янв 2025

Комментарии • 1,3 тыс.

  • @Acerola_t
    @Acerola_t  2 месяца назад +252

    The first 500 people to use my link will get a 1 month free trial of Skillshare: skl.sh/acerola11241 ! #ad
    Simpler video today, it's also my birthday sooooo you better have watched the video all the way through

    • @kaidaluck648
      @kaidaluck648 2 месяца назад +5

      Happy birthday

    • @subbu_creates
      @subbu_creates 2 месяца назад +1

      I watched it all the way through and happy birthday

    • @alphared7330
      @alphared7330 2 месяца назад

      Just as i was making a project using procedural generation! Happy Birthday aswell

    • @cogwheel42
      @cogwheel42 2 месяца назад

      Happy birthday. Thanks for the gift! wait...

    • @AikaterineG
      @AikaterineG 2 месяца назад

      Happy birthday

  • @davidequattrocchi5083
    @davidequattrocchi5083 2 месяца назад +2856

    but Acerola, I wanted to complain in the comments that the title, thumbnail and premise was just an excuse to trick all of us into learning fundamental parallel programming techniques... and you did that yourself

    • @ultimaxkom8728
      @ultimaxkom8728 2 месяца назад +57

      Common Acerola rabbit hole trap W

    • @JesusPlsSaveMe
      @JesusPlsSaveMe Месяц назад

      ​@@ultimaxkom8728
      Where are you going after you die?
      What happens next? Have you ever thought about that?
      Repent today and give your life to Jesus Christ to obtain eternal salvation. Tomorrow may be too late my brethen😢.
      Hebrews 9:27 says "And as it is appointed unto man once to die, but after that the judgement

    • @ReggieVdz
      @ReggieVdz Месяц назад +44

      ngl for about 10 minutes I thought to myself "but acerola what does this have to do with minecraft"

    • @antekpaztek
      @antekpaztek Месяц назад +12

      this video is NOT about minecraft

    • @paulregener7016
      @paulregener7016 Месяц назад +3

      Boy am I glad I clicked on this video in Calc-II doing sequences and series. Made all the homework I did make a ton of sense.

  • @disquettepoppy
    @disquettepoppy 2 месяца назад +1502

    But Acerola,
    just so you know this "theoretical" completely random version of Minecraft you just described near the beginning of this video does officially exist! It's how the worlds are generated in Minecraft 4k, a Java Applet version of Minecraft that fits in merely 4 kilobytes! You could use a screenshot of that version for purposes of illustrating this concept, not just reusing the same 2d 2-color white-noise image! That, and acknowledging this obscure version of Minecraft would make the relevant portion of this video at least 20% cooler.

    • @SZvenM
      @SZvenM 2 месяца назад +87

      Probably my favourite bit of minecraft trivia ever

    • @sullumeent
      @sullumeent 2 месяца назад +41

      nobody mentions the mlp reference

    • @gilly_the_fish
      @gilly_the_fish 2 месяца назад +14

      @@sullumeent Good

    • @nullpoint3346
      @nullpoint3346 Месяц назад +3

      @@sullumeent That would be in Minecraft 40k, so that it can filter out the cringe.

    • @JesusPlsSaveMe
      @JesusPlsSaveMe Месяц назад +1

      ​@@SZvenM
      Where are you going after you die?
      What happens next? Have you ever thought about that?
      Repent today and give your life to Jesus Christ to obtain eternal salvation. Tomorrow may be too late my brethen😢.
      Hebrews 9:27 says "And as it is appointed unto man once to die, but after that the judgement

  • @merlumina
    @merlumina 2 месяца назад +571

    as a programmer and textile artist who loves the connection between the two, learning that a group of threads is called a warp made me very happy

    • @isodoubIet
      @isodoubIet 2 месяца назад +27

      Ohh so that's where the name comes from

    • @iansanford6544
      @iansanford6544 2 месяца назад +66

      Modern computer programming has its roots coming from the Jacquard Loom in 1804, a weaving machine that used punch cards to control the fabric patterns. We've come a long way from punch cards on a loom, to ENIAC to PCs to smartphones, but the weaving DNA is still there in little places.

    • @RedFoxtail26
      @RedFoxtail26 Месяц назад +6

      Makes me wonder if something relevant is known as a "weft" 👀
      (if not, it could be a cool name for a program that uses multiple warps, as it "weaves" between them)

    • @Roxor128
      @Roxor128 Месяц назад

      Only in Nvidia land. AMD calls it a "wavefront". Dunno about Intel, though.

    • @marcomoreno6748
      @marcomoreno6748 Месяц назад

      ​@@Roxor128 Intel calls it

  • @RobLang
    @RobLang 2 месяца назад +688

    Every time you mock a web dev, there's an embedded algo dev laughing at your 0.6ms, hardware abstraction layer, operating system, high level language and bounded problem space.

    • @Acerola_t
      @Acerola_t  2 месяца назад +299

      good thing my first real job was embedded systems

    • @RobLang
      @RobLang 2 месяца назад +12

      @@Acerola_t algo dev against silicon?

    • @overloader7900
      @overloader7900 2 месяца назад +75

      @@RobLang Against radio enthusiasts doing their signal processing with just copper wire and some iron rods

    • @hyperon_ion9423
      @hyperon_ion9423 2 месяца назад +66

      @@overloader7900Why make a computer to measure the change in voltage when I can just make the metal magically do it for me?
      (Please don't make me do circuit analysis)

    • @orestes_io
      @orestes_io Месяц назад +7

      @@Acerola_t mic drop

  • @LordOfDegeneracy
    @LordOfDegeneracy 2 месяца назад +447

    But Acerola, I would have clicked on the video even if it just said "Fundamental Parallel Programing Techniques"

    • @cat47
      @cat47 Месяц назад +18

      with the dearrow browser extension, the title is "Parallel Algorithm for Finding an Axis Aligned Bounding Cube of a Set of Points"

    • @LordOfDegeneracy
      @LordOfDegeneracy Месяц назад +6

      @@cat47 the dewhat

  • @GameDevBox
    @GameDevBox 2 месяца назад +1993

    BUT Acerola

    • @penewoldahh
      @penewoldahh 2 месяца назад

      BUT Acerola,

    • @errorstudioz
      @errorstudioz 2 месяца назад +18

      But GameDevBox

    • @7EEVEE
      @7EEVEE 2 месяца назад +43

      "but aceROLLaaa..." remember chinese is a tonal language.

    • @GameDevBox
      @GameDevBox 2 месяца назад +4

      @@errorstudioz 😅😂😂

    • @GameDevBox
      @GameDevBox 2 месяца назад +3

      @@7EEVEE yeah exactly 😂

  • @S41L0R
    @S41L0R 2 месяца назад +2404

    if u think about it our entire universe is procedurally generated

    • @yaoitiddieexpert1486
      @yaoitiddieexpert1486 2 месяца назад +172

      or its entirely predictable. who can say

    • @sirel33
      @sirel33 2 месяца назад +492

      can we try again with a better seed

    • @S41L0R
      @S41L0R 2 месяца назад +35

      @@yaoitiddieexpert1486 true and real

    • @wozniakowski1217
      @wozniakowski1217 2 месяца назад +78

      so the point about it sucking stands

    • @JaxiPaxified
      @JaxiPaxified 2 месяца назад +1

      @@yaoitiddieexpert1486 or is both

  • @angryybot6367
    @angryybot6367 2 месяца назад +213

    That Terraria analogy is fun because there is a "secret" seed that makes you spawn in the underworld

    • @Soluna7
      @Soluna7 2 месяца назад +19

      oh there's more than one lol

    • @ToyokaX
      @ToyokaX Месяц назад +20

      There's a seed that combines multiple other ridiculous seeds too.

    • @axolotlgaming9144
      @axolotlgaming9144 Месяц назад +1

      @@Soluna7 correct, there's 2

  • @Levi1440p
    @Levi1440p 2 месяца назад +630

    but acerola,

  • @SystemSearcher
    @SystemSearcher 2 месяца назад +293

    I swear most of the time inbetween these two videos was spent not on figuring out the algorithm itself, but on figuring out how to tie this neat solution to a problem you have to a gaming topic.
    Not even a bad thing, it's just funny to me.

    • @Acerola_t
      @Acerola_t  2 месяца назад +223

      most of the time was spent trying to come up with an analytical solution to the bounds problem such that i wouldnt have to waste 0.6ms on a bounding box calculation

    • @b_dawg_17
      @b_dawg_17 2 месяца назад

      ⁠but @@Acerola_t , it would be worth it for a snickerdoodle 😂

    • @Anklejbiter
      @Anklejbiter 2 месяца назад +88

      ​@@Acerola_twhy spend 30 seconds running some code when you could spend 8 hours failing to make it run in 29? Programming 101

    • @apelsin9094
      @apelsin9094 2 месяца назад

      ​@@AnklejbiterYou fool, it's called optimization

    • @ezgarrth4555
      @ezgarrth4555 2 месяца назад +8

      @@Acerola_t Now if that doesn't capture the vibe of half of (my more interesting) workdays

  • @andythedishwasher1117
    @andythedishwasher1117 2 месяца назад +127

    Hey man, web developers are jealous of you for having time to play with these things. Not our fault web requests are polluted with a billion terrible frameworks. Actually wait, yeah it is. Well it wasn't my idea is what I'm saying.

    • @Asdayasman
      @Asdayasman День назад

      Be the change that you want to see - rewrite Django in assembly. Remove the bloat.

  • @fuecOHKO
    @fuecOHKO Месяц назад +54

    0:11 I have played (and enjoyed) literally every game he just mentioned. How is he reading my steam library??

    • @sloth1667
      @sloth1667 Месяц назад +8

      Because theyre all extremely popular

    • @fafuo
      @fafuo Месяц назад +9

      Your steam library is procedurally generated

  • @DKarkarov
    @DKarkarov 2 месяца назад +496

    But Acerola you forgot The Elder Scrolls 2: Daggerfall! Your advert this time has convinced me you need to do your own skillshare course, on how to give a cat a belly rub. Thanks for another banger video Mr. Rola!

    • @gumballegal
      @gumballegal 2 месяца назад +15

      Shortening Acerola to Mr. Rola is such a unfortunate thing in Portuguese

    • @ibrahimkuyumcu2649
      @ibrahimkuyumcu2649 Месяц назад

      He's a foo.

    • @dan202v9
      @dan202v9 Месяц назад +2

      @@gumballegal hehehehe pinto

    • @jktech2117
      @jktech2117 Месяц назад

      TES df is semi-procedural. the world above is procedural and they selected the structures that would be in the world from lots of trial and error generations (specially towns).
      the only thing truly procedural in the game are the non-quest dungeons.
      TES arena on the other hand is almost fully procedural, so much so there are even a sort of farlands there where tiles turns into complete random ones when you reach there.
      im making a procedural game that is inspired on TES arena.

    • @DKarkarov
      @DKarkarov Месяц назад +3

      ​@jktech2117 so it is important to note I was mostly just playing off Acerolas own joke. That said, the vast majority of daggerfall is procedurally generated. Every town that is not required for the story is procedural. They just generated a series of towns they "liked" and only allowed the final version to pick from a limited set of "approved" maps that were procedurally created.
      The reason a side dungeon in that game can have insane layouts, rooms you can't even enter, and have quest objectives spawned into said un reachable rooms is because it is all procedural.
      Even the world map was just the procedurally generated seed they liked the most.
      If it isn't directly tied to the main plot, it was procedural. And 98+% of that games content has nothing to do with the main story.

  • @killer13iii
    @killer13iii 2 месяца назад +86

    As a programmer who wanted to make games but ended up working on document management software, I realy enjoy you content and the free knowledge.

    • @thezipcreator
      @thezipcreator 2 месяца назад +5

      @@gagaxueguzheng I think that really depends on the studio; smaller indie studios tend to have that problem less than big AAA ones.

    • @killer13iii
      @killer13iii 2 месяца назад +6

      I understood the AAA studios problem when I applied for a one long time ago, that's why I ended up where I am. Programming games is way cooler though.

    • @theRPGmaster
      @theRPGmaster Месяц назад +3

      Very similar situation here. I'm still pursuing my goal of making games, but industrial software pays the bills.

    • @HuneeBruh
      @HuneeBruh Месяц назад

      @@thezipcreatorthat’s what happens when you make games for profit and not for fun

    • @fearedjames
      @fearedjames Месяц назад +1

      ​@@thezipcreatorNo, indie studios have just as bad a rap if not worse. The smaller studios have some of worse examples of crunch ive ever seen. Its just people care less.
      Crunch is always management issues. Bigger studios usually have better management than indie devs due to startup culture.

  • @func_e
    @func_e 2 месяца назад +361

    i love learning college level maths from a white guy who says "dogshit" at least twice in each video. Mr. Rola is my favorite teacher

    • @adissentingopinion848
      @adissentingopinion848 2 месяца назад +36

      TBH engineering has a lot of multidisciplinary problems that have the distinction of "this is ass, so here is an ass-reducing function and related ass-heuristics". It often boils down to something along the lines of "O(n^k) |k>1 is dogshit for a sufficiently large n"
      inb4 xkcd

    • @bartolomeus441
      @bartolomeus441 Месяц назад +16

      This is so based, I wish college professors were inspired by edutainment youtube. It doesn't stop being science when you don't use confusing scientific lingo and boring ass Powerpoint slides.

    • @alloounou6900
      @alloounou6900 Месяц назад

      I am he recipient of two cheeks of ass ass I have read and heard the phrase simultaneously. A full moon. A 360 degree angle. The pie has been pi'd and deemed delicious.

  • @mcRoody
    @mcRoody 2 месяца назад +248

    2:45 "tame the chaos of your ball hair with todays sponsor, manscaped"

  • @ByteNekos
    @ByteNekos 2 месяца назад +196

    5:36 NOOO HE SAID THE LINE

    • @fizzipop
      @fizzipop 2 месяца назад +24

      the brainrot is setting in 😔

    • @xXMangoXx_
      @xXMangoXx_ 2 месяца назад +8

      I audibly laughed out loud thank you

    • @sirsamiboi
      @sirsamiboi 2 месяца назад +5

      I audibly went "NOOOOO" 😭🙏🗣️‼️🔥

    • @ByteNekos
      @ByteNekos 2 месяца назад

      @@sirsamiboi sameeeee 😭😭😭😭😭😭

    • @H_Is_A_Letter_That_Is_Cool
      @H_Is_A_Letter_That_Is_Cool Месяц назад +2

      add that to the list of phrases that have been just destroyed

  • @___echo___
    @___echo___ 2 месяца назад +163

    but acerola

  • @gerphunkle5881
    @gerphunkle5881 2 месяца назад +49

    “Chaos Control”
    This is gonna be a good one.

  • @Mikolaj.Michon
    @Mikolaj.Michon 2 месяца назад +55

    its so hard to grasp how insanely fast GPUs actually are

    • @Mukna132
      @Mukna132 2 месяца назад +16

      To be fair, each gpu thread is actually very slow in comparison to a cpu thread. It just has much more throughput than a cpu that gives it its 'speed'

    • @lukajk
      @lukajk 2 месяца назад +12

      *at certain things

    • @pacifico4999
      @pacifico4999 Месяц назад +9

      To be fair he used an absolutely terrible algorithm on the CPU

  • @SX_7
    @SX_7 2 месяца назад +89

    Interestingly, original Elite used procedural generation with a set seed to generate massive (especially at the time), yet always the same universe, using only the modest hardware they had available

    • @duncansnowden6857
      @duncansnowden6857 2 месяца назад +27

      Came here to say the same thing. Originally, proc. gen. was used to mitigate memory and storage constraints, not to create variety or “randomness”. Mike Singleton's “Midnight” series is another impressive example from the '80s.

    • @HumanityAsCode
      @HumanityAsCode Месяц назад +8

      I think games still use proc gen to save memory and disk space like with the foliage example or when placing trash in a city setting.

    • @RAFMnBgaming
      @RAFMnBgaming Месяц назад +8

      specifically it was several set seeds, The possibility space for Elite's procgen was a lot bigger than what it shipped with, the Devs just picked out the seeds for 8 generated "sectors" that worked better than average and made that the play space of the game

    • @HildeTheOkayish
      @HildeTheOkayish Месяц назад +4

      Another advantage of using a set seed is that it is easier to create good results. You can adjust your generation to work really well on just a select few seeds, and if it looks bad on other seeds then that is fine because no one is using those anyway

    • @codahighland
      @codahighland Месяц назад

      River Raid did the same thing.

  • @AlanStryman
    @AlanStryman 2 месяца назад +99

    But Acerola,

  • @marcozanella9850
    @marcozanella9850 2 месяца назад +36

    9:20 Perhaps I'm too optimistic, but I think you are looking for is collecting semantics. If you start from the initial axis aligned bounding box, apply the first transformation to it (rather than to the points), evaluate the result, apply the second transformation, apply a widening operator to its output and the first result to get a bounding box big enough to accomodate both (that's the collecting part) and repeat for all the transformation, you should get the minimum sound AABB. If you know the transformations in advance, but not the order in which they are applied, it's a bit more involved and you may need to play around with widening and narrowing operators, but still doable, especially because this procedure can be done "at compile time" instead of "at runtime".

    • @prophetzarquon
      @prophetzarquon Месяц назад

      Wouldn't that risk skipping over outliers, unless a transform to every possible subdegree of rotation, were tested?

    • @marcozanella9850
      @marcozanella9850 Месяц назад +1

      @@prophetzarquon Nope, that's the point of collecting semantics and widening operators: every possible execution path is handled, regardless of its probability

  • @Squirrelsquid
    @Squirrelsquid Месяц назад +18

    But, Acerola, I can't believe I watched the whole sponsored segment. The cat petting was enticing. No idea what was advertised, but I need to pet my cats now.

  • @bagodrago
    @bagodrago Месяц назад +9

    Me once again realizing Acerola tricked me into listening to another programming fundamentals lecture unrelated to the premise of the video

    • @bagodrago
      @bagodrago Месяц назад

      ruclips.net/video/1FhOowSu2ao/видео.html

  • @_cruentus
    @_cruentus Месяц назад +21

    11:48 as a web developer: As long as its using tailwind 4, the newest version of react in astro islands deployed to vercel edge written exclusively by chatgpt o1-preview, yea 400 ms is probably ok

  • @I.____.....__...__
    @I.____.....__...__ 2 месяца назад +31

    1:05 "Why use procedural-generation that isn't random?" - Ask farbrausch about _.kkrieger,_ a 96KB UE3-style FPS. 😒

    • @SianaGearz
      @SianaGearz Месяц назад +7

      Actually even the presented example Minecraft is deterministic by design except the very first step, seed generation. A given seed and a given version of the generator is always supposed to generate the same world.

    • @everythingisterrible8862
      @everythingisterrible8862 Месяц назад

      While we're in this thread: Pitfall! for the 2600 had algorithmically generated screens.

    • @prophetzarquon
      @prophetzarquon Месяц назад

      Pitfall for the Atari 2600, is a good example of what can go wrong: Some playthroughs of Pitfall on the 2600, give unbeatable screens impossible to get past.
      Sanity-checking each generated element, is what games like Minecraft & Dwarf Fortress do well, & it's very much due to meticulous dev testing.
      _That's_ the real reason procedural generation isn't more widely used: Unless the procedural generation happens to work brilliantly well, hiring humans to generate one game's worth of interesting content, can actually be more cost-effective than curating procedurally generated content.
      Adding one new type of thing, to a procedural generator, can require a _lot_ more testing, than adding that thing to a hand-made environment.

  • @laeianimation
    @laeianimation 2 месяца назад +9

    On another note, I just started to watch Kizumonogatari and I thought to myself: "where have I seen this editing style before?"... now it all comes together!

  • @Squish_Squash
    @Squish_Squash 2 месяца назад +8

    BUT Acerola!
    I actually love how broken the procedural generation can get in Minecraft; had a server with some friends a few years ago and we set up beside this absolutely massive mountain that had gotten sliced into and the rest of the mountain overwritten by a plains biome (kind of like the screenshot at 2:56). It was incredible.
    Regardless, tho, I love how you tied in a new topic like procedural generation and parallel programming techniques to your own work and real examples, it's always so fun to watch

  • @NotKnafo
    @NotKnafo Месяц назад +22

    i was pissed at your criticism at first glance
    after watching the video im only pissed for being click baited

  • @enderboy-db3sh
    @enderboy-db3sh Месяц назад +2

    Putting the cat there during the sponsor segment absolutely worked.
    But now I'm sad the cat is gone

  • @Ikedude8
    @Ikedude8 Месяц назад +10

    Having worked on something similar, a couple of thoughts:
    1. You can use subgroup min/max to avoid having to use groupshared memory (and the associated barriers). I found this to be a big speedup specifically on an iGPU. With Vulkan you can use specialization constants to make the local size match the subgroup size (or just hardcode it to 32 for Nvidia hardware 🤷‍♂)
    2. Each thread can load more than one number (say ~8) and do a sequential min before you do the subgroup min. The overhead of launching each group means it can be more efficient to do more work per group with less groups.
    3. You can do it all in one dispatch by taking the subgroup min and then using atomic min/max. You'd need to play with the "values reduced per thread" to get the most benefit here since contention on a single global could be slower but it really depends on how atomics are supported on the particular hardware.
    4. Why not combine the rough simplified point generation and extent calculation into one pass? If you're not using the points otherwise you can avoid a bunch of memory traffic by never writing them out and just having each thread generate some points while keeping track of the min/max, subgroup min/max, and then atomic min/max.

  • @devontheundivided9815
    @devontheundivided9815 Месяц назад +5

    >shows the coolest thing ever
    >says it sucks
    and i should value your opinion why?

  • @NostraDavid2
    @NostraDavid2 2 месяца назад +46

    Wave Function Collapse is (IMO) the king of procedural generation, but only for 2D. For 3D you need to dig into Grammers for procedural general. I know a guy called Paul has been working on that. He also did Model Synthesis, the predecessor of what is now Wave Function Collapse.

    • @gege0298
      @gege0298 2 месяца назад +9

      i wouldnt call it "The King" but it's defo a really neat tool. there was a neat paper about "nested" wfc for content generation, you'd make a high level mask of the expected level structure and use wfc to build the specific areas.
      also some real interesting autoencoder approaches where the machine learns to "intuit" what vectors describe interesting/feasible levels

    • @jakubstaniszewski304
      @jakubstaniszewski304 2 месяца назад

      Could you share a name of the paper with autoencoder? ​@@gege0298

    • @artemis.nnnnnbbbbb
      @artemis.nnnnnbbbbb 2 месяца назад

      Minecraft does have both 3d and 2d generation, including the 2d surface biome map, the 2d heightmap, the 3d cave carving, ores and 3d cave and nether biomes, 2d and 3d feature placement depending on surface or cave/nether features

    • @bloodgoa139
      @bloodgoa139 2 месяца назад +4

      It really depends on the problem you're trying to solve. WFC wouldn't work for minecraft while fractal noise wouldn't work for townscaper (which does use 3D WFC btw!). Also depending on the use-case, it can be quite hard to keep WFC from generating undesirable outputs.

    • @RAFMnBgaming
      @RAFMnBgaming Месяц назад

      @@artemis.nnnnnbbbbb I think how minecraft jigsaw structures work is WFC-adjacent

  • @deadlydiva
    @deadlydiva 2 месяца назад +21

    HAPPY BIRTH VIDEO

  • @domdru2967
    @domdru2967 2 месяца назад +22

    Since you don't need a precise solution, you could get away using probability.
    Take N random particles, calculate min/max bounds for them. This is similar to what you did, but you could get away with way less points using probability. Calculate average X,Y and Z distances between them and expand your box by that average up and down. If you really want to avoid clipping, scale that average by a %.
    I don't remember the name of this method, but I've read about it and usually use it to calculate min/max for height maps. I usually get away with about 10-100 points. Your data is probably a bit more complicated but i bet you could get away with about a 1000 random particles.

    • @gogauze
      @gogauze 2 месяца назад

      This is one of the 3 places I was going to start for an analytical solution. Especially because, if one does exist, it might just fall out of looking at iterations of each equation at extreme ends of the solution spectrum.

    • @orfeasliossatos
      @orfeasliossatos 2 месяца назад +2

      (edit, I misread the original poster)
      This is precisely an unbiased statistical estimator of the maximum of uniform random variables! Also, the solution to the German Tank Problem.
      (previous comment, true but irrelevant to OP's comment)
      I wanted to bounce off this answer with a quick theoretical justification about using the average here. Markov's inequality says that the probability of a positive random variable being K times larger than its expectation is less than 1 over K. So if you model the distance from the origin as a random variable whose distribution matches that of the current state of the fractal, and you want less than 1% of the particles to be outside the box, then make the box K=100 times larger than an (estimated) average distance from the origin.
      But actually Markov's inequality is relatively conservative so you're probably be fine with much smaller values of K. An alternative way of doing this could to directly use a statistical estimator of the maximum. Numberphile has a video titled "The clever way to count tanks" that gives a fun introduction ot the topic.

    • @domdru2967
      @domdru2967 2 месяца назад +1

      @@orfeasliossatos German Tank Problem! That's where I learnt it. Been using it for years and completely forgot how I know about it. Now I remember counting tanks in school.
      To add one more thing. You are right saying this is for uniform random variables. That's why I would probably scale the bounding box by more than an average to be safe. Those shapes don't look exactly uniform.

  • @neopalm2050
    @neopalm2050 2 месяца назад +15

    9:21 by chance, I've actually worked on this before. I can't give you the minimum, but I can give you a relatively okay enclosing region. The largest translation has sone length l, and each scale factor scales by a factor of r at most, with r < 1, so a geometric series can give that the absolute farthest that you can get from the origin is l/(1-r). It's possible that this sphere is too large, but it will definitely not be too small. I was working with 2D rep-2-tiles though, so I didn't need to worry about it being too big, and this was plenty.

  • @RAFMnBgaming
    @RAFMnBgaming Месяц назад +4

    My university final year project was mostly Procgen. I think the thing I learned the most from it was "if you can, just program the computer to take the steps you'd do to design something, noise sucks"

  • @mewtilation
    @mewtilation 2 месяца назад +2

    i suddenly feel compelled to put the short-form particle content on this channel on loop on a separate monitor! thanks acerola

  • @UnknownUser-wf5kr
    @UnknownUser-wf5kr Месяц назад +4

    I hate the algorithm.
    Why is negativity favored?
    Why is clickbait rewarded?
    Psychology is to blame at least a bit I suppose.
    Good Video, safe for the clickbait.

  • @butlazgazempropan-butan11k87
    @butlazgazempropan-butan11k87 2 месяца назад +21

    0:20 There's no Rock and Stone, so you wont be coming home

  • @DivjotSingh
    @DivjotSingh Месяц назад +6

    The problem with Starfield was that it couldn't find the bounding box of boredom.

    • @rainboroad4075
      @rainboroad4075 Месяц назад +3

      Starbound too, maybe games just shouldn’t start with “star”

  • @shaunbrender
    @shaunbrender Месяц назад +2

    Having a cat video in the sponsorship segment is genius.

  • @whydoineedausername1386
    @whydoineedausername1386 2 месяца назад +4

    That thumbnail isn't broken worldgen though, it's the transition between chunks saved by old world gen and stuff generated by new world gen. Minecraft does not try to smooth over changes in world generation

  • @maumarin789
    @maumarin789 Месяц назад +2

    This is the first time I watch a full sponsorship add because of the cat... Well played

  • @RogueWizard16-c1h
    @RogueWizard16-c1h Месяц назад +3

    Just saying: watched the whole sponsored segment only to see the cat

  • @sparkydoggo8691
    @sparkydoggo8691 2 месяца назад +18

    new video already? i havent finished my 60th watch of the particle one yet

  • @EmissaryofWind
    @EmissaryofWind Месяц назад +3

    It's called a warp because on a loom, the warp is the group of threads that will be going down the entire length of your fabric. Early computers were inspired by the jacquard loom and its punch card system, it's so cool to see that inspiration carried on through the names of things

  • @CMak3r
    @CMak3r 2 месяца назад +1

    Placing the cat video right next to the skillshare integration was genius. Thank you

  • @strangebird5974
    @strangebird5974 Месяц назад +39

    Ok, so this was a bait and switch.
    I, like many others, probably clicked this video because I and we were interested in an argument about procedural generation. We didn't really get one that went beyond very surface level. I guess you acknowledge this at the end, so, ok. The programming talk was probably interesting, but I was a little checked out, waiting for the video to return to the topic at hand. A little in vain. (Though, sure, the programming stuff sounded interesting, so I'll bookmark that for later, I guess.) (I probably won't.)
    But the topic of the video and your brief foray into a criticism of procedural generation and the subsequent work trying to tackle procedural generation, as you construed it, made me think of a distinction that I think would be interesting - interesting in regards to what I was mislead to believe was the topic of this video, not so interesting perhaps in regard to this video's actual topic (I dunno, something about algorithms for particle boundaries, something something): That is, you show Dwarf Fortress along a lot of other video game titles. But Dwarf Fortress utilizes a key difference in its procedural generation that distinguishes it from the other titles, as far as I know; and distinguishes it from your particle example, I think. Namely, DF uses a stepwise or iterative procedural generation where the initial random output is then acted upon by a set of rules that align with something we could find comprehensible, namely the history of the world plays out; this results in the randomness we encounter having an actual history and backstory in the game. This would be like if Minecraft, instead of procedurally generating the end result of a world randomly, procedurally generated millions of years of tectonic activity.
    You might say that this is just procedural generation with extra steps (literally!), but yes, that's what distinguishes it - because that's what makes procedural generation bad in the outset - that it lacks history and thus meaning (or rather comprehensibility) (and ok, authorial intent, I'll grant that). But in an iterative generational process like this, you are more likely (I think?) to end up with unique flukes in the world - whereas most procedurally generated content is all rather same-y.
    Think of the geology of Earth: you might think that everything sort of exists everywhere in terms of geology; but that's not the case. Earth's geology abounds in rare and unique biomes, where the history of things happening in a geological timeframe came together just in the right way to create something marvellous.
    So, I guess this long-winded comment is my qualified "yes" to procedurally generated content - if we take a cue from Dwarf Fortress and do it right.
    And also, that was a clever way to make us watch the ad. Not that I was watching the ad or listening to it much.

  • @3DperspectiveJS
    @3DperspectiveJS Месяц назад +1

    The cat during the sponsored segment was very helpful for keeping my attention.

  • @WeedL0ver
    @WeedL0ver 2 месяца назад +62

    5:35 is a copyright infringement

    • @Redman9910
      @Redman9910 2 месяца назад +8

      Good, I don't like IP.

    • @GODofTimewaste2
      @GODofTimewaste2 Месяц назад +7

      I'm out of the loop; please elaborate.

    • @WeedL0ver
      @WeedL0ver Месяц назад

      @@GODofTimewaste2 look up "Thick of it-KSI"

    • @UnknownUser-wf5kr
      @UnknownUser-wf5kr Месяц назад

      Thick Of It is the hit song by KSI

    • @Redman9910
      @Redman9910 Месяц назад +1

      @@UnknownUser-wf5kr Ah... Now I get it.
      Still don't like IP tho.

  • @TheRumpletiltskin
    @TheRumpletiltskin 2 месяца назад +4

    YOU TRICKED ME INTO LEARNING AGAIN ACEROLA!

  • @bahamutbbob
    @bahamutbbob Месяц назад +3

    8:20 My favorite part of this is when you can see a modern game drawing in the void when you turn the camera.

  • @ModularKnight
    @ModularKnight Месяц назад +2

    Yes I love two ads at the start and two ads at the 2 minute mark is more ad than content thanks RUclips

  • @RoyalArthurio
    @RoyalArthurio Месяц назад +3

    Thanks for the video and this is great but when procedurally generating infinite worlds on a grid you need to think outside-in, not inside-out. Which coincidentally is exactly what minecraft does. It generates the large picture first and then refines the details. So essentially if you have an entity that spans multiple grid nodes (chunks) you don't generate the entity first and then figure out the bounding box. You generate the "bounding box" first and then subdivide that to generate the details of the entity. So when you start your generation from any random grid node you end up with the same result for each node. Then you don't have to confine your entities to the bounds of a single grid node. You can generate the bounds and shapes of your entities and features on an abstract level and then it doesn't matter which direction you approach them from. For example minecraft will make the same mountain and the same underground dungeon regardless of whether you approach it (and generate it) from north or south. For this to work the algorithms need to be completely deterministic. There's no real randomness at all. It's all deterministic pseudo random based on input parameters including a seed. The seed determines the variant and the pseudo randomness branching off from that (and other input parameters) creates the chaotic complexity. Jitteriness implies either non psedo randomness or a time dimension / input parameter. This is incompatible with procedural generation. You either need to at least be able to generate an initial state deterministically. If you bring a time parameter into the generation logic then you need to regenerate or mutate everything that has already been generated accordingly in real time to stay in sync with any new chunks to be generated so they can match up. Not impossible but many things considered static and final without a time dimension become dynamic and require additional logic to reconcile when mutating especially if the generation logic can interact with player made changes.

  • @NourArt02
    @NourArt02 Месяц назад +1

    Putting your cat next to your sponsor segway was genius i didn't skip it like i usually do

  • @yuu-kun3461
    @yuu-kun3461 2 месяца назад +8

    But Acerola, if we have a thread checking for min of 2 numbers then writing that back to the local arrat... can't we just have it write the other number (which is the max) to a 2nd memory array? Would this save performance as we would dispatch half groups overall, but have double the local memory?

    • @tk36_real
      @tk36_real 2 месяца назад +1

      exactly what I thought + since the video uses the "upper half" of threads just to load memory it all fits within the same buffer already used

    • @MiniTotent
      @MiniTotent 2 месяца назад +1

      Check the second reference. It goes into further optimizations of parallel reduction. It’s using a really old GPU but was able to outperform this example.
      Some other articles note that your idea is right since this is memory bandwidth bound.
      The really funny part is that the cpu version meets the specs he needs (>150 fps) because of caching, block, and prefetch magic. Not to mention a mid range CPU can fit the whole array in L3 cache. If you aren’t really good at algorithms use an abstraction library or just try trusting the hardware engineers. They might have optimized for your case.
      The real fancy parallel reduction going on here is intelligently reducing the number of elements.

    • @Sergeeeek
      @Sergeeeek 2 месяца назад

      You could also use wave intrinsics on modern gpus, then you don't even need group shared memory which is still kinda slow relatively speaking.

  • @Gabriel-rk7tu
    @Gabriel-rk7tu 2 месяца назад +1

    Your sponsor segments are the only ones I sit trough and watch and it's because of your very cute cat

  • @HinojoGaming
    @HinojoGaming 2 месяца назад +19

    I got clickbaited into learning and I loved it

  • @fantastic-b2m
    @fantastic-b2m 18 дней назад +1

    tbh, i got tricked by the thumbnail, but i still like the programming lesson

  • @sam42j
    @sam42j 2 месяца назад +4

    love the cat sponsor segments 😌

  • @kiro_derg
    @kiro_derg 2 месяца назад +1

    putting the cat in the sponsored section is genius

  • @LD-dt1sk
    @LD-dt1sk 2 месяца назад +5

    U think a cat will make me watch an ad?

  • @realfries09
    @realfries09 2 месяца назад +1

    Hey Acerola! Really appreciate the videos and the time you put into them! They always talk about some interesting topic, and get me interested in them! You explain everything concisely and well, and I wish you the best!

  • @我的暱稱
    @我的暱稱 2 месяца назад +9

    0:22 You forgot to mention the greatest game of all time, *Summertime High School: A Young Man's Notes-How a New Exchange Student Like Myself Ran Into His Childhood Friend on the School Tour, Then, for Some Reason, Became Super-Popular with the Girls for His Daily Scoops on the School Photography Club Even Though He Only Takes Panty Shots, and What He Thinks as He Goes on Dates During His Summer of Island School Life.* How could you not mention *Summertime High School: A Young Man's Notes-How a New Exchange Student Like Myself Ran Into His Childhood Friend on the School Tour, Then, for Some Reason, Became Super-Popular with the Girls for His Daily Scoops on the School Photography Club Even Though He Only Takes Panty Shots, and What He Thinks as He Goes on Dates During His Summer of Island School Life!!!* (yes it's a real game)

    • @obsidianflight8065
      @obsidianflight8065 2 месяца назад +1

      I know you said it's real but I want to check if it's real
      but I also don't want that monstrosity in my search history...

    • @我的暱稱
      @我的暱稱 2 месяца назад

      @@obsidianflight8065 The game's name is quite the joke in itself! The game in question is *Natsuiro High School: Seishun Hakusho.* There are Let's Plays available on RUclips, but honestly... it might not be worth your time!
      Fun fact: urban legends suggest that Yandere Simulator’s creator may have drawn heavy inspiration (some might say borderline copying) from this game when designing its tropes and mechanics.

    • @我的暱稱
      @我的暱稱 2 месяца назад

      @@obsidianflight8065 The game in question is *Natsuiro High School: Seishun Hakusho.* There are Let's Plays available on RUclips, but honestly... it might not be worth your time!

  • @dokMixer
    @dokMixer Месяц назад +1

    "2 fps is not very good... but good enough for a web developer probably"
    I friggin spilled my coffee on this one :D

  • @archiemcw
    @archiemcw 2 месяца назад +10

    dinner video time omg

    • @Acerola_t
      @Acerola_t  2 месяца назад +4

      hi archie

    • @archiemcw
      @archiemcw 2 месяца назад +1

      @@Acerola_t hiiiiii banger video goat

  • @theftking
    @theftking 2 месяца назад +2

    Sick my phone just up nexted this and I'm stoked

  • @moutondemocrate6874
    @moutondemocrate6874 2 месяца назад +12

    STARBOUND MENTIONNED 🔥🔥🔥 I LOVE GAMES WITH INSANE POTENTIAL THAT GET RUINED BY THE GREED OF COMPANIES 🗣🗣🗣 💯💯💯 🦅🦅🦅

  • @ge7inn
    @ge7inn Месяц назад +2

    5:00 the cat in the thing is smart

  • @EnigmaticGentleman
    @EnigmaticGentleman Месяц назад +2

    Bit of a gripe, with that Minecraft example you showed it was in an old version, post 1.18 the terrain generation is pretty unanimously agreed to have had drastically improved

  • @hazeljoy1
    @hazeljoy1 Месяц назад +1

    This was both extremely technical but also very approachable in tone. Nice balance for us geeks out there

  • @theultimateevil3430
    @theultimateevil3430 2 месяца назад +30

    Procedural generation that affects the gameplay (e.g. Minecraft map) goes hand in hand with gameplay features that are specifically there to mitigate bad random outcomes. You can place & remove blocks in Minecraft, build and dig walls in Rimworld, fill lakes in Factorio, etc. which greatly improves the experience in sandbox-type games. That's what bothered me in Satisfactory -- its map is not procedural, and the game does not allow you to modify it, punishing you for picking a wrong place for your factory each time, constraining the space when you scale it, etc. -- as a result, the game felt like garbage. The only solution in Satisfactory was to build the factory up in the sky since there is no terrain here.
    Procedural generation has started as "algorithms generating the content", but there is much more to it from the game design standpoint.

    • @mnxs
      @mnxs 2 месяца назад +5

      > "the game felt like garbage"
      Tbh, this just sounds like cope for your skill issues. (Yes, I said that. If you want to dish out harsh and unreasonable criticism, expect to get pushback.)
      Satisfactory is happy to give you either option of placement - either you can work with the terrain (which requires planning and having developed some skill in laying out factories), or just build atop/around it. There's no gameplay downside to choosing the latter, only possibly aesthetics and your sense of "realism". In other words, you're getting your panties in a bunch over something insubstantial. Chill out.

    • @b_dawg_17
      @b_dawg_17 2 месяца назад +1

      @@mnxs I was gonna comment here… but I think you got this one covered lol

    • @theultimateevil3430
      @theultimateevil3430 2 месяца назад +5

      @@mnxs This limitation serves no purpose and doesn't enhance gameplay in any way, and could've been avoided if they went with procedural, saw how the said limitation affects the gameplay in general cases and not in some niche situations, and added some workarounds that could have improved the game even in places where there are no such problems. Minor inconveniences build up after you sink in a few hundreds of hours, but they are generally ignored before that, both by players and the devs, because no dev can preemptively fix that without playing their own game for hundreds of hours as well, even then they won't fix them because they get so used to those minor inconveniences during the development. That is also why any devs need playtests, to get a fresh look on the game. And then the deadlines and the limited resources deprioritize those fixes, just so the game could be released at all, this is clearly not a silver bullet that everyone should be doing.
      You've completely missed my point. Any game requires the players to accept its quirks and jankyness to be able to enjoy it. I'm talking about how the methodology of Procedural can change the perspective, not about how Satisfactory sucks ass because they dared to not add the terraforming.

    • @rumfordc
      @rumfordc 2 месяца назад +6

      @@mnxs nah its an inferior game and your inability to recognize why the mechanics are inferior is your own skill issue, and your reply here was your own coping mechanism. every satisfactory base ends up becoming spaghetti in the sky because its simply a poorly designed game.

    • @harpoonlobotomy
      @harpoonlobotomy 2 месяца назад +1

      ​@@theultimateevil3430 "its map is not procedural, and the game does not allow you to modify it, (...) -- as a result, the game felt like garbage" kinda sounds like you think Satisfactory sucks ass because they didn't make it procedural with terraforming.
      Maybe they just wanted a fully authored game? The challenges are different, but I disagree that it's inherently worse. Because there is no terraforming you learn the map, with each new iteration you use the landscape more effectively because the limitations force you to. Because you know where resources are going to be, you can plan outposts, buildings and routes from the first foundation.

  • @Livingstudent
    @Livingstudent Месяц назад +1

    Merry Christmas, Mr. Acerola!

  • @greycube9121
    @greycube9121 2 месяца назад +16

    i am genuinely so upset that i will never get to meet acerola's cat

    • @cavemann_
      @cavemann_ 2 месяца назад +1

      Me too fam.... me too...

  • @Lebartuu
    @Lebartuu Месяц назад +4

    3:37 my brain went i already watched it and have still no idea what you just said

  • @maimaiuwu9963
    @maimaiuwu9963 Месяц назад +33

    So this whole video is a non-sequitur, got it. The lack of a true thesis is incredibly disappointing as well as the fact that no solutions or ideas were brought up to fix the concept that you think "sucks".

    • @OilFreak
      @OilFreak Месяц назад +4

      That's not his job though? You can critisize something without providing a solution.

    • @maimaiuwu9963
      @maimaiuwu9963 Месяц назад +14

      @ Creating a video essay implies a deeper understanding of a topic and that there will at some point be a conclusion. This video failed to provide a satisfying conclusion, so I feel that it wasted my time. Just because you can do something doesn't mean that it's good or satisfying for an audience to watch.

    • @OilFreak
      @OilFreak Месяц назад

      @@maimaiuwu9963 Alright that's fair. I still disagree though.

    • @jamess.7811
      @jamess.7811 Месяц назад

      if everything was required to be "good and satisfying for an audience" we wouldn't have intellectual discussions of concepts, or non-charged criticism​@@maimaiuwu9963

    • @eggi4443
      @eggi4443 Месяц назад +2

      ​@@maimaiuwu9963 that was not the purpose of the video and it's not the creator's fault you misunderstood it

  • @diochan9705
    @diochan9705 2 месяца назад

    Thankyou acerola, I really enjoyed especially this past videos you have uploaded

  • @borisoid
    @borisoid Месяц назад +5

    I love how you make videos "dark mode". Even if it means some pictures become white rectangles on black background, I much prefer this rather than being flashbanged in the middle of the night

    • @MissDarknSpooky
      @MissDarknSpooky Месяц назад

      I didn't even notice until you mentioned it. Alas, I agree. I much prefer having eyesight. 😅

  • @infinitivez
    @infinitivez 2 месяца назад

    Not me getting super excited to see another Acerola video before the new year!

  • @73bugs
    @73bugs Месяц назад +5

    cat starts at 4:35

  • @3141minecraft
    @3141minecraft Месяц назад +1

    1:55 wait a minute that actually looks like a good challenge

  • @MacAlmighty
    @MacAlmighty 2 месяца назад +22

    Wake up babe, new Acerola video dropped

  • @gabrielbob123
    @gabrielbob123 2 месяца назад

    Absolutely loved the video, as usual, you're so great on explaining all these complex topics in a way that is super understainable and engangig, but if I could point at just one thing in the video is the timing for the ad, I know that it was timed to be just prior to answering a question, but you were so good in keeping us into the topic of generating those fractals and the complications with controling the RNG and when you called the ad all that rhythm was destroyed just prior to the moment when you start to get complicated and more atention is needed.
    I'm sorry if i stepped over any boundary, keep up the great work youre doing

  • @ixilom
    @ixilom Месяц назад +9

    Jokes on you, I learned nothing.

  • @Kavukamari
    @Kavukamari 2 месяца назад +2

    they should have called it Aligned Bounding Box (Axis), not only does this allow for other types of alignment like (Vector), but it also spells ABBA

  • @BobzBlue
    @BobzBlue 2 месяца назад +3

    "But ACE-" *Turns into a game of pong

  • @renobrecords
    @renobrecords Месяц назад

    If you have a finite set of contractive affine transformations defining an attractor, you can find the smallest axis-aligned bounding box by solving a fixed-point problem on boxes. This is typically done via iterative approximation. start with a bounding box known to contain the attractor, apply each transformation to that box, take the union of the results, and find the smallest bounding box of this union. Repeating this process and letting it converge yields the minimal axis-aligned bounding box of the attractor.
    To find the minimal axis-aligned bounding box of the attractor formed by a set of affine transformations you have to formulate the problem as finding a fixed-point of an operator acting on boxes.
    Then use iterative approximation: start large and refine by applying all transformations, unioning their images, and boxing the result. Continue until convergence to a stable, minimal bounding box or until you're bored.
    Now where's my cookie?

  • @gaker19sc
    @gaker19sc 2 месяца назад +6

    8:45 but Acerola, shouldn't x=b/a, not a/b?

    • @Acerola_t
      @Acerola_t  2 месяца назад +11

      yeah probably

  • @Gabriel-rg7cy
    @Gabriel-rg7cy 2 месяца назад

    Acerola posting content with little after that the previous? This is heaven?

  • @shbeebo1176
    @shbeebo1176 2 месяца назад +8

    I love Acerollup (:

  • @itznukeey
    @itznukeey Месяц назад +1

    Good bait. Jokes on you we had mandatory parallel programming course in uni so I got my PTSD back

  • @morais.online
    @morais.online 2 месяца назад +4

    1:56 Missed opportunity to make a joke about Skygrid players basically doing this exact thing

    • @haph2087
      @haph2087 2 месяца назад

      Yeah, I was thinking that too.

  • @hctaz
    @hctaz Месяц назад

    After watching this video, I can 100% confirm you are an expert level game developer.
    You got me to watch a crappy sponsored segment by putting cat pets on the screen. You got me to listen to your entire video about fundamental parallel programming techniques with the most expertly crafted bait and switch of all time.
    You basically were like, "I have this concept for a video (genre of video game???), but I want people to still be entertained even if they aren't really interested in the topic itself (getting players outside of the genre to enter the genre and actually have fun????)," and then you did it successfully.
    Like I'm not even mad I got baited. I'm actually just entertained and am like, "Wow, so this is how some of this stuff I don't care about at all works. Neat! I will now like the video."

  • @HidinginPublic
    @HidinginPublic 2 месяца назад +3

    ALREADY INCORPORATING METAPHOR MUSIC I SEE

  • @MaxTechEngineering
    @MaxTechEngineering 2 месяца назад

    I skip everyone else’s adverts, but you got that beautiful kitty

  • @bits360wastaken
    @bits360wastaken 2 месяца назад +8

    But Acerola you forgot Rogue!

    • @NostraDavid2
      @NostraDavid2 2 месяца назад

      I've found that the programmers that play rogue are DEEP into procedural generation. Like, super duper deep. Wave Function Collapse is the tip of the iceberg deep.

  • @cmilkau
    @cmilkau 2 месяца назад +1

    The problem is not procedural generation. It is that the time wasn't really ripe for it yet. There is too much randomness, too little depth in the patters created. We are approaching a time however when generative algorithms can reach a level of depth that is interesting. If the game fits (sandboxes, survival), that is already enough. Generative algorithms as capable as level designers and story writers (e.g. exploration games) may be a bit away still, but may also be within reach.