Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

Author Topic: Coding Anim8or  (Read 1089 times)

danielstritt

  • Newbie
  • *
  • Posts: 29
  • Eternally a newbie
    • View Profile
Coding Anim8or
« on: April 24, 2017, 03:13:02 am »

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
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1532
    • View Profile
Re: Coding Anim8or
« Reply #1 on: April 24, 2017, 06: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.
Logged

Pixie3D

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Coding Anim8or
« Reply #2 on: April 27, 2017, 12:08:20 pm »

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?
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1532
    • View Profile
Re: Coding Anim8or
« Reply #3 on: May 02, 2017, 08: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.
Logged

thecolclough

  • Sr. Member
  • ****
  • Posts: 828
  • 3D Ignoramus 1988-2002, Anim8or User 2002-present.
    • View Profile
    • www.mattghc.com
Re: Coding Anim8or
« Reply #4 on: May 02, 2017, 10: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 :)
Logged

nemyax

  • Full Member
  • ***
  • Posts: 214
    • View Profile
Re: Coding Anim8or
« Reply #5 on: May 02, 2017, 11:25:44 pm »

Steve
Are you planning any major rewrites after 1.0 or will it be bit by bit?
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1532
    • View Profile
Re: Coding Anim8or
« Reply #6 on: May 03, 2017, 12:34:23 am »

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
Logged

nemyax

  • Full Member
  • ***
  • Posts: 214
    • View Profile
Re: Coding Anim8or
« Reply #7 on: May 03, 2017, 12:30:47 pm »

Steve
What's the current implementation of undo/redo like? And how would you improve it?
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1532
    • View Profile
Re: Coding Anim8or
« Reply #8 on: May 03, 2017, 04: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.
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: Coding Anim8or
« Reply #9 on: May 17, 2017, 10: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
Logged