Thursday, February 5, 2009

To code from scratch or not...

Been studying more in depth the core RunUO code which powers AoV. It's not my code, and I keep seeing stuff that I would have done differently.

Here's a major downfall of this program, while good for debugging, makes it hard for coding complex architectures:

It is a core + script type application. So the core is an exe file, which compiles the scripts, then loads them as part of the app. The core has all the networking and data loading stuff in it and of course the script compiler. The scripts contain all the "Extras" like all the mobile scripts.

This is where it gets complicated:

I'm redesigning the data loader to use mysql, which will need to know how to load data for stuff that is, you guessed it, in the scripts. But within the core code, the script classes are completely out of scope! In fact, it's simply impossible to reference a script.

So this begs the question, is it just easier to code this thing from scratch? This is not the only issue I've run into, there are tons of others as well.

Coding from scratch has it's cons though, I have to completely reinvent the wheel. On the other hand, I start with a nice, clean slate.


No comments: