Design Pattern Question for Bridge Simulator

Hello all,

Just a quick question for a project I've been working on. I've been mucking about with a bridge simulator game (a la Artemis) that uses websockets and javascript pages to provide consoles to control the vessel (

I've got the websockets working now and am starting to build up a simulation of the internal starship itself (e.g. fuel tanks, reactors, sensors, etc.) and was looking for some opinion on how to design it. At the moment I have classes for each component that implement their own simulation and have an Update(timeElapsed) method to compute the new state, and a Commit() method that actually commits those changes – allowing all of the components to update their state at once.

The issue I am having is how tightly to couple the objects. The easiest way to do it would be very tightly-coupled: the reactor calls "RequestFuel" on the fuel tank, etc. However this feels like a very rigid, poor design, and I am wondering if people think that it is worth the overhead of a messaging system to avoid this tight coupling? Thanks for your time!!

by TristanJ via /r/csharp

Leave a Reply