3D Cellular Automata - complex behavior from simple rules

  Рет қаралды 39,570

Tantan

Tantan

Күн бұрын

3D cellular automata programmed with Rust and Bevy. Using simple rules this software procedually creates beautiful structures.
Source code:
github.com/TanTanDev/3d_cellu...
I built this following this article:
softologyblog.wordpress.com/2...
Want to support me?
Patreon: / tantandev
Monero: 43Ktj1Bd4Nkaj4fdx6nPvBZkJewcPjxPB9nafnepM7SdGtcU6rhpxyLiV9w3k92rE1UqHTr4BNqe2ScsK1eEENvZDC3W1ur
♫ Credits:
Music Moon And Star by Wintergatan Build Tracks
Music Prototype by Wintergatan Build Tracks
Music Valentine by Wintergatan
Music The Rocket by Wintergatan
Music Sommarfågel by Wintergatan
Music Non-Euclidian Geometry by Punch deck
Music Brazilian Street Fight by Punch deck
Music Conflicting Ideas by Punch deck
Music: Kakariko Village (Mikel Lofi Remix)
Watch: • Zelda & Chill ~ Kakari...
Wintergatan link: wintergatan.net/
License can be found on website
Punch deck link: / punch-deck
Punch deck license: creativecommons.org/licenses/...

