TGG has a grid system tied into its coded combat. It did things like:
~ ~ ~ ~ ~ ~ ~ ~ ~
~ @ + + + + + + +
~ @ = = >=< _ # # #
~ # _ _ _ _ # # #
~ @ # _ _ _ # # #
~ ~ # _ # _ # # #
@ ~ @ # # # # # #
Your coordinates are : 6 12
<<Ground Combat>> You hear the sound of Machine Guns from Beach (7 12)!
<<Ground Combat>> Woods fires his Reising SMG at Yoshi but misses!
<<Ground Combat>> Jenkins fires his Garand at Aoi and hits!
Aoi suffers 8 wound damage to his right leg.
When in combat, you couldn't just move freely through rooms, your movement was tied to combat actions and done in a grid fashion move 12, 1
or something like that. There was no magic, it being WWI/WWII, but there were plenty of advanced mechanics for range, artillery, planes, flares, covering fire, melee, trenches, obstacles, and more.
So yes, it can be done. It's clunky, but it works. A web UI might help some, but the system would need to still be capable of interfacing with players on a traditional MU client. That limits how fancy you can get.
Also, building a real-time interface between web and game for FS3 combat was a ton of work, and D&D combat is orders of magnitude more complex. I have to question the value of the endeavor versus just using something more geared to it like Roll20.