r/TronScript • Tron author • Nov 24 '15

Tron modularization project

Hi all,

I'm starting the process of modularizing Tron.

What does this mean from a functional, end-user perspective? Nothing.

What does this mean from a project development perspective? A lot!


Basically, Tron.bat's gotten pretty large (~2,100 lines depending on version/comments), which has made it tricky to work on without making mistakes. Additionally, Tron calls so many sub-scripts it's sort of half-modularized anyway. It's always been in the back of my mind that we'd eventually shunt all stage-specific code into sub-scripts, so now we're finally doing it.


What this means

I've broken Stages 0-6 into their own sub-scripts, each stored at the top level of that stage's respective directory. There shouldn't be too many big changes; Tron.bat now just performs a call statement to each sub-script, lets it do its thing, then continues on when control is returned.

Pros:

  • Cleaner and easier-to-follow code base

  • Less intimidating for contributors; Can now modify a single ~100 line file instead of a massive 2k+ one

  • Lays the groundwork for future implementation of some of the more heavily-requested features. Basically, difficult ones I really didn't want to implement due to the monolithic code design. Stuff like skip-directly-to-stage-n, run-only-n-stages, auto-download updated stage_n code, etc.

Cons:

  • Have to jump around a bunch of files when making a tool-wide change


Suckers testers wanted

Connect to the tron_dev repo and pull down the new version, play around with it and report any problems or crashes.

  • BT Sync: BDCF7MUDXNIDEK2KQ6DHV5ALIGIWD257O

  • Syncthing: L3JP4R2-LCTIN67-E7ESWYB-UAMUCW5-ZPIBJGA-G3AOMZE-V26Q6LG-CRUGGAN, enter tron_dev for Folder ID

If you have suggestions/changes:

  1. Github pull request

  2. Top-level comment in this thread

  3. PM or email me directly (please don't do this unless you need to send lots of attachments or something)

Future

Once we get everything fully working, I'll retire the original monolithic tron.bat and push out the modularized version with its supporting scripts. The v7.x.x branch will be the last release of the monolithic Tron, and v8.0.0 and up will be the modularized version. Then we can hopefully start working on some other cool stuff.

Cheers,

- Vocatus

35 Upvotes

3 comments sorted by

5

u/[deleted] Nov 24 '15

Guess I know what I'm doing tomorrow.

3

u/andycandu Nov 24 '15

Same here, I love tron and scripting :D

2

u/ixnyne Nov 25 '15

This looks amazing, keep up the great work!