If you still think you want to implement game-object components, ask yourself the following questions: This blog is mostly about small tutorials in Haskell and Yampa FRP for game development.
I graduated in game development specializing on component based game engines.
I think the component-based game engine literature mixes-up “combining existing functionality to define game-specific logic” (= reusing functionality) and “automatic communication within unknown game-objects” (= dynamic functionality).
Automatic communication is restricted to the known components and new functionality always has to be game-specific (either hard-coded, or in scripts, or any other data-driven method).
For the communication of components in our engine we used messages, events or let them directly search for components implementing a specified interface, which is illustrated in the following diagram: In component-based architecture we were mostly concerned about the component intercommunication, like the player movement for example: Should the Mover-component manipulate the position directly or send movement-messages?
Or should the Position-component listen to movement-events?
And if we want it to be a bit random, we just compose the output with the random function in the game-object definition.
The argument for component-based game-engines usually starts like this: Game-objects should be represented like objects in reality but as the project progresses however, class hierarchies become more and more complex and thus should be split into small, reusable components.
Game developers like abstract and re-usable game-engines after all.
Even with components you define the player game-object specifically at some point: Player = Position Component Visual Component Input Component.
In FRP everything is based upon time, thus time should be abstracted away into “time dependent functions” (behaviors).