Пікірлер: 113
@Tantandev
@Tantandev 2 жыл бұрын
*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
@ariseyhun2085
@ariseyhun2085 2 жыл бұрын
🤣 just go with it haha
@the_frog_army
@the_frog_army 5 ай бұрын
*cellular *misspelled
@hermannpaschulke1583
@hermannpaschulke1583 2 жыл бұрын
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 жыл бұрын
I've never heard of it! I shall try it out thanks for the tip!
@purplemosasaurus5987
@purplemosasaurus5987 2 жыл бұрын
These videos are a great balance of informative and funny, great job!
@ariseyhun2085
@ariseyhun2085 2 жыл бұрын
Three comments!
@hanspeter-bh8qs
@hanspeter-bh8qs 2 жыл бұрын
Tantan is literally the only youtuber for whom I pause and like the video, when he reminds me to do so :)
@angelite2555
@angelite2555 2 жыл бұрын
You always have such wonderful project ideas TanTan. Keep it up! We're here for the long haul.
@Skeffles
@Skeffles 2 жыл бұрын
It's so mesmerising to see these live and very well explained. I really like the cute blocks!
@Graverman
@Graverman 2 жыл бұрын
Love it, I've been into celluar automata for a long time now and I'm glad you made a video on it
@olive-vrta
@olive-vrta 2 жыл бұрын
I WANT YOU TO TALK ABOUT THE COOOODE~
@orztirr1417
@orztirr1417 2 жыл бұрын
This would be amazing for some magic effects in a voxel game. Nicely done!
@purplemosasaurus5987
@purplemosasaurus5987 2 жыл бұрын
You make really unique videos, I love it.
@ariseyhun2085
@ariseyhun2085 2 жыл бұрын
One comment
@Joel-pl6lh
@Joel-pl6lh Жыл бұрын
People are watching a programming channel but don't care about the code? I actually want more!
@jaydev6724
@jaydev6724 2 жыл бұрын
Epic song at the end.
@PenguinjitsuX
@PenguinjitsuX 2 жыл бұрын
I always love the raps in your videos!
@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...
@lubba64
@lubba64 2 жыл бұрын
YES ANOTHER TANTAN VIDEO
@flyingsquirrel3271
@flyingsquirrel3271 2 жыл бұрын
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 жыл бұрын
"worse performance out of multithreading for smaller input sizes". Man I didn't think of that but that makes sense
@flyingsquirrel3271
@flyingsquirrel3271 2 жыл бұрын
@@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 :)
@deinkaplan
@deinkaplan 2 жыл бұрын
Dude i love your videos
@kirillschmidt9398
@kirillschmidt9398 2 жыл бұрын
I love your videos!
@Dorbellprod
@Dorbellprod 2 жыл бұрын
Been waiting for another rap, my good sir, excellent video
@XxBobTheGlitcherxX
@XxBobTheGlitcherxX 2 жыл бұрын
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 жыл бұрын
The conversion from hashmap to array would make the code much faster even if it was on the CPU only
@leddoo
@leddoo 2 жыл бұрын
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
@ZooHair
@ZooHair 2 жыл бұрын
So much beauty
@sudhirattri8436
@sudhirattri8436 2 жыл бұрын
I wish I could be this happy and enthusiastic in life, that's really all one needs.
@eboatwright_
@eboatwright_ 2 жыл бұрын
WOO 16k subs for TanTan!
@mek101whatif7
@mek101whatif7 2 жыл бұрын
Noooooo, don't cut the CODE😭😭😭😭😭😭
@imaginaoYouTubesoquecomarrobas
@imaginaoYouTubesoquecomarrobas 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...
@basicallybrand
@basicallybrand 2 жыл бұрын
I love your channel
@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
@eboatwright_
@eboatwright_ 2 жыл бұрын
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
@Naftoreiclag
@Naftoreiclag 2 жыл бұрын
ok now this is epic
@Povai
@Povai 2 жыл бұрын
Impressive.
@bubblekill2311
@bubblekill2311 2 жыл бұрын
crazy dude strikes again
@mikah8998
@mikah8998 2 жыл бұрын
Best outro
@wackbyte
@wackbyte 2 жыл бұрын
i think instead of a Arc you could use one of the several concurrent hashmaps available that are made for performance
@DaxSudo
@DaxSudo 2 ай бұрын
I like this crazy man and his crazy Linux.
@itsME-dc4vm
@itsME-dc4vm 2 жыл бұрын
nice ;D
@L4Vo5
@L4Vo5 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
@mauriciomatias6261
@mauriciomatias6261 2 жыл бұрын
You forgot the bevy song hahaha 😂, nice ending
@CasGRos
@CasGRos 2 жыл бұрын
Cool
@Terandium
@Terandium 2 жыл бұрын
Amazing rap♥
@willlogs
@willlogs 2 жыл бұрын
The rap. OMG the rap.
@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)
@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 жыл бұрын
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
@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 ^^
@fraser21
@fraser21 2 жыл бұрын
Please talk 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 😭
@firesoul453
@firesoul453 2 жыл бұрын
I'd love a long video about the code.
@MrBinaryG
@MrBinaryG 2 жыл бұрын
Yo! o/ What did you use to see how much time the operation took? Greate videos btw \O/,
@boblydecker5951
@boblydecker5951 5 ай бұрын
Your reward was punishment!! 😆
@Zicrus
@Zicrus Жыл бұрын
This would be perfect for the GPU. It would probably run a lot faster.
@betterlifeexe4378
@betterlifeexe4378 2 жыл бұрын
more code overview in the video please :)
@AngelOnFira
@AngelOnFira 2 жыл бұрын
not the VIEWER RETENTION!!
@magnoelmagnifico957
@magnoelmagnifico957 2 жыл бұрын
6:17 What is that program? I don't know many debug tools for Rust...
@Tantandev
@Tantandev 2 жыл бұрын
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
@therealdnold
@therealdnold 6 ай бұрын
Please talk more about the code, imma trying to learn something here
@dorktales254
@dorktales254 2 жыл бұрын
What profiler are you using?
@ariseyhun2085
@ariseyhun2085 2 жыл бұрын
Typo in the video Tantan, you wrote "Celluar", but. I think it should be "Cellular" Unless I'm wrong maye ?
@Tantandev
@Tantandev 2 жыл бұрын
true! I can't believe I missed that!
@driftliketokyo34ftw35
@driftliketokyo34ftw35 Жыл бұрын
I literally just watched that video
@atalocke
@atalocke 2 жыл бұрын
I'd like more code videos. Code if fun!
@DylanMatthewTurner
@DylanMatthewTurner 2 жыл бұрын
Now combine your keyboard snake project with your automata project and put conway's game of life on your keyboard
@MartyRob
@MartyRob 2 жыл бұрын
loool, epic rap !
@ofrikirshen3071
@ofrikirshen3071 2 жыл бұрын
TALK ABOUT THE CODE TALK ABOUT THE CODE
@Mailmanjoe_
@Mailmanjoe_ 5 ай бұрын
i heard factorio and subricbed as fast as possible
@thekwoka4707
@thekwoka4707 Жыл бұрын
Please talk more about the code
@LGXerxes
@LGXerxes 2 жыл бұрын
Why not play factorio in linux? You can have non-blocking autosaves, which is very nice and productive
@lllllllllilllllllll
@lllllllllilllllllll 2 жыл бұрын
Please talk about the code
@notenlish
@notenlish 2 жыл бұрын
You should make the song at the end of the video as a different video
@alexanderhuliakov6012
@alexanderhuliakov6012 2 жыл бұрын
Please, talk about the code!
@Michael-rc5ks
@Michael-rc5ks 2 жыл бұрын
Cellular?
@purplemosasaurus5987
@purplemosasaurus5987 2 жыл бұрын
3D Celluwar AutomaTA! XD
@ariseyhun2085
@ariseyhun2085 2 жыл бұрын
Two comments
@purplemosasaurus5987
@purplemosasaurus5987 2 жыл бұрын
@@ariseyhun2085 what do you mean to say?
@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
@guesanjo3520
@guesanjo3520 2 жыл бұрын
idk why every time i see your videos i feel like u are a programing god ... everything seems harf af
@lllllllllilllllllll
@lllllllllilllllllll 2 жыл бұрын
use egui to change the rules live
@biglegs
@biglegs Жыл бұрын
there goes the viewer retention
@king-gn6gk
@king-gn6gk 2 жыл бұрын
talk about the code is also intresting
@isabellolsson8919
@isabellolsson8919 2 жыл бұрын
More raps pleeeeeaseeeee
@lordofwizard835
@lordofwizard835 2 жыл бұрын
My man uses arch.. oh wait.
@ariseyhun2085
@ariseyhun2085 2 жыл бұрын
1:34 I'm curious how you animated this? Is it in a 3D program like Blender?
@Tantandev
@Tantandev 2 жыл бұрын
I drew the face expressions in gimp, default Unity cube, and then animated everything with the Animator. It took me quite some time...
@m4rt_
@m4rt_ 2 жыл бұрын
TALK ABOUT THE CODE
@RockPDX
@RockPDX 9 сағат бұрын
I followed JHC (John Horton Conway) for years in scientific american.. back then (late 70's), this stuff was done on super (puper) puters.. i made my own game of life on my commodore 128 since i couldn't find it anywhere. In my version, it defaulted to game of life, but you could change all of the rules any way you like. Regardless, it was in terms of time, horrible since it was programmed in basic, and even after using a compiler, it would take around 20 seconds for each screen generation... (grrrr) Computers got a bit faster since then..
@miloszivkovic6256
@miloszivkovic6256 2 жыл бұрын
Factorio runs on Linux
@nohtml2643
@nohtml2643 2 жыл бұрын
TALK ABOUT THE CODE!
@stephendouglas684
@stephendouglas684 2 жыл бұрын
More rap please!
@nyx1284
@nyx1284 2 жыл бұрын
compute shaders
@zoeythebee1779
@zoeythebee1779 2 жыл бұрын
Noo! Talk about the code!
@space_nerd9456
@space_nerd9456 11 ай бұрын
duel booting my pc killed my pc..... :D twice
@swordfishxd-
@swordfishxd- 2 жыл бұрын
WHERE IS THE INTERACTIVE PART OF THE SOFTWARE
@smipealex3173
@smipealex3173 2 жыл бұрын
KZfaq will be blocked in Russia, and what will I do? I like this channel, I want to watch it, but the state forbids me
@gmdFrame
@gmdFrame 6 ай бұрын
You look Greek
Voxel Game Development Is Hard
12:24
Tantan
Рет қаралды 94 М.
What are neural cellular automata?
8:35
Emergent Garden
Рет қаралды 165 М.
A teacher captured the cutest moment at the nursery #shorts
00:33
Fabiosa Stories
Рет қаралды 7 МЛН
Cat Corn?! 🙀 #cat #cute #catlover
00:54
Stocat
Рет қаралды 16 МЛН
Женская драка в Кызылорде
00:53
AIRAN
Рет қаралды 402 М.
✨ NEW Cellular Automata
12:28
TodePond
Рет қаралды 116 М.
Complex Behaviour from Simple Rules: 3 Simulations
10:52
Sebastian Lague
Рет қаралды 376 М.
Rust multi-threading code review
12:13
Tantan
Рет қаралды 196 М.
Lenia - Artificial Life from Algorithms
13:15
Birdbrain
Рет қаралды 129 М.
⚡ Spellular Automata
8:42
TodePond
Рет қаралды 73 М.
Growing Neural Cellular Automata
15:48
Yannic Kilcher
Рет қаралды 21 М.
Langton's Loops: The cellular automaton that copies itself
12:01
davbrdavbr
Рет қаралды 465 М.
Game Engine Of The Future
9:12
Tantan
Рет қаралды 139 М.
Simulating Particle Life
18:18
Digital Genius
Рет қаралды 180 М.
АЙФОН 20 С ФУНКЦИЕЙ ВИДЕНИЯ ОГНЯ
0:59
КиноХост
Рет қаралды 1,1 МЛН
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 394 М.
Что делать если в телефон попала вода?
0:17
Лена Тропоцел
Рет қаралды 2,4 МЛН