EXCEPT, right now I stopped playing DF because I was trying to design an optimal Squirt Gun defense megaproject, but need to get more clear on my definition of optimal, and also work through a few different minecart quirks before continuing.
Glad to hear you're still working on that, and curious what you will come up with! it's an eternal side project for me, but I haven't had any breakthroughs in a while. Still stuck on a compact loading mechanism that can reliably handle more than one cart every 5 ticks.
I'm taking long breaks between working on it, and expect I'll be a lot more active once the Steam version comes out.
Whew, faster than 5 ticks is ambitious. I'm aiming for 6-7 tick cadence, because when I tune for exactly 5 ticks, I have a hard time getting the sub-tile position reliable enough to keep it error-free. (This is probably a consequence of me using dfhack to move carts around because I'm impatient, so they aren't being reset to the center or edge of a tile like they would be if a dwarf placed them.)
Larix suggested that 5 ticks is the theoretical best cadence for loading, and I haven't managed to beat that. Just like his, my water loader uses the checkpoint effect to teleport a cart into the 7/7 loading water at around ~20,000 - 30-000 velocity, landing near the far edge of the tile. Then it slows down quickly to <= 10,000, loads, and take another tick or two to exit the loading tile. Maybe with super-precise speed and sub-tile positioning, you could get it through faster, but you definitely need a checkpoint involved so the cart doesn't have to slog its way through the entire tile width. Basically I'm using the loader from his post adjusted to be tileable with 1 barrel per
For the cart loading/unloading mechanism, I do have a clear front-runner, but it's not compact. The idea is from where
Someone Else 37 suggested using collisions to bounce carts out of a magazine stack. (Also suggested earlier, probably by Larix, but can't find the post right now.) I tried it and it works great and can be tuned to any tick cadence you want.
I moved the loading/unloading mechanism to be completely separate from the barrel loops when the cannon is firing. I don't really care how long it takes to shut the cannon down for cleaning and maintenance, so that can be slow. So, to shut the cannon down, I lower a drawbridge that allows all the carts to shunt out to a very long powered rail that dumps them into a minecart magazine (with one cart below the tile where they all pile up), which runs very very slowly, but does not jam because of the powered rail. You end up with lots of carts quantum stacked (as projectiles, technically, I think). Then I built a fast 2x3 loop next to the magazine with a 12 tick cycle, drop two carts in, and those carts alternate striking the magazine carts every 6 ticks, until the magazine is empty and those two carts become the last two entering the barrel. It does mean you need exactly the right number of carts in the magazine, or else you'll either have gaps in the firing cadence, or else jam the barrels.
The other thing I did was, since you need a powered rail to clear the cart from the firing tile fast enough, and I wanted 1 barrel per tile, was combine barrel loops, so when a cart dumps sideways, instead of bringing it back to the barrel that it just fired from, it starts the loop on the barrel row it was just dropped into. That means those groups of barrels are now one continuous loop where each cart cycles through each barrel. It also means that group of barrels can share a single loading/unloading mechanism described above. Bow now that magazine needs to feed all the barrels and will need dozens of carts.
The downside is definitely compactness, because while the cart magazine itself is 1 tile, and the loop to knock carts into motion is 2x3, you need that long hallway to collect all the carts and slowly drop them back into the magazine, with the stacking time delay getting longer with each cart. I haven't found a way around that yet, because impulse rails pushing on rows of carts will jam, so I haven't found a way to reuse the impulse rails from the barrel, and the two mechanisms are completely separate right now.
But with those, I have gotten a couple prototype designs firing with the 6 tick cadence 6-8 barrels (with no spaces between them!) firing, which is really a hilarious amount of water flying around a small space. Where I last left off, I was trying to tune the diagonal directions of the barrels to converge nicely on where enemies enter, because having dense barrels is only great if they're all firing in a useful direction instead of some just splashing on the walls 20-30 tiles downrange.