Fed2 Star - the newsletter for the space trading game Federation 2

The weekly newsletter for Fed2
by ibgames

EARTHDATE: July 31, 2016

Fed2 Star last page Fed2 Star: Official News page 3 Fed2 Star next page

ALAN EXPLAINS WHY THIS TOOK SO LONG

by Hazed

When Alan sent me the details of how the new commands work, he included the following explanation, for inquiring minds…

“In case you’re wondering why updating the status panel code took so long to write, but the panel doesn’t appear to be much different, here is an explanation.

The original display used fixed positions for the items. That meant if you didn’t have something like a customs certificate or trader points there was an unsightly gap. The new stuff now works out where in the list items are on the fly. The weapons section was even more complicated, because different ship models can have a different maximum number of weapons mounted. Within that maximum they can have a different number of weapons actual purchased, and to make it even more complex, they can have more than one of the same type of weapon.

That means that at any point in the game you may have several of the same type of weapon with different levels of damage. When a new damage report comes in the code has to figure out which of the weapons got damaged!

It took a couple of tries before I got some code that I was happy with, and which was not too complex to be properly maintained. That, of course, took more time than I expected...”

Well, at least he had it done before Christmas!

Fed2 Star last page   Fed2 Star next page