*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/
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
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 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?
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...
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 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 :)
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...
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
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
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
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 ^^
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 😭
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
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
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)
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....
*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/
WHERE IS THE INTERACTIVE PART OF THE SOFTWARE
🤣 just go with it haha
*cellular
*misspelled
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
I've never heard of it! I shall try it out thanks for the tip!
I WANT YOU TO TALK ABOUT THE COOOODE~
These videos are a great balance of informative and funny, great job!
Three comments!
Tantan is literally the only youtuber for whom I pause and like the video, when he reminds me to do so :)
People are watching a programming channel but don't care about the code? I actually want more!
This would be amazing for some magic effects in a voxel game. Nicely done!
It's so mesmerising to see these live and very well explained. I really like the cute blocks!
Epic song at the end.
I wish I could be this happy and enthusiastic in life, that's really all one needs.
You always have such wonderful project ideas TanTan. Keep it up! We're here for the long haul.
Love it, I've been into celluar automata for a long time now and I'm glad you made a video on it
You make really unique videos, I love it.
One comment
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
The conversion from hashmap to array would make the code much faster even if it was on the CPU only
yup, did that. ~10x faster single threaded. and scales perfectly across multiple cores.
@@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?
@@terezip2213 It would maybe reduce cache misses, but it would also make it a lot harder for the compiler to vectorize the code
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...
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.
"worse performance out of multithreading for smaller input sizes". Man I didn't think of that but that makes sense
@@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 :)
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...
i think instead of a Arc you could use one of the several concurrent hashmaps available that are made for performance
I always love the raps in your videos!
not the VIEWER RETENTION!!
The rap. OMG the rap.
i heard factorio and subricbed as fast as possible
WOO 16k subs for TanTan!
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
I like this crazy man and his crazy Linux.
YES ANOTHER TANTAN VIDEO
Been waiting for another rap, my good sir, excellent video
Best outro
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
You forgot the bevy song hahaha 😂, nice ending
Now combine your keyboard snake project with your automata project and put conway's game of life on your keyboard
Noooooo, don't cut the CODE😭😭😭😭😭😭
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
crazy dude strikes again
TALK ABOUT THE CODE TALK ABOUT THE CODE
So much beauty
Please talk about the code!
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 ^^
This would be perfect for the GPU. It would probably run a lot faster.
Dude i love your videos
Your reward was punishment!!
😆
I love your channel
Typo in the video Tantan, you wrote "Celluar", but. I think it should be "Cellular"
Unless I'm wrong maye ?
true! I can't believe I missed that!
ok now this is epic
I'd love a long video about the code.
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 😭
TALK ABOUT THE CODE
I literally just watched that video
Yo! o/ What did you use to see how much time the operation took? Greate videos btw \O/,
Impressive.
1:34 I'm curious how you animated this? Is it in a 3D program like Blender?
I drew the face expressions in gimp, default Unity cube, and then animated everything with the Animator. It took me quite some time...
I love your videos!
6:17 What is that program? I don't know many debug tools for Rust...
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
@@Tantandev Oh, that's cool. Thx!
There's hotspot that I've used to profile my code, it's really easy to get to use it
What profiler are you using?
TALK ABOUT THE CODE!
Amazing rap♥
what about 4D CA then?
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).
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
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)
Cellular?
idk why every time i see your videos i feel like u are a programing god ... everything seems harf af
Why not play factorio in linux?
You can have non-blocking autosaves, which is very nice and productive
Please talk more about the code, imma trying to learn something here
Cool
You should make the song at the end of the video as a different video
you can setup your own rules, in the game
gpu acceleration
X-torch gpu tpu multithreading framework
fun fun
My man uses arch.. oh wait.
Please talk more about the code
3D Celluwar AutomaTA! XD
Two comments
@@ariseyhun2085 what do you mean to say?
Please talk about the code
more code overview in the video please :)
Please, talk about the code!
I'd like more code videos. Code if fun!
nice ;D
loool, epic rap !
More raps pleeeeeaseeeee
use egui to change the rules live
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
More rap please!
Factorio runs on Linux
talk about the code is also intresting
Noo! Talk about the code!
duel booting my pc killed my pc..... :D twice
WHERE IS THE INTERACTIVE PART OF THE SOFTWARE
compute shaders
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....
You look Greek