Jump to content
  • Advertisement
  • entries
  • comments
  • views

Handle-based resources

Sign in to follow this  


I've never used Handle-based resources before, even though people have preached relentlessly about them in the past. Well after being inspired by the writings of Scott Bilas (of Dungeon Seige fame), I've implemented several handle-based systems into my upcoming game for the 4EC. I must admit, it took me a little while to get used to the paradigm shift of using handles instead of pointers, but now I think it's a pretty nice way of doing it - the main reason is that of encapsulation. As I'm passing handles around for things like textures, I'm not tempted to start breaking my OO-design anywhere, simply because there is *no way* of accessing the texture data outside of the TextureManager. I'm free to pass around handles everywhere and delete pointers in the texture manager without causing a problem anywhere. What's more, if a texture can't be loaded by the game, everything will work as it should - no crashes or issues other than the fact that the texture isn't displayed. It's a far cry from the past issues I've experienced, where systems become so tightly bound around the objects and I lose track of who owns what.

I've already implemented the system in another critical game system and it's working flawlessly [grin]. Suffice to say, I'm pleased with the progress so far.
Sign in to follow this  


Recommended Comments

evolving by evolutional
On life, evolution, Zombies and Manta-X

Last Updated June 12, 2005 3:31:35 PM
This journal has been viewed 12,686 times.

ACK! There's a Butterfly on my Nose!! by Mushu
The 4 Elements contest is back! Come read my rants and steal my ideas!

Last Updated June 12, 2005 9:59:54 AM
This journal has been viewed 12,908 times.


Share this comment

Link to comment
Kick his ass, evolutional! C'mon, you can take him. (journalview++) [grin]

Sorry, Mushu...

Share this comment

Link to comment
[StarTrek Music] Duh Duh Duh Duh Duh Duh Duh Duh Duh Duh Duh... [/StarTrek Music]

I'm glad to see you're still at GameDev [smile].

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!