The basic guidelines I'm going to attempt to follow are thus:
- Extensible. I want to focus on constructing code that is reusable and modular. I want the code to be cohesive.
- Utilize Allegro game library to help keep things simple and easy but design it to be extensible enough to simply plug in a different UI library. I want it setup in a way that if I want to use a different engine or library for the graphics and other things, I just simply need to write an implementation for my interface.
- Cross platform. I want to be able to use the program in at least Linux and Windows. I'm going to (hopefully) attempt my first endeavor in cross compiling with MinGW.
- TDD. I want a full testing framework to accompany the source code.
So in the image here I've posted my basic diagramming work to which I've tried to outline what seems important as well as the basic layout and coupling between the different objects.
An arrow pointing to a box is meant to signify that that class/object relies on, or needs to know about, the class/object to which it points.
An arrow pointing to a box is meant to signify that that class/object relies on, or needs to know about, the class/object to which it points.After completing my macro design I began setting up my environment. I'll be working on the project from within my Ubuntu 9.10 Karmic Koala partition. From there I installed Eclipse with Synaptic to use as my IDE. Since I want to use C++ for this, I had to install CDT from Eclipse. I then installed the allegro library from synaptic. I wish to use a test driven development (TDD) for this project, so I then went ahead and installed the CuTE plugin for Eclipse and the Boost libraries (which CuTE requires). From there I threw a couple 'hello world's at it and made sure everything seemed to be working properly.
I've decided to hold off on cross platform eccentricities and testing for now. The way I see it from here, as long as I keep that in mind, that I want it to be cross platform and to steer away from OS specific libraries and POSIX compliant this or that, when the time comes I should be able to modify whatever needs to be changed in order to make it cross platform compatible. The project is small enough and everything I've used so far is completely cross platform compatible so I think I'll be okay if I wait on that. My instinct tells me that it is not wise to hold off on it, and were it a bigger project I would definitely reconsider, but I am confident things will be okay. Right now my biggest concern is wrapping my head around my own design diagram and envisioning all the little bits and pieces working together with limited coupling.