3D Cellular Automata - complex behavior from simple rules

Поділитися
Вставка

КОМЕНТАРІ • 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/

  • @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!

  • @olive-vrta
    @olive-vrta 2 роки тому +14

    I WANT YOU TO TALK ABOUT THE COOOODE~

  • @purplemosasaurus5987
    @purplemosasaurus5987 2 роки тому +31

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

  • @hanspeter-bh8qs
    @hanspeter-bh8qs 2 роки тому +5

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

  • @Joel-pl6lh
    @Joel-pl6lh Рік тому

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

  • @orztirr1417
    @orztirr1417 2 роки тому +7

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

  • @Skeffles
    @Skeffles 2 роки тому +3

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

  • @jaydev6724
    @jaydev6724 2 роки тому +2

    Epic song at the end.

  • @sudhirattri8436
    @sudhirattri8436 2 роки тому +1

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

  • @angelite2555
    @angelite2555 2 роки тому +4

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

  • @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

  • @purplemosasaurus5987
    @purplemosasaurus5987 2 роки тому +5

    You make really unique videos, I love it.

  • @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 роки тому +4

      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

  • @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...

  • @flyingsquirrel3271
    @flyingsquirrel3271 2 роки тому +6

    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 роки тому +4

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

    • @flyingsquirrel3271
      @flyingsquirrel3271 2 роки тому +4

      @@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 :)

  • @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...

  • @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

  • @PenguinjitsuX
    @PenguinjitsuX 2 роки тому +1

    I always love the raps in your videos!

  • @AngelOnFira
    @AngelOnFira 2 роки тому +2

    not the VIEWER RETENTION!!

  • @willlogs
    @willlogs 2 роки тому +2

    The rap. OMG the rap.

  • @Mailmanjoe_
    @Mailmanjoe_ 9 місяців тому +1

    i heard factorio and subricbed as fast as possible

  • @eboatwright_
    @eboatwright_ 2 роки тому

    WOO 16k subs for TanTan!

  • @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

  • @DaxSudo
    @DaxSudo 6 місяців тому

    I like this crazy man and his crazy Linux.

  • @lubba64
    @lubba64 2 роки тому +1

    YES ANOTHER TANTAN VIDEO

  • @Dorbellprod
    @Dorbellprod 2 роки тому

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

  • @mikah8998
    @mikah8998 2 роки тому +3

    Best outro

  • @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

  • @mauriciomatias6261
    @mauriciomatias6261 2 роки тому

    You forgot the bevy song hahaha 😂, nice ending

  • @DylanMatthewTurner
    @DylanMatthewTurner 2 роки тому

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

  • @mek101whatif7
    @mek101whatif7 2 роки тому +5

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

  • @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

  • @bubblekill2311
    @bubblekill2311 2 роки тому

    crazy dude strikes again

  • @Joerje
    @Joerje 2 роки тому +1

    TALK ABOUT THE CODE TALK ABOUT THE CODE

  • @ZooHair
    @ZooHair 2 роки тому

    So much beauty

  • @fraser21
    @fraser21 2 роки тому +3

    Please talk about the code!

  • @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 ^^

  • @Zicrus
    @Zicrus Рік тому +1

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

  • @jungesgeld.mp4
    @jungesgeld.mp4 2 роки тому

    Dude i love your videos

  • @boblydecker5951
    @boblydecker5951 9 місяців тому

    Your reward was punishment!!
    😆

  • @basicallybrand
    @basicallybrand 2 роки тому

    I love your channel

  • @ariseyhun2085
    @ariseyhun2085 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!

  • @Naftoreiclag
    @Naftoreiclag 2 роки тому

    ok now this is epic

  • @firesoul453
    @firesoul453 2 роки тому

    I'd love a long video about the code.

  • @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 😭

  • @m4rt_
    @m4rt_ 2 роки тому +1

    TALK ABOUT THE CODE

  • @driftliketokyo34ftw35
    @driftliketokyo34ftw35 Рік тому

    I literally just watched that video

  • @MrBinaryG
    @MrBinaryG 2 роки тому

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

  • @Povai
    @Povai 2 роки тому

    Impressive.

  • @ariseyhun2085
    @ariseyhun2085 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...

  • @kirillschmidt9398
    @kirillschmidt9398 2 роки тому

    I love your videos!

  • @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

  • @dorktales254
    @dorktales254 2 роки тому

    What profiler are you using?

  • @nohtml2643
    @nohtml2643 2 роки тому +1

    TALK ABOUT THE CODE!

  • @Terandium
    @Terandium 2 роки тому

    Amazing rap♥

  • @vroomik
    @vroomik 2 місяці тому

    what about 4D CA then?

  • @betterlifeexe4378
    @betterlifeexe4378 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

  • @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)

  • @Michael-rc5ks
    @Michael-rc5ks 2 роки тому +2

    Cellular?

  • @guesanjo3520
    @guesanjo3520 2 роки тому

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

  • @LGXerxes
    @LGXerxes 2 роки тому

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

  • @dnoldGames
    @dnoldGames 10 місяців тому

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

  • @CasGRos
    @CasGRos 2 роки тому

    Cool

  • @notenlish
    @notenlish 2 роки тому

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

  • @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

  • @lordofwizard835
    @lordofwizard835 2 роки тому +3

    My man uses arch.. oh wait.

  • @thekwoka4707
    @thekwoka4707 Рік тому

    Please talk more about the code

  • @purplemosasaurus5987
    @purplemosasaurus5987 2 роки тому

    3D Celluwar AutomaTA! XD

  • @lllllllllilllllllll
    @lllllllllilllllllll 2 роки тому

    Please talk about the code

  • @betterlifeexe4378
    @betterlifeexe4378 2 роки тому

    more code overview in the video please :)

  • @alexanderhuliakov6012
    @alexanderhuliakov6012 2 роки тому

    Please, talk about the code!

  • @atalocke
    @atalocke 2 роки тому

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

  • @itsME-dc4vm
    @itsME-dc4vm 2 роки тому

    nice ;D

  • @MartyRob
    @MartyRob 2 роки тому +1

    loool, epic rap !

  • @isabellolsson8919
    @isabellolsson8919 2 роки тому

    More raps pleeeeeaseeeee

  • @lllllllllilllllllll
    @lllllllllilllllllll 2 роки тому

    use egui to change the rules live

  • @smipealex3173
    @smipealex3173 2 роки тому

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

  • @stephendouglas684
    @stephendouglas684 2 роки тому

    More rap please!

  • @miloszivkovic6256
    @miloszivkovic6256 2 роки тому

    Factorio runs on Linux

  • @king-gn6gk
    @king-gn6gk 2 роки тому

    talk about the code is also intresting

  • @zoeythebee1779
    @zoeythebee1779 2 роки тому

    Noo! Talk about the code!

  • @space_nerd9456
    @space_nerd9456 Рік тому

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

  • @swordfishxd-
    @swordfishxd- 2 роки тому

    WHERE IS THE INTERACTIVE PART OF THE SOFTWARE

  • @nyx1284
    @nyx1284 2 роки тому

    compute shaders

  • @zombieregime
    @zombieregime 23 дні тому

    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 10 місяців тому

    You look Greek