In my client application I have two major components:
- GameCore - wrapper that handles everything about running the actual game
- NetworkClient - A layer that takes care of communicating(receiving/sending packets) with the server.
What I am not sure about is the way the NetworkClient should server information to the GameCore process of the game. The core process has an event queue that is executed in update() calls. My initial idea is to have something like this:
NetworkClient receives a snapshot of the state changes, takes that snapshot and chops it down to event objects for the GameCore process to handle.
The problem I see with that, isn't the NetworkClient class too dependent on the Core class. The oposite is not an issue however because, there can be a different client(udp,tcp etc) that works with the Core class.
So from a design point of view, is there a reason I might not want the NetworkClient class to be written for the specific implementation of the Core class.