Jump to content
  • Advertisement
Sign in to follow this  
dkx187

asset importing

This topic is 3589 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 want to make a game engine with full asset importing features(by this i mean that you can import assets from any tool or editor for the engine such as models,text,sounds worlds ect.). My problem is that i dont know how to do that. Thank you for your help

Share this post


Link to post
Share on other sites
Advertisement
The easiest solution is probably to hard-code the plugins/codecs (loaders for the different file formats) into the engine itself, but that will require you to recompile the whole thing, every time you need to add support for a new format. Another approach is to use codec factories or the like, where you can register new codecs at runtime using DLL/SO files. This requires that your application knows which DLL/SO files to load at runtime, which function(s) to call inside the DLL/SO, and that your codec knows where to register itself, probably using a global/passed variable/object. You can take a look at Ogre3D and its Plugin and Resource classes for inspiration, though you might want to avoid a singleton in this case, since it can surely be done without such (using a variable/object passed to the DLL/SO function, for instance).
You can also do it the other way around, where you make custom exporters for the individual programs, though the first solution will probably be easier to make, since several programs can save data in shared and/or common file formats.

Share this post


Link to post
Share on other sites
Sign in to follow this  

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