Wait, if that thing can move forward and back, could it be adapted to move side to side? We could be looking at a (janky as hell) superweapon here, if it moves fast enough. Or we could mount it sideways and use it as a somewhat mobile battery that slides along "rails" on the outer walls.
It can't be converted, but I can try to convert one I saw that was a had South and Eastern movement, possibly. At that point, speed wouldn't matter, as with a single one you could destroy a whole city. However, it isn't as economical, as if just one person managed to get on it with a piece of TNT, it's wrecked. That's true of all machines, though that one would be worse as the resource in is quite a bit. In addition, if certain things are done the whole thing jams horrifically (which I was unable to replicate in the
tutorial I put up, but do happen). A far more economical option would be to create mass amounts of the three seaters (ones I showed off earlier and showed how to build in the tutorial <technically you can fit 4 on there, but one would be reserved for balancing a minecart with a chest on to carry TNT>) for larger cities, and one seaters (new design, never showed off) for small villages. Could use a capital (on drawing board) for the largest, though the 3 is easily able to be turned into a fortress by adding more bomb bays (which adds 2 seats apiece) and making temporary buildoffs when arriving at a location (via furnace next to the stickys <furnaces aren't dragged by them>, then whatever you wish to use to build the sections off of the mid range with).
Patroling cannons are on the drawing board, as I need to figure out how to work around the 12 block limit for pistons using sticky blocks (seen a few alternative methods that could prove useful, though they apparently need a lot (and just for one direction at that) and I want to work as economically as possible).
Edit: I do know that I have a design for cannons that hide in waterfalls and extend outwards, though the engines have to serve as rails, and the waterfall toggled off when they come out, as the flowing water can disrupt the movement of the device when it is retracting or extending.