As I programmed my first game, I began to realize that 79.3kb was a bit big for all the code. So, I invented my own little code-module system.
Basically, I have a file called "init_shutdown.cpp" that deals with initialization and shutting down, a file called "frame.cpp" that deals with state selection and basic rendering.
For my global objects (i.e. sprite structures) I create a file called "objects.cpp" that contains things like:
// sprites
Sprite sprite_1;
Sprite sprite_2;
// models
Object rings;
And then I create an "objects.h" file like below, and place an
#include "objects.h" in my precompiled-header file.
// sprites
extern Sprite sprite_1;
extern Sprite sprite_2;
// models
extern Object rings;
However, I''m not sure this is the most efficent method...
what do
YOU use?
thx