Welcome!

Hey, I'm Skylar, a kid aspiring to become a competent programmer. This blog is here to detail my dabbles in development.

My dream is to one day become a professional programmer and do some game development in my spare time.

Thanks for visiting my blog, and I hope you'll come back!

Pages

Resource Management

Well, since you couldn't tell from the last screen shot, I'll tell you that it was starting to get laggy. Every new bullet, and every new enemy each had it's own surface, which is quite ridiculous I must say. So right now, I'm adding a resource manager to my framework.


I'm thinking that the resource manager will have a graphics and sound component and will work something like so:

ImageBank->GetSurface("SomeImage");

So what I want it to do from here, is search to see if it has that image, if it does, return it, if not, I have it return NULL at the moment.

Ideally, I'd like to be able to not have to specify the extension, and write some code to search through the directory to find the file with that name, grab it's extension, and then load it in, so I don't have to worry about extensions and such. I'm finding this to be rather hard, as I want to maintain my code's portability, but any method I've find to search through a directory is platform dependent.

So I'm working on that now, if I can't find a good solution, I'll just skip it, and leave it as is, but for now, I'm determined to find a way!

0 Response to "Resource Management"

Post a Comment