Anim8or Community

General Category => General Anim8or Forum => Topic started by: danielstritt on April 23, 2017, 11:13:02 pm

Title: Coding Anim8or
Post by: danielstritt on April 23, 2017, 11:13:02 pm
This one is mostly for Steve since he makes Anim8or. I was wondering, as a developer I am curious, what development environment you use to make it, and any libraries like MFC or so, or just raw Windows API calls.


Thanks,
Daniel
Title: Re: Coding Anim8or
Post by: Steve on April 24, 2017, 02:21:37 pm
I use Microsoft Visual Studio and code in C++. I don't use MFC or anything like that. All OS calls are normal Windows API and the standard C++ library.

The only other code I use is some JPG code from The Independent JPEG Group and LIBPNG (which also requires ZLIB for the compression) to read and write .jpg and .png images.
Title: Re: Coding Anim8or
Post by: Pixie3D on April 27, 2017, 08:08:20 am
Steve: Out of curiosity, how many classes have you created to develop Anim8or? and I know it is not so much of a useful information for people but how many lines of code have you written to create Anim8or? Also, what do you consider (for a developers perspective) as being the best part of Anim8or? and (last question) if you could go back in time and redo anything what would it be and why?
Title: Re: Coding Anim8or
Post by: Steve on May 02, 2017, 04:58:20 pm
So far  there are about 900 classes and structs, and 300 KLOC in Anim8or, not counting the jpg and png libraries.

It's hard to say what I think is the best part. As I work on it I continue to think of better ways to structure the code. Much of what I do is rewriting code to simplify the overall organization.  The earliest code that has become Anim8or was originally written in Pascal. Later I translated it into C and very soon afterwards into C++.

Initially there wasn't any kind of Undo-Redo capability. That was by far my biggest mistake. I would have designed the code very differently with that in mind. The second issues is that it's not 64-bit safe. I'm slowly fixing that but I still have code that casts pointers into ints for thinks like call back functions (yes, I knew better, but did it anyway to "save time"!) If I had gone from Pascal directly into C++ I don't think that would have happened.
Title: Re: Coding Anim8or
Post by: thecolclough on May 02, 2017, 06:52:18 pm
So far  there are about 900 classes and structs, and 300 KLOC in Anim8or, not counting the jpg and png libraries.
good grief... i think the biggest thing i ever coded was about 2k lines, and i had fun keeping track of that - the mind boggles as to how you keep tabs on 300k lines!  my hat's off, once again :)
Title: Re: Coding Anim8or
Post by: nemyax on May 02, 2017, 07:25:44 pm
Steve
Are you planning any major rewrites after 1.0 or will it be bit by bit?
Title: Re: Coding Anim8or
Post by: Steve on May 02, 2017, 08:34:23 pm
I have a lot more ideas for Anim8or. I don't want to post a list because some of them, like IK,  will take a lot longer that I think they will. We programmers can be exceedingly optimistic about how fast we can do something (http://s6.postimg.org/p4cqdev8d/grysmile.gif)
Title: Re: Coding Anim8or
Post by: nemyax on May 03, 2017, 08:30:47 am
Steve
What's the current implementation of undo/redo like? And how would you improve it?
Title: Re: Coding Anim8or
Post by: Steve on May 03, 2017, 12:15:39 pm
It's an ad hoc set of classes that record differences between the original and altered component. If I could rewrite it from scratch I'd have each class summarize the difference between the two and hide all of the undo/redo code inside the class. The undo/redo code would be a whole lot simpler.

As it is the component classes need to expose more of the internal structure to the undo/redo functions which then need to be updated whenever the component classes change.
Title: Re: Coding Anim8or
Post by: cooldude234 on May 17, 2017, 06:18:20 pm
The second issues is that it's not 64-bit safe. I'm slowly fixing that but I still have code that casts pointers into ints for thinks like call back functions (yes, I knew better, but did it anyway to "save time"!)
LOL, I know that feeling