Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

VGUL updates

Sign in to follow this  


I worked on cleaning up some of my recent additions to VGUL and adding/refining its documentation.

Next I will update my sprite editor to use the new resource management system, which also means updating the Sprite and SpriteData classes to use the new resource reference and resource dependency objects.

Which reminds me:
A while back I made a post on the game programming forum about how I was having difficulties coming up with a good system for resources referencing other resources (like a particle system referencing a texture for its particles). Most notably, I didn't want to give resources the ability to load themselves (although now I realize it probably didn't matter. At the time I was on a 'proper OOP' rampage [rolleyes]).

I finally came up with a pretty good solution. Each resource can have a list of 'dependencies' - names of resources it relies upon. Before loading each resource, the resource manager attempts to load all of these dependencies first. The dependencies are saved as a separate data block, preceding the actual data for the resource. A resource class can also explicitly state that it will never have dependencies, and thus can avoid the extra data being read/written.

This creates a sort of dependency tree, which is pretty cool. Unfortunately, it brings the possibility of infinite recursion, which I do not yet protect against.

Anwyay, that's all for now. Off to bed with me.
Sign in to follow this  


Recommended Comments

There are no comments to display.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!