Project Dependency Structure

From Armagetron
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Forum Topic

z-man 'sez

I just wanted to bring to your attention that AA has a well defined dependency structure sorted by the subdirectories below src:

tools    depends on nothing. 
network  depends on tools 
render   depends on tools 
ui       depends on tools and render 
engine   depends on all of the above 
tron     depends on all of the above 

As you see, there are no circular dependencies, and that is important to the health of the project. No file in tools should ever include anything from tron. Standard dependency reversal techniques should be used when, say, you want to trigger a game event when a new user logs in: callbacks are a possible choice. If required, additional noncircular dependency paths may be added (ui may depend on network). I've never documented this properly (I thought leaving out include directories out of the makefiles on purpose was enough) so it's of course entirely my fault if someone does not honor this.