destiny team mailing list archive
-
destiny team
-
Mailing list archive
-
Message #00282
Updates
Hi folks,
Just wanted to touch base on some updates that have been made today.
I integrated the Resource Manager into Rabbit Runner. This consisted of a
number of revisions, but the state it's in now is that it acquires all
surfaces through the RM, and upon switching levels, releases them. This cuts
down on our memory footprint because we're only loading 1 level at a time
instead of every level.
This required a refactoring of Rabbit Runner. Previously, we held an
std::vector<Level*> of every level, and loaded every level at start-up. Now,
we simply have a single Level* which we use throughout the game. Once a
level is cleared, the pointer is deleted, freeing all surfaces it holds via
the RM, and then the next level is loaded, acquiring all surfaces it holds
via the RM.
This is a much more efficient and streamline design.
Along with that, the RM now throws an exception when it cannot load an
image. The reason for this is that the game cannot reasonably function
without every image that it needs. So, in the event that it can't load an
image, an exception is thrown reporting the offending image, and the program
exits. This will allow us to debug crashes easier, and especially if we
receive word from our client partner that a crash occurred once we're gone.
In the past, she'd just say "It says 'segfault'", but now we'll know why,
and which file caused the segfault.
This also encapsulates all of the pointer-checking for our SDL_Surfaces
within the RM so we don't really have to worry about checking pointers
anywhere else in the code.
Please run through the game a number of times and report any issues you
find. Currently, we only have 1 level, and I've tested it and it works, but
I'm sure there is some issue lurking around somewhere.
Zach J. Elko
Ball State University Unified Technology Support
Certified Hardware & Software Technician