MARF
MARF
  • 13
  • 660 838
Pixel Sortium v0.1 - Feature Walkthrough - Free Pixel Sorting Desktop Application
Installation Walkthrough: ua-cam.com/video/TsN2qloGZ8A/v-deo.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)
Переглядів: 4 680

Відео

Slime Mold Physarum Simulation - C++ & Compute Shaders
Переглядів 3,1 тис.3 роки тому
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
Переглядів 122 тис.3 роки тому
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: ua-cam.com/video/prXuyMCgbTc/v-deo.html Conways Game of Life: playgameoflife.com/ Noita: noitagame.com/ Matrix Wrapper class: tinyurl.com/894ztzt8 Movable Solid class: tinyurl.com/4hcwdku7 TraverseMatrix Algorit...
Cascading Pixels - 2D Particle Simulation Playground
Переглядів 6033 роки тому
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,8 тис.4 роки тому
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,2 тис.4 роки тому
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,6 тис.4 роки тому
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: ua-cam.com/video/p...
Falling Sand Simulation Development Log 1
Переглядів 3,1 тис.4 роки тому
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: ua-cam.com/video/prXuyMCgbTc/v-deo.html
KEVA Tower Destruction - Infinite Loop
Переглядів 4928 років тому
Made with Blender 3D
Besiege Alpha - Bomb Transferring System
Переглядів 42 тис.9 років тому
Music: A Moment. A Memory. A Beginning. by Greyflood ua-cam.com/video/T2BZ6SXRg8M/v-deo.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
Переглядів 95 тис.9 років тому
Music: Where Peace and Rest are Found by Greyflood. ua-cam.com/video/aFGiLM_DJ1E/v-deo.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
Переглядів 291 тис.9 років тому
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
Переглядів 94 тис.9 років тому
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

КОМЕНТАРІ

  • @alexlindgren858
    @alexlindgren858 Місяць тому

    but how does this fair with performance? I made a simple falling sand simulation which used "low-level" java to speed up performance, so instead of having a separate array for cells and then using Graphics or Graphics2D to draw each cell, I directly used the DataBuffer from a BufferedImage to get extremely good performance, I also used a flat array instead of a 2D array because that minimizes the overhead of indexing and is also how pixel data is stored: int[] grid = ((DataBufferInt) image.getRaster().getDataBuffer()).getData(); By directly manipulating the grid array, it also changes the image directly. I managed to get down to 30ms for a 1000x900 grid, which is still bad, but is acceptable for some applications. the performance also changed based on how many sand particles there where, so a empty grid was about 5ms and a full grid was about 30ms. I also experimented with System.arraycopy to shift the particles down, but ultimately failed due to oversights and loss in performance. Another thing I tried was to use BufferedImage.TYPE_BYTE_BINARY instead of the standard TYPE_INT_ARGB to leverage bitwise operations to faster test against left/right movement, I still haven't finished that though

  • @bangprob
    @bangprob Місяць тому

    Great video sir!

  • @joaoestudante1897
    @joaoestudante1897 3 місяці тому

    Amazing video!! What type of grid iteration did u used? Like, how did u handled updating liquids twice?

    • @marf1610
      @marf1610 3 місяці тому

      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.

  • @DrEnzyme
    @DrEnzyme 3 місяці тому

    This is THE BEST video on falling sand sims that exists. Thank you for making it.

  • @lln6123
    @lln6123 3 місяці тому

    wow. this will be such a big help for my assignment. Thank you so much!

  • @Zkryhn
    @Zkryhn 3 місяці тому

    really impressive

  • @PurpleWolfEnjoyer
    @PurpleWolfEnjoyer 4 місяці тому

    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.

  • @davie5104
    @davie5104 4 місяці тому

    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

    • @marf1610
      @marf1610 4 місяці тому

      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.

  • @nebulae_wanderer
    @nebulae_wanderer 4 місяці тому

    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.

    • @marf1610
      @marf1610 4 місяці тому

      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.

    • @nebulae_wanderer
      @nebulae_wanderer 4 місяці тому

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

  • @boblol1465
    @boblol1465 4 місяці тому

    you should check out cellpond

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

    what are the specs of your computer? (in regards to the performance of the simulation)

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

    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!

  • @isefol
    @isefol 7 місяців тому

    this app just doesn't open no matter what i do

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

      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.

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

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

  • @TheGroszber
    @TheGroszber 7 місяців тому

    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!

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

    Those are fair optimizations but you'll get multiple magnitudes more performance out of shaders. Or even cuda, if you have them.

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

    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.

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

      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.

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

      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

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

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

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

    Wow! I love organis systems in code, would you ever do a tutorial series, at least outlining the concepts?

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

      Check out Sebastian Lague's video titled 'Coding Adventure: Ant and Slime Simulations' He goes into great detail on how make this.

  • @FMPE-WORK
    @FMPE-WORK 9 місяців тому

    Aside from the audio being incredibly low, what a wonderful video!

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

    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

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

      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.

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

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

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

    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

  • @beachspawnz-lll8508
    @beachspawnz-lll8508 10 місяців тому

    and thank you too for making this video.

  • @Ankh.of.Gaming
    @Ankh.of.Gaming 10 місяців тому

    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.

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

      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.

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

    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).

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

      Oh yeah I see a lot of similarities between our simulations haha. I love what you did with the lighting too.

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

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

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

    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.

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

    3D would be sick lol

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

    This was very valuable, thanks

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

    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).

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

      Note: that last part (gasses) would likely require a pressure gradient over the vertical axis to solve with.

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

    Very good video!

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

    That was so satisfying to watch. I love particles!

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

    There are some design patterns I disagreed with watching this, but the 'Particle' logic you explained is really clever; I like it!

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

    Thank you for inspiring me on how to use my Conway's Game of Life experiment!

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

    I was trying to stop procrastinating, but youtube showed me this piece of art. Fair enough. I'll do what I must do later.

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

      you're literally still procrastinating

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

      @@lOmaine777, it has been 3 weeks. How did I know that I'm still procrastinating?

    • @ttz8488
      @ttz8488 Місяць тому

      @@treefreezoner 7 months, did you still?

    • @treefreezoner
      @treefreezoner Місяць тому

      ​@@ttz8488 Nah. I had to commit to my responsibilities and do what I had to do some time ago.

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

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

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

    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.

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

    this is a beautiful video

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

    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.

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

    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?

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

      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.

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

      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.

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

    This was the video that first introduced me to noita. 2 years and hundreds of hours of play later - thanks!

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

    Mabye im missing something... How did you make the speed of the pixels falling/updating frame independent

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

      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

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

      ​@@marf1610Thanks, nice vid👍

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

    nice! i've done something like this before, but it was in GLSL

  • @fnbs-l9o
    @fnbs-l9o 10 місяців тому

    Bro did you find the code to life? this is insane...

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

    Good video but I couldn't concentrate while being forced to listen to an autogynephilia voice

  • @qShaun
    @qShaun 11 місяців тому

    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?

    • @marf1610
      @marf1610 11 місяців тому

      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.

    • @qShaun
      @qShaun 11 місяців тому

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

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

    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

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

      I don't have much experience with Python but looks like you could try using Pygame as a starting point.

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

    how did you do the texture please?

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

      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.

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

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

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

    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!

  • @alfred.clement
    @alfred.clement Рік тому

    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.

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

    ;)

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

    Thanks. Your explanations are pure gold. There is not too much information about those techniques available elsewhere.

  • @kshirsagarabhayshrikrishna8665

    Bad Audio