• Welcome to Final Fantasy Hacktics. Please login or sign up.
 

Code Reorganization Progress Report

Started by lirmont, September 17, 2012, 08:47:27 pm

lirmont

September 17, 2012, 08:47:27 pm Last Edit: October 19, 2012, 07:32:09 am by lirmont
By way of a quick recap, Tethical's codebase is ~18k lines of code between python and other stuff as of Spring 2012. The problem with this is that a lot of important features (i.e. menus and GUI stuff) are buried in several really long files, missing the opportunity to call the functionality from a centralized location. Why should you care? That means that things like themes and events will be more work than they should be.

So, over that past 4 months I've reorganized and pulled a lot of this functionality out into just such a centralized location. There's still a lot to do, because, while I've gotten all the important functionality out into the centralized location, I now have to rewrite the GUI feature to use this modular information. After that's done, it's back to real feature development.

Other changes that have happened along the way are rewrites of existing features. For one, events now need very little code (~5 lines) in the actual event file to support backtracking their way up to the base directory and running themselves through the test interface. Why do you care? The feature this rewrites is the ability to just double-click your event file and have the application launch right into testing. That same functionality is there, but now you only need that minor amount of code in your event file and the __event_backtrack__ file in the same directory as your event. That's it! Double-click your event to test it, and be on your way.

Another benefit of the rewrite/reorganization is that events now land in the same general context that the client lands in when you launch the client (i.e. the game). Once again, why should you care? This gives you access to that centralized area that holds a lot of work you should never ever ever have to do in building your own game on this platform. On top of that, the design approach will not visually break if the user switches themes (assuming you've provided more than one GUI theme for your game).

Tethical's Project Layout, 09/17/2012:


Tethical's Project Layout, 10/19/2012: