Dense Technical Jargon: Progress Report

I’ve finished stage 1: the UI stat dictionary is no more. All data is now coming from a single, ridiculously complicated source.

StatDictionary

I’m not kidding about the “ridiculously complicated” bit, either. Check out how many different stat classes there are, just to hold the various values associated with creatures alongside their descriptions, mutation rates, minimum/maximum, and mutation maps:

StatClasses

It works, though. Pretty much all the important stat data is now coming from the StatData definition class. This is a good thing.

Hmm… eh, why not. It’s possible some of my readers are almost as boring and nerdly as me, so…

StatData

Here’s a copy of the source code for the StatData class’s constructor.

In it’s current state, it includes the complete definition for all the stats, including the delegates that actually calculate quite a few higher-level stats. Things like speed, stamina and attack damage: the complete formula for them are all here.

It’s still functionally identical to what’s running in 0.8.0: some syntax and text changes, but nothing that actually changes how the simulation behaves. So you can compare it to the actual game, if you so desire.

Enjoy!

The second stage is supposed to be softcoding the entire UI, but… well, that’s looking more complicated than initially expected.

See, rather than just hardcoding data for the UI, I’ve made quite a bit of use of C# abilities. So while some control definitions look nice and simple, like this…

startingWorldGroupBox.Position = new Vector2(0.05f, 0.36f);

… other control definitions are… less simple.

mainMenuGroupBox.Position = new Vector2(screenWidth / 2 - aspectRatio * 475 / 2, screenHeight / 2 - aspectRatio * 316 / 2);

I’m weighing my options.

I could import definitions as strings rather than numbers, with tokens like [SCREENWIDTH] being replaced by variables in the interpreter. I could try to replicate all this functionality with a data-driven system (using anchors, for example), rather than an algorithmic one. I could try to store these values as a node/variable in XML (I think that’s a thing you can do. Really not as familiar as I should be with XML).

… or I could just… not.

The investment is turning out to be larger than I’d originally planned, and although I’d still love to softcode the entire UI for modding purposes, is it really worth it if it takes a few months extra to do so?

The alternative is just doing a more general clean up on the whole thing, while keeping it contained in C# files. I’m really not sure if this is a better option or not.

Luckily, I’ve got another feature I’ve decided to play with while I decide what I’m going to do here, so I can at least postpone that decision while I consider it.

Cheers,

Qu

Advertisements
  1. #1 by Mikescher on July 28, 2015 - 8:22 pm

    > *dowloads sourcecode*
    > it’s a word document o.O

    Dafuq ?

  2. #2 by ququasar on July 29, 2015 - 11:07 am

    Aye. WordPress only has a limited number of file types it’ll allow me to upload here, and I was too lazy to visit mediafire, so I copy/paste’d it into a .doc document.

  3. #3 by Joey Montoya on August 1, 2015 - 5:49 am

    Does this fix the clade diagram corruption thing?

  4. #4 by Alpha on August 27, 2015 - 7:10 am

    So the forums aren’t working 😦

  5. #5 by Sn0wCh1ld on September 2, 2015 - 4:39 am

    Will there ever be a Mac version?

  6. #6 by kopout on September 12, 2015 - 4:34 am

    The forums have hacked up an error:

    Fatal error: Namespace declaration statement has to be the very first statement in the script in /home/ququasar/public_html/forum/vendor/composer/ClassLoader.php on line 13

  7. #7 by ququasar on September 12, 2015 - 7:58 am

    Working on it. Some sort of php vendor update screwed everything up.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: