I'm still pondering over the architecture reworking for my engine. Looking through what I've currently done, I think the only especially tricky part will be with the graphics. I think a good message passing system will deal well with everything that doesn't require a lot of data passing around between modules, such as the controls, user interface, sound and so on. For the game critical code such as AI the implementation is extremely game specific, so I just have to make sure I've got the right ability in my data structures and communication between modules to allow them to do their thing. The only challenging part is how to efficiently throw up those 2D sprites to the screen.
At the moment, my implementation is pretty simple. I just use OpenGL intermediate mode, switch the appropriate texture for the sprite, and whack a textured sprite at the right spot on the screen. Make sure you draw all the sprites in the right order (back to front: basic Painter's Algorithm) and you've got graphics! Only problem is, it's a pretty naive implmenetation; it involves intermediate mode and switching sprite textures all the time.
There are work arounds for some of these, such as using sprite sheets where multiple sprites are defined on the same texture, but I still need to switch between sheets. I need to think of a decent enough approach so I can structure the architecture around it. The immediate mode method can be done pretty simply, but if I'm setting up sprites for batch processing in something a bit more complex then I'll need to design the data structures to cope with that.
I'm starting to think that it might be a good idea just to base my engine as a wrapper around an existing, tested 2D engine out there, as it's the prudent software engineering decision to make. But then again, every time I've peered into the source code of one of these 2D engines (at least the ones that have it available) then it looks pretty similar to the one I've already built. Plus I actually enjoy nutting these problems out, so I'm not sure I want to miss the fun of making my own 2D engine. It's not like it's rocket science.
At the end of the weekend though I really want to make a decision on how I'm going to structure this so I can get started fleshing out the code base. I'm going to start by thinking up an application problem - may be Ice Slider, although I'll probably pick something that doesn't have any animation required - and using that as a test case. Then write up the documentation to bulk out the interfaces for all the classes and use that as the limit of what I need to code up. Then code that sucker: hopefully most of the annoying set up code will be a cut-and-paste job from my existing code base.
All in all, I think it'll be a pretty smooth implementation this time round - if I could just wrap my head around how I'm going to translate my game data into sprites on the screen.