12/4/09

It's me again

Long time, no blog. I got a new job as a work at home web developer and that's been taking much of my precious game development time. I'm finally starting to get back into the groove of things now that I've pretty much figured out how my work schedule is going to go.

I'm back working on the TetrisClone project. I haven't made many strides since my last post, but I have a game plan that I'm hoping will lead me to the completion of this project. The first step of my plan is to get a solid base in place. Something that I can possibly use on other games. Some may even call want I'm creating an engine!

I've started work on the resource manager which will handle all the loading and passing out of game assets that must be loaded off of disk. I'm drawing a lot of inspiration for my engine from the book Game Coding Complete 3, and the resource manager is no different. I had originally planned on creating a ResourceCache like they have in the book's source code, but in favor of time, I've decided just to create a ResourceManager that will hold all the game assets needed in memory for as long as they're needed. I figure the games I'm going to be creating will be small enough to allow me to do this and it will save me from having to debug a cache.

I've started off by adding the zip file importer from Game Coding Complete, slightly modified, but mostly intact, to my project. Again, I had aspirations to write my own zip file importer, but for the sake of time, I decided to borrow (giving the proper credit in the source of course).

Just copying the code from the GCC source to mine wasn't enough though. Again, as I delv into the depths of c++, I ran into some issues that I wasn't anticipating. The zip reader from GCC uses zlib(http://www.zlib.net/) to do the heavy lifting. It uses a 3rd party .lib file which I've never used in c++ before. It wan't too hard this time to figure out what I needed to do though.

First I created a new Libs folder to hold this library file and future ones if needed. I then went into the properties of my executable project and added the new directory to "Addition Library Directories" under Configuration Properties>Linker>General. Then I added zlib.lib to Additional Dependencies under Linker>Input.

It seems like I'm having much more trouble with setting up projects properly than I am getting the code to work. I guess I'll learn as I go on that front. I haven't seen too many books or articles describing how to set up vs in depth.

Now that I can read in zip files, it's time to move on to the meat of the operations, the resource manager. Hopefully I'll have this done and have all the details of my adventures soon.

No comments:

Post a Comment