3D Cellular Automata - complex behavior from simple rules

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

Комментарии • 114

  • @Tantandev
    @Tantandev  2 года назад +26

    *Petition to change the name:* cellular automata to celluar automata. I can't believe I miss-spelled that haha
    project source code: github.com/TanTanDev/3d_celluar_automata
    learning article: softologyblog.wordpress.com/2019/12/28/3d-cellular-automata-3/

    • @swordfishxd-
      @swordfishxd- 2 года назад

      WHERE IS THE INTERACTIVE PART OF THE SOFTWARE

    • @tqwewe
      @tqwewe 2 года назад

      🤣 just go with it haha

    • @the_frog_army
      @the_frog_army 10 месяцев назад

      *cellular
      *misspelled

  • @hermannpaschulke1583
    @hermannpaschulke1583 2 года назад +90

    For faster recompilation on Linux, I can highly recommend the mold linker. Linking is one of the slowest steps when incrementally working on a rust project

    • @Tantandev
      @Tantandev  2 года назад +15

      I've never heard of it! I shall try it out thanks for the tip!

  • @purplemosasaurus5987
    @purplemosasaurus5987 2 года назад +31

    These videos are a great balance of informative and funny, great job!

    • @tqwewe
      @tqwewe 2 года назад

      Three comments!

  • @olive-vrta
    @olive-vrta 2 года назад +15

    I WANT YOU TO TALK ABOUT THE COOOODE~

  • @hanspeter-bh8qs
    @hanspeter-bh8qs 2 года назад +6

    Tantan is literally the only youtuber for whom I pause and like the video, when he reminds me to do so :)

  • @angelite2555
    @angelite2555 2 года назад +4

    You always have such wonderful project ideas TanTan. Keep it up! We're here for the long haul.

  • @Skeffles
    @Skeffles 2 года назад +3

    It's so mesmerising to see these live and very well explained. I really like the cute blocks!

  • @Graverman
    @Graverman 2 года назад +2

    Love it, I've been into celluar automata for a long time now and I'm glad you made a video on it

  • @jaydev6724
    @jaydev6724 2 года назад +3

    Epic song at the end.

  • @purplemosasaurus5987
    @purplemosasaurus5987 2 года назад +5

    You make really unique videos, I love it.

    • @tqwewe
      @tqwewe 2 года назад

      One comment

  • @orztirr1417
    @orztirr1417 2 года назад +7

    This would be amazing for some magic effects in a voxel game. Nicely done!

  • @XxBobTheGlitcherxX
    @XxBobTheGlitcherxX 2 года назад +28

    Heyo, dint get to see much of the code, but you can replace the hashmap by just an array and send it to a compute shader to calculate the new states, since calculating the new state of each cell is independent from the others. I think you could get great performance :D

    • @shadamethyst1258
      @shadamethyst1258 2 года назад +5

      The conversion from hashmap to array would make the code much faster even if it was on the CPU only

    • @leddoo
      @leddoo 2 года назад +4

      yup, did that. ~10x faster single threaded. and scales perfectly across multiple cores.

    • @terezip2213
      @terezip2213 Год назад

      @@shadamethyst1258 If you have a 1D array to store all the states, you could use a hilbert curve to map 1D array indexes to 3D coordinates. A property of the hilbert curve is that things close together in the 1D array are close together in X Y Z space, and because you're checking a cells neighbors in X Y Z space, a 1D array mapped to a 3D space via a hilbert curve means that neighbors will be closer together in memory, on average. That might be able to reduce cache misses?

    • @shadamethyst1258
      @shadamethyst1258 Год назад

      @@terezip2213 It would maybe reduce cache misses, but it would also make it a lot harder for the compiler to vectorize the code

  • @flyingsquirrel3271
    @flyingsquirrel3271 2 года назад +7

    Nice video, I really enjoyed it! Cool animations to look at, cute voxels, funny devlog, rap in the end :D To be honest, I would have loved to get some more insights about the code and your optimization journey though. I think getting worse performance out of multithreading for smaller input sizes is very common btw.

    • @Tantandev
      @Tantandev  2 года назад +5

      "worse performance out of multithreading for smaller input sizes". Man I didn't think of that but that makes sense

    • @flyingsquirrel3271
      @flyingsquirrel3271 2 года назад +5

      @@Tantandev Yeah I guess at some point the coordination/synchronization between threads takes longer than the actual work they do. If you're relatively new to multithreading in rust, maybe take a look at atomics (primitive numeric types that can be safely mutated through shared references) and at channels (e.g. crossbeam or flume), just to expand your toolbox. And consider using the mutex/rw lock from the crate parking_lot. It's basically a drop in replacement that performs much better, so that could be an easy win for your simulation :)

  • @mek101whatif7
    @mek101whatif7 2 года назад +6

    Noooooo, don't cut the CODE😭😭😭😭😭😭

  • @PenguinjitsuX
    @PenguinjitsuX 2 года назад +1

    I always love the raps in your videos!

  • @Joel-pl6lh
    @Joel-pl6lh Год назад

    People are watching a programming channel but don't care about the code? I actually want more!

  • @lubba64
    @lubba64 2 года назад +1

    YES ANOTHER TANTAN VIDEO

  • @imaginaoYouTubesoquecomarrobas
    @imaginaoYouTubesoquecomarrobas 2 года назад +2

    That's it, now Tantan has to release a rap album after that video ending.
    Great video as always! And I hope that your audience retention rate increases over time on the coding parts...

  • @L4Vo5
    @L4Vo5 2 года назад +2

    This has probably been suggested before but 7:33 proves it for me. Your musical sections would be MUCH better with on-screen lyrics. I can barely understand anything most of the time

  • @sudhirattri8436
    @sudhirattri8436 2 года назад +1

    I wish I could be this happy and enthusiastic in life, that's really all one needs.

  • @wackbyte
    @wackbyte 2 года назад +1

    i think instead of a Arc you could use one of the several concurrent hashmaps available that are made for performance

  • @magnoelmagnifico957
    @magnoelmagnifico957 2 года назад +1

    6:17 What is that program? I don't know many debug tools for Rust...

    • @Tantandev
      @Tantandev  2 года назад +6

      bevy has a feature you can enable called trace_chrome
      it will produce a file when you close the program that you can then load into a website called ui.perfetto.dev
      I learnt about it reading in bevys github page: bevy/docs/profiling

    • @magnoelmagnifico957
      @magnoelmagnifico957 2 года назад

      @@Tantandev Oh, that's cool. Thx!

    • @shadamethyst1258
      @shadamethyst1258 2 года назад

      There's hotspot that I've used to profile my code, it's really easy to get to use it

  • @fraser21
    @fraser21 2 года назад +3

    Please talk about the code!

  • @Dorbellprod
    @Dorbellprod 2 года назад

    Been waiting for another rap, my good sir, excellent video

  • @eboatwright_
    @eboatwright_ 2 года назад

    WOO 16k subs for TanTan!

  • @zenshade2000
    @zenshade2000 2 года назад

    Awesome!!! Definitely something to add to the toolbox. This seems like the key to being able to explore the space of possibilities with particle effects. Like say if you were making a game set on an alien planet, and explosions needed to be "different" and the clouds needed to move in strange ways...

  • @tqwewe
    @tqwewe 2 года назад +2

    Typo in the video Tantan, you wrote "Celluar", but. I think it should be "Cellular"
    Unless I'm wrong maye ?

    • @Tantandev
      @Tantandev  2 года назад +1

      true! I can't believe I missed that!

  • @ZooHair
    @ZooHair 2 года назад

    So much beauty

  • @willlogs
    @willlogs 2 года назад +2

    The rap. OMG the rap.

  • @DylanMatthewTurner
    @DylanMatthewTurner 2 года назад

    Now combine your keyboard snake project with your automata project and put conway's game of life on your keyboard

  • @mikah8998
    @mikah8998 2 года назад +3

    Best outro

  • @DaxSudo
    @DaxSudo 8 месяцев назад

    I like this crazy man and his crazy Linux.

  • @AngelOnFira
    @AngelOnFira 2 года назад +2

    not the VIEWER RETENTION!!

  • @jungesgeld.mp4
    @jungesgeld.mp4 2 года назад

    Dude i love your videos

  • @tqwewe
    @tqwewe 2 года назад +3

    1:34 I'm curious how you animated this? Is it in a 3D program like Blender?

    • @Tantandev
      @Tantandev  2 года назад +1

      I drew the face expressions in gimp, default Unity cube, and then animated everything with the Animator. It took me quite some time...

  • @dorktales254
    @dorktales254 2 года назад

    What profiler are you using?

  • @bubblekill2311
    @bubblekill2311 2 года назад

    crazy dude strikes again

  • @Joerje
    @Joerje 2 года назад +1

    TALK ABOUT THE CODE TALK ABOUT THE CODE

  • @vroomik
    @vroomik 4 месяца назад

    what about 4D CA then?

  • @Michael-rc5ks
    @Michael-rc5ks 2 года назад +2

    Cellular?

  • @betterlifeexe
    @betterlifeexe 2 года назад

    would c# parallel.for work here? it's fairly lightweight and way easier to use than async. (I'm thinking of doing this in unity).

    • @shadamethyst1258
      @shadamethyst1258 2 года назад +1

      Cellular automata are trivially parallelizable, as long as you give each thread the same amount of work and don't waste too much time on synchronization you'll be fine

  • @mashmesh
    @mashmesh 2 года назад

    Loved the video, very creative song as well! Wish you talked more about the code implementation and the theory behind it, I understand that maybe not everyone wants it, but I am sure it is possible to find a good balance like for example Sebastian Lague

  • @Terandium
    @Terandium 2 года назад

    I have been wondering this for weeks now, What is the tpose zombie dj looking dude?
    He looks dope but i just cant figure out if he is supposed to represent something 😭

  • @kirillschmidt9398
    @kirillschmidt9398 2 года назад

    I love your videos!

  • @Naftoreiclag
    @Naftoreiclag 2 года назад

    ok now this is epic

  • @Mailmanjoe_
    @Mailmanjoe_ 11 месяцев назад +1

    i heard factorio and subricbed as fast as possible

  • @basicallybrand
    @basicallybrand 2 года назад

    I love your channel

  • @eboatwright_
    @eboatwright_ 2 года назад +1

    This is great! I also love cellular automata, and simulations! I've made Conway's Game of Life in pure Kotlin (with my own engine :)) and I did a simulation called Verlet Integration in Go :D

  • @MrBinaryG
    @MrBinaryG 2 года назад

    Yo! o/ What did you use to see how much time the operation took? Greate videos btw \O/,

  • @mauriciomatias6261
    @mauriciomatias6261 2 года назад

    You forgot the bevy song hahaha 😂, nice ending

  • @thekwoka4707
    @thekwoka4707 Год назад

    Please talk more about the code

  • @firesoul453
    @firesoul453 2 года назад

    I'd love a long video about the code.

  • @conando025
    @conando025 2 года назад

    I think you could have put the rules into an asset and use bevys hot reloading to not need to recompile (or I'm stupid and that is still a feature yet to be implemented)

  • @dnoldGames
    @dnoldGames Год назад

    Please talk more about the code, imma trying to learn something here

  • @m4rt_
    @m4rt_ 2 года назад +1

    TALK ABOUT THE CODE

  • @lllllllllilllllllll
    @lllllllllilllllllll 2 года назад

    Please talk about the code

  • @LGXerxes
    @LGXerxes 2 года назад

    Why not play factorio in linux?
    You can have non-blocking autosaves, which is very nice and productive

  • @Zicrus
    @Zicrus Год назад +1

    This would be perfect for the GPU. It would probably run a lot faster.

  • @animalibera4326
    @animalibera4326 2 года назад

    Aah cellular automata rabbit hole, it took me years to get out of it and move on aha. For beast-tier speed you could try compute shaders, which seem perfectly well fitted for CA ^^

  • @notenlish
    @notenlish 2 года назад

    You should make the song at the end of the video as a different video

  • @Povai
    @Povai 2 года назад

    Impressive.

  • @Jkauppa
    @Jkauppa 2 года назад

    you can setup your own rules, in the game

    • @Jkauppa
      @Jkauppa 2 года назад

      gpu acceleration

    • @Jkauppa
      @Jkauppa 2 года назад

      X-torch gpu tpu multithreading framework

    • @Jkauppa
      @Jkauppa 2 года назад

      fun fun

  • @alexanderhuliakov6012
    @alexanderhuliakov6012 2 года назад

    Please, talk about the code!

  • @betterlifeexe
    @betterlifeexe 2 года назад

    more code overview in the video please :)

  • @boblydecker5951
    @boblydecker5951 11 месяцев назад

    Your reward was punishment!!
    😆

  • @lllllllllilllllllll
    @lllllllllilllllllll 2 года назад

    use egui to change the rules live

  • @Terandium
    @Terandium 2 года назад

    Amazing rap♥

  • @driftliketokyo34ftw35
    @driftliketokyo34ftw35 Год назад

    I literally just watched that video

  • @nohtml2643
    @nohtml2643 2 года назад +1

    TALK ABOUT THE CODE!

  • @CasGRos
    @CasGRos 2 года назад

    Cool

  • @miloszivkovic6256
    @miloszivkovic6256 2 года назад

    Factorio runs on Linux

  • @king-gn6gk
    @king-gn6gk 2 года назад

    talk about the code is also intresting

  • @lordofwizard835
    @lordofwizard835 2 года назад +3

    My man uses arch.. oh wait.

  • @guesanjo3520
    @guesanjo3520 2 года назад

    idk why every time i see your videos i feel like u are a programing god ... everything seems harf af

  • @purplemosasaurus5987
    @purplemosasaurus5987 2 года назад

    3D Celluwar AutomaTA! XD

  • @atalocke
    @atalocke 2 года назад

    I'd like more code videos. Code if fun!

  • @itsME-dc4vm
    @itsME-dc4vm 2 года назад

    nice ;D

  • @nyx1284
    @nyx1284 2 года назад

    compute shaders

  • @isabellolsson8919
    @isabellolsson8919 2 года назад

    More raps pleeeeeaseeeee

  • @swordfishxd-
    @swordfishxd- 2 года назад

    WHERE IS THE INTERACTIVE PART OF THE SOFTWARE

  • @zoeythebee1779
    @zoeythebee1779 2 года назад

    Noo! Talk about the code!

  • @stephendouglas684
    @stephendouglas684 2 года назад

    More rap please!

  • @MartyRob
    @MartyRob 2 года назад +1

    loool, epic rap !

  • @space_nerd9456
    @space_nerd9456 Год назад

    duel booting my pc killed my pc..... :D twice

  • @smipealex3173
    @smipealex3173 2 года назад

    RUclips will be blocked in Russia, and what will I do?
    I like this channel, I want to watch it, but the state forbids me

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

    Literally came here for the code, not to watch a programmer pretend to be pewdiepie.....Thats a thumbs down from me dawg.
    The news in Idiocracy was a point of ridicule, not something to aspire to....

  • @gmdFrame
    @gmdFrame 11 месяцев назад

    You look Greek