Sign in to follow this  

asset importing

This topic is 3378 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
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

This topic is 3378 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.

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

Sign in to follow this