![MARF](/img/default-banner.jpg)
- 13
- 655 582
MARF
เข้าร่วมเมื่อ 7 ก.ค. 2014
Pixel Sortium v0.1 - Feature Walkthrough - Free Pixel Sorting Desktop Application
Installation Walkthrough: th-cam.com/video/TsN2qloGZ8A/w-d-xo.html
Github Repository: github.com/DavidMcLaughlin208/PixelSorting
Pixel Sortium Documentation: davidmclaughlin208.github.io/PixelSorting/index.html
Pixel Sorting Explanation: satyarth.me/articles/pixel-sorting/
VLC (for reducing video file size): www.videolan.org/
This application is a work in progress, there are many features that I would like to implement and there will likely be bugs in the application. I chose to release this application in iteration so the userbase could help me determine and prioritize features that are most desired.
Intro: (0:00)
Folder Structure: (0:19)
Image Sorting Workflow: (0:45)
Mask Workflow: (3:15)
Video Sorting Workflow: (5:26)
Outro: (7:56)
Github Repository: github.com/DavidMcLaughlin208/PixelSorting
Pixel Sortium Documentation: davidmclaughlin208.github.io/PixelSorting/index.html
Pixel Sorting Explanation: satyarth.me/articles/pixel-sorting/
VLC (for reducing video file size): www.videolan.org/
This application is a work in progress, there are many features that I would like to implement and there will likely be bugs in the application. I chose to release this application in iteration so the userbase could help me determine and prioritize features that are most desired.
Intro: (0:00)
Folder Structure: (0:19)
Image Sorting Workflow: (0:45)
Mask Workflow: (3:15)
Video Sorting Workflow: (5:26)
Outro: (7:56)
มุมมอง: 4 585
วีดีโอ
Slime Mold Physarum Simulation - C++ & Compute Shaders
มุมมอง 3.1K3 ปีที่แล้ว
Resources: Concepts: www.sagejenson.com/physarum Download and play with this simulation: github.com/DavidMcLaughlin208/SlimeMoldPhysarum/releases My Code: github.com/DavidMcLaughlin208/SlimeMoldPhysarum Built with OpenFrameworks (C ) and GLSL (Compute Shaders): openframeworks.cc/ I am using an RX480 graphics card and was able to run these simulations at 70 - 120 FPS while recording as well. Wit...
How To Code a Falling Sand Simulation (like Noita) with Cellular Automata
มุมมอง 117K3 ปีที่แล้ว
Download and play with this simulation here: tinyurl.com/43dzu9r5 Java Repository: tinyurl.com/88ndcdez Links: All the old Java Applets: androdome.com/Sand/ Exploring the Tech of Noita: th-cam.com/video/prXuyMCgbTc/w-d-xo.html Conways Game of Life: playgameoflife.com/ Noita: noitagame.com/ Matrix Wrapper class: tinyurl.com/894ztzt8 Movable Solid class: tinyurl.com/4hcwdku7 TraverseMatrix Algori...
Cascading Pixels - 2D Particle Simulation Playground
มุมมอง 5793 ปีที่แล้ว
Play with it here (works best on Chrome, have seen some issues on Firefox): cascadingpixels.herokuapp.com/ These are clips from an old 2D particle simulation project I made when I was learning to code. It is hosted on Heroku and made with just JavaScript, jQuery, and HTML5 Canvas. There are many configurable parameters which allow for the variety of emergent interactions shown in these clips. T...
Falling Sand Simulation Development Log 4 - Boids and More
มุมมอง 1.8K3 ปีที่แล้ว
Working on making a falling sand simulation with the intent of making a local multiplayer game drawing inspiration of environment from Noita and gameplay style of Duck Game. Boids Logic: github.com/DavidMcLaughlin208/FallingSandJava/blob/master/core/src/com/gdx/cellular/boids/Boid.java#L180-L229 Repository: github.com/DavidMcLaughlin208/FallingSandJava I have referenced this tech talk by Noita ...
Falling Sand Simulation Development Log 3 - Explosions
มุมมอง 1.2K3 ปีที่แล้ว
Working on making a falling sand simulation with the intent of making a local multiplayer game drawing inspiration of environment from Noita and gameplay style of Duck Game. Repository: github.com/DavidMcLaughlin208/FallingSandJava Brittle Rille Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 3.0 License creativecommons.org/licenses/by/3.0/
Falling Sand Simulation Development Log 2 - The Return
มุมมอง 1.6K4 ปีที่แล้ว
Working on making a falling sand simulation with the intent of making a local multiplayer game drawing inspiration of environment from Noita and gameplay style of Duck Game. Repository: github.com/DavidMcLaughlin208/FallingSandJava I have referenced this tech talk by Noita devs to reproduce some of the methods they used for integrating Box2D library with the falling sand sim: th-cam.com/video/p...
Falling Sand Simulation Development Log 1
มุมมอง 3.1K4 ปีที่แล้ว
Working on making a falling sand simulation with the intent of making a local multiplayer game drawing inspiration of environment from Noita and gameplay style of Duck Game Repository: github.com/DavidMcLaughlin208/FallingSandJava I have referenced this tech talk by Noita devs to reproduce some of the methods they used for optimization: th-cam.com/video/prXuyMCgbTc/w-d-xo.html
Besiege Alpha - Bomb Transferring System
มุมมอง 42K9 ปีที่แล้ว
Music: A Moment. A Memory. A Beginning. by Greyflood th-cam.com/video/T2BZ6SXRg8M/w-d-xo.html Here is another overly complicated bomb system. Check out my channel for others. And subscribe for future ones. Besiege Alpha .04
Besiege Alpha - Bomb Maneuvering System
มุมมอง 95K9 ปีที่แล้ว
Music: Where Peace and Rest are Found by Greyflood. th-cam.com/video/aFGiLM_DJ1E/w-d-xo.html I tried my hand at the concept of minimalistic completion of this game. Unfortunately, I still have a lot of work to do. I could only whittle it down to 706 pieces :/
Besiege Alpha - Bomb Delivery System
มุมมอง 291K9 ปีที่แล้ว
It took awhile but I think I was able to make this thing as simplified and condensed as possible. Honestly, any catapult, ballista, or trebuchet could easily incorporate this bad boy into its design. Here is the download link, so feel free to utilize it. app.box.com/s/ajxlva4nniowzwhnrn4fxvbhc2swb27u v.04
Besiege Alpha - Unnecessarily Complex Catapult
มุมมอง 94K9 ปีที่แล้ว
Experimenting with the overlooked art of over-engineering. Check my channel for more Besiege videos and Subscribe for future ones! .bsg if ya care. app.box.com/s/qyzf00z2psr6l44p9mg0nagkszbz1apd
Amazing video!! What type of grid iteration did u used? Like, how did u handled updating liquids twice?
Bottom up. See the section on optimizations for more enhancements. Liquids are only processed once, during their processing you can check multiple potential cells and choose the farthest/most appropriate one.
This is THE BEST video on falling sand sims that exists. Thank you for making it.
wow. this will be such a big help for my assignment. Thank you so much!
really impressive
I tried your Pixel Sorting software, and it's pretty simple to use. Thank you for making this software easier to use for media artists, you earned another subscriber.
Now I’m wondering if there’s a way to do this entirely with shaders on the gpu and if that would be much faster
It is possible to run a falling sand sim on the GPU but it would be much more challenging to achieve the same level of functionality as I have in this simulation.
that's CPU based no? I'm planning on doing a uni project on falling sandbox kinda like that, but utilizing webgl and storig cell states in 2D textures. Then updating the world using a checkboard pattern of some sort and swapping values inside the matrices. I'm pretty sure it's gonna be heavier on memory but something tells me I might be able to have a fast as fck sim in the end.
Yes mine is CPU based. I think to implement all the functionality I have in this simulation on a GPU would be more difficult. But a GPU would be much faster and able to handle more particles overall. There is a game called "Jelly In The Sky" which is entirely run on the GPU which might be interesting to look into.
@@marf1610 yeah I don't think I'll go as deep as you, I'll try to get a few things working and submit it lol. I'll check that game, thanks a bunch
you should check out cellpond
what are the specs of your computer? (in regards to the performance of the simulation)
ive watched this video for several years. its really fun to watch and very informational. Not only do i like wathcing it, but i also have used this knowledge for my own falling sand sims. tysm for the video! its really good!
this app just doesn't open no matter what i do
Are you trying to use the mac version? I was never able to get it to work for mac. I just redownloaded the windows version (on a windows machine) and it works as expected.
@@marf1610 no, I tried to run the windows version, it appears in the task manager for half a second and immediately disappears every time I tried to run
Very good project, however I did not manage to build/run the code from your repo (created an Issue with my findings on Github). Can you actualise or at least give a guide how to make it work? Thank you!
Those are fair optimizations but you'll get multiple magnitudes more performance out of shaders. Or even cuda, if you have them.
This has to be my favourite video about falling sand simulations, the amount of topics covered here is great. It's so nice seeing a bunch of devs in the comments giving suggestions and being genuinely interested in the topic and I've been checking out their own projects too. I've also been working on an engine (hopefully with multiplayer support eventually) and have since starting uploading some basic vids showcasing some features. I plan to open source it in the future if it gets to a point where I can start developing games with it (but right now the code isn't too pretty to say the least). I'd personally love to see more games utilising falling sand be developed in the future so I'm grateful for awesome resources like this video to exist.
Agreed. Really cool seeing everyone else's approaches on this subject. Your simulation looks incredible so far. You already have the rigidbodies working really cleanly. Do you know yet how you plan to network the sand simulation? I imagine that would be very challenging.
Thanks, I'm glad you like it. The current plan for networking is to ensure the simulation is deterministic in such a way that it can also be multi threaded. Both the server and clients run the same simulation. Each chunk is responsible for it's own RNG with the seed being set based on the chunk coordinates in the world. Each chunk also keeps a hash that loosely represents the state of itself as modifications occur within the chunk. Every n ticks, the server and clients will add together each chunk state hash and compare. If there is a discrepancy, the simulation is paused and they will identify what chunks are different based on the chunk hash, the server will then send the chunk data to the client to be overwritten, resuming the simulation when completed. As for synchronising rigidbodies, the current idea I have is to find all rigidbodies that overlap chunks that need to be overwritten (by querying the Box2D world) and also overwrite them. The network data is compressed using LZ4 and send over a reliable UDP connection. No visual information about a pixel is sent (like colour) which helps with compression (with the exception of rigidbodies). Things things like darkened explosion marks won't be sent but the client knows what colour a pixel should be by default anyway. Now you might run into a problem that a client simulation falls behind when there's a lot to process due to variability in processing power. And how do you queue up actions so that they occur on the same simulation tick across all clients? In these cases, I'm looking into how games like Factorio synchronises things (mainly a technique called deterministic lockstep) as there's some overlap between that solution and these problems. Part of the first problem requires the ability to step the simulation forward n amount of ticks so that all clients can catch up to each other, which is not really an issue when the simulation is deterministic. If there are too many chunk discrepancies per second or a client is running on a literal potato and can never catch up, the connection can be terminated in that case. There's still a lot to solve and I'm not sure what the optimal approaches are, however that's the plan so far and I've at least laid some of the foundation for this approach to work. If you're still interested in pursuing falling sand simulations, I'd be more than happy to give you access to the repo and I'm always free to chat about it/explain my approach towards any and all features. Discord: @exzilorate Thanks for reading this long mess of an explanation lol
@@exzilorate Thanks for the detailed write up. Conceptually, that all make sense. And if you begin working on the simulation with the deterministic 'physics' behavior in mind that can help a lot. I'll reach out on discord!
Wow! I love organis systems in code, would you ever do a tutorial series, at least outlining the concepts?
Check out Sebastian Lague's video titled 'Coding Adventure: Ant and Slime Simulations' He goes into great detail on how make this.
Aside from the audio being incredibly low, what a wonderful video!
I heard at the end of the video you make your threads every time through the loop? Why not keep the threads around and just reassign work every loop? Thread creation has overhead in the cpu time
I did this project as a way to get more experience with Java since I was using it at work (web dev). This is why many of my approaches are not as well suited for game dev. Also, this was the first time I ever worked with multi-threading. So it was simply an oversight and lack of knowledge on my part. Good catch.
@@marf1610 no worries! i was just curious if there was a reason behind it is all. the project is really awesome, just when i heard it that was one thing that i was like "hold on every frame? that wouldnt be very fast" and i had come across a similar issue in the past working on a project. so was just throwing it out there. thank you for sharing your journey on it
This is great! Playing noita makes me want to make a game like no other game does. I'd encourage you to explore using Composition rather than Inheritance. Not all that crucial, but a useful paradigm
and thank you too for making this video.
I know it's been two years, but have you perhaps revisited this problem by coding the logic in shaders? I tried this myself recently and it's promising in that the framerate becomes a non-issue due to the massive paralelism (a modern GPU has hundreds, if not thousands, of cores), but at the same time I've run into problems where the multiple "threads" step on each other's processing areas, resulting in problems like particles disappearing or appearing out of nowhere.
It is possible to code a falling sand sim via shaders but overall you have much less control over state and processing (like what you were mentioning). Most of the things described in this video could not be done on the GPU. Look into "Jelly In The Sky" for a game made on the GPU.
Nice work! I stumbled on this yesterday and it is amazingly very similar in design and execution as my own that I sadly stopped working on nearly 2 years ago. I like your solution for the threading "walls". I made a playlist of my progression with some details in it to show everyone at planet chili (chilitomatonoodle's forum & wiki).
Oh yeah I see a lot of similarities between our simulations haha. I love what you did with the lighting too.
@@marf1610 Thanks! I think the lighting turned out really well too. I spent way too much time fiddling with it to get the right specularity, diffuse, ambient behaviour. I also like your concrete setting idea, I didn't think of taking it to that level. I got bogged down in fleshing out too many features and as you can see started turning it into a 2D spaceship game lol. Would love to work on it again, but don't reallly have time to focus.
Very good stuff, I dont plan on implementing one of those any time soon but I still enjoyed the video for the thought process. Seems like a really fun challenge.
3D would be sick lol
This was very valuable, thanks
Instead of manually detecting what element each liquid element is on top of, you could use a density value and decide to either stay up or go down depending on the value compared to the one below. You can also use this value to do inertial calculations, and it can also be used for gasses (by providing a negative value instead of positive).
Note: that last part (gasses) would likely require a pressure gradient over the vertical axis to solve with.
Very good video!
That was so satisfying to watch. I love particles!
There are some design patterns I disagreed with watching this, but the 'Particle' logic you explained is really clever; I like it!
Thank you for inspiring me on how to use my Conway's Game of Life experiment!
I was trying to stop procrastinating, but youtube showed me this piece of art. Fair enough. I'll do what I must do later.
you're literally still procrastinating
@@lOmaine777, it has been 3 weeks. How did I know that I'm still procrastinating?
@6:35 there's an integer only version of that algorithm called the Bresenham Line Algorithm. The difference between integer and floating point math is significant when at the scale of really big particle simulations.
you're gonna regret using object hierarchies like that, it's one of the biggest mistakes you can make in gamedev. oop is not your friend.
this is a beautiful video
Thanks man. Working on an Excalidraw clone and I happened to be looking for a good way to connect the line for the free-brush tool.
if you're processing each row one element at a time, wouldn't that lead to a scenario where something like water can move right, and then get processed a second time in one frame?
Yes that is a side effect. Some cells could be processed multiple times and some could be skipped. Randomizing the order of processing within each row seems to mitigate most of the visual effects from that. And 60 fps also makes it difficult to tell that is happening. But as you've described that can happen. I didn't realize it was happening until after I made the video actually.
I believe in the case of Noita, each cell knows what tick it was updated. The simulation has a "tick" counter that increases by 1 each simulation step. When it's time to process a cell, you check if it has been updated this tick, if not, process the cell and set that cell's tick number to match the simulation tick counter.
This was the video that first introduced me to noita. 2 years and hundreds of hours of play later - thanks!
Mabye im missing something... How did you make the speed of the pixels falling/updating frame independent
I gave each element instance a velocity value which was updated each frame by gravity and can be affected by other things such as explosions. Each element also had two sets of coordinates. Integer coordinates which are its placement in the grid. And floating point coordinates which are updated by the velocity. So if a single element is in free fall for a long uninterrupted time, its velocity will increase as the force of gravity accumulates each frame. If Y velocity is greater than 1 it will move one cell, if velocity it greater than 2 it will move 2 cells. Then the floating point coordinates are rounded down and that's the new placement in the matrix for that element
@@marf1610Thanks, nice vid👍
nice! i've done something like this before, but it was in GLSL
Bro did you find the code to life? this is insane...
Good video but I couldn't concentrate while being forced to listen to an autogynephilia voice
How and when exactly do you disable a chunk? I understand that you report to the chunk when you place an element or when an element updates and set it's step value to true. Do you just disable a chunk at the end of the frame?
Basically, yes. At the start of every frame each chunk has shouldStepThisFrame set to the value of shouldStepNextFrame. And then shouldStepNextFrame is set to false for all chunks. Throughout the current frame shouldStepNextFrame is set to true for chunks which have activity in them.
@@marf1610 Thanks for the quick reply. Fortunately I figured it out 15 minutes after posting my comment. Your video has been very helpful! Wish you well.
Is there a way to code this using Python ? Am an architect that starting to make my way through programming and currently aiming to learn Python and program something like this for to be implemented into erosion studies later on
I don't have much experience with Python but looks like you could try using Pygame as a starting point.
how did you do the texture please?
For this project I iterated through the matrix and drew squares (or rectangles if there were multiple sequential cells with the same color) with the debug tool. This was extremely inefficient and inflexible. I have tried on two other platforms to code a better way to generate a texture that is more flexible and quicker to generate. But I think it requires more lower level knowledge of graphics programming than I currently have. Most game engines aren't well suited for this type of project which makes it require a lot of custom solutions once you get past initial implementations.
@@marf1610 thank you so much. I ended up using shaders for this, passing in the grid size and sprite position. I’m currently trying to implement multi threading but struggling. Can you give me any pointers? I’m using godot 4, and can call Thread.new(callable) and have an update_position that I was using to move the sprites in my grid. How might I go about doing this? I’m able to split the grid up into columns. Thanks for your reply!
Whoa! Lovely YT algorithm led me here. Awesome content. You made me want to throw away all stuff Im coding and start doing similar project. Thanks!
7:22 Transcoding into MP4 using H.264 for video and MP3 for audio is a lossy encoding process, not lossless. You're losing quality, hence the reduction in file size.
;)
Thanks. Your explanations are pure gold. There is not too much information about those techniques available elsewhere.
Bad Audio
i know this video is quite old but something i was thinking about is, when the inertial resistance was added, you could also give each particle a mass and the more mass a particle has placed on it the lower its inertial resistance is, like a buildup in pressure. for example, when you removed the floor from next to the sand, this would make it so a small pile would stay put but a large one would crumble immediately.
Yeah thats a great thought. I know other older sand simulations implemented some sort of pressure system but integrating it with the inertial resistance could provide some interesting results.
One thing to note - Gas isn't just reversed solids. Gas has the fundamental property of liking to spread out a lot.