Go Back   AC3D Forums > General > AC3D Suggestions
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 3rd May 2008, 08:21 PM   #1
speciesunknown
Junior Member
Member
 
Join Date: Feb 2008
Posts: 12
Default Improved c++ .ac file loader?

Hi, this is my first post here, I think. If not, then it has been a while.

I'm using AC3D to construct a large city, and combining this with the physics engine Bullet to make a zombie slasher game. I'm using the loader code from the downloads section. I fixed several bugs with it, and created an extra layer between the ac3d code and my game engine. The current code, with a few modifications, loads into the ACObject class, and then this is converted into my own, internal format which is ready to be rendered.

The AC3D file format is excellent for my needs. The way it is arranged in a hierarchy internally makes it easier to store models in a game - friendly format. The fact that it is ascii rather than binary makes it easier to load in the first place, and the fact that so much of the file format is well documented and public compared with other file formats is a blessing. I am able to do some very cool things by combining it with a physics engine.

The code has a few caveats. Firstly, it loads images internally, which I stripped out and modified it to work with a seperate OpenGL image loading library. The code to delete the ACObject class causes malloc to go wild, although this is mainly a consequence of my modifications, I believe. It also uses a lot of other old skool C stuff in reading from file.

Is there a better loader in the works? I already plan to write a loader myself. I would use the current code as a base, but I would rewrite the rendering code, update it to use STL rather than C arrays, and I would convert the code to use the image library I am currently using, SOIL. (Simple Opengl Image Library) which loads a variety of file formats, compared with the current loader, which only loads .rgb (.sga) files.

I'm not sure about the license attached to the loader, although I accept that the file format is not open source, and that my code would still be property of Invis.

Last edited by speciesunknown; 3rd May 2008 at 08:24 PM. Reason: forgot something important
speciesunknown is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 04:20 AM.


AC3D Forum
(C) Inivis Limited 2020