Compact meshes together?

So I was working on a pixelated, cell-type model in blender, in which I started with a small cube and extruded it multiple times to create the basic shape I wanted. The results looked something like this:



I want to compact all of the cubes together, now. I’ve tried merging vertices, but that doesn’t work, because the cubes are elongated and don’t retain their shape. I also tried looking for a method to simply move them against each other and somehow prevent them from clipping through each-other, but I couldn’t find any way to do that, either.
(Some of the faces are missing because I wasn’t aware of how to remove interior faces, and spent some time trying to remove each and every one that wouldn’t be visible)

Can anybody help with this? Or do I need to start over and find a different approach? I would really prefer not to.

Thanks~!

This is all good and well, but I already knew how to do that, you’re basically saying I’m going to need to start over and work at it a different way? Also, how are you getting those cubes to be congruent when you’re extruding? Do you have snapping on, or are you using a key shortcut? I’m not quite sure I understand that part, and if the cubes aren’t symmetrical, it won’t work.
Thank you, though!

If that is what you’re trying to accomplish, yes, takes 40 seconds to make a new one which is less than writing this post. Also less than using selections and snapping to move each row and column together.

If that’s not what you’re trying to accomplish, then don’t know what you’re trying to do with the geometry you’re showing. They’re not whole cubes, nor would they make a manifold mesh when bringing them together and removing doubles, since that would create more interior faces. Or maybe they’re not supposed to connect when moved together.

All I know about the problem is in your post, which isn’t much. You’re asking how to do a step to solve a problem, after you’ve already decided you know what the problem is and how it should be solved. No description of what you’re trying to make, no references, no links, cropped screenshot which hides all the feedback from the interface, and no .blend file which would help to examine what you’re showing and help/save time replying.

The result of that is either an interpretation based on a lot of assumptions, lots of questions about the things you already know, or the most popular: no answer.