How decoupled should my program be?
If I take the message passing paradigm to the extreme, I should have every module intercommunication done via messages. However, should it get as far as even the hardware specific modules, or just the game ones? Is there any advantage for having, for example, the video system for displaying sprites on the screen handled purely by messages? And if so, how would this work in practice, given the asynchronicity of message passing?
Message Passing Interface
I'm still undecided about exactly what the interface for passing messages should be. The tricky part is deciding what parameters to pass. My instinct is to define a function for message passing that takes a message type id (probably a string) and somewhere between two to four ints or doubles as parameters. But there are probably a few cases where I want to send large amounts of info in a message, such as a string. I don't want to send a pointer in a message as it becomes ambiguous who has control over the memory. I suppose I could split a large data structure like a string up into chars and send them individually with an ordering number to reconstruct them at the end, but that seems a bit messy.
I suppose if I was a bit more experiences with networks, operating systems or windowing systems I'd be better able to decide the internals of the system, but at the moment I'm operating mostly blind. From what I've read every messaging system is different depending on the people who wrote it, so I guess I'll make some decision on what form the message passing will take by the weekend and get my first version of this up and running. Admittedly, I'm mostly posting this just to help work through the problem myself in my mind as I further search for nuggets of wisdom on the internet.
But if there's any suggestions for those two specific questions I've got, or another further advice or pointers to tutorials on message passing systems, I'd be grateful.
Additional: I notice if you search gamedev.net for "message passing", most of the first page links are to my own journal. Not really that much help [grin]
Additional 2: Thinking about it a bit more, maybe what I really need to do is throw a few more hours into figuring out the architecture skeleton and how modules communicate with each other.