Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Load/Save Internal or External

This topic is 5388 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a class, Sprite (but it could be anything like object or entity) that has a file format and during game time I need to load the sprite''s information for the hard drive. Is it better to have the Load routine as a member of Sprite so to use it I would go:
or to load it externally of the class like
I know both ways will work, and I''m not really looking for which one is faster, just whether it is standard, or accepted to have it internal or external. --------------------- Ryan Bujnowicz [ vangelis ]

Share this post

Link to post
Share on other sites
I would go with the first approach. That way you don''t mix OOP code with global functions, and that makes it more consistent in my opinion.


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning..." -- Rich Cook

My future web presence: Dave''s Programming Resources

Share this post

Link to post
Share on other sites

  • 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!