We have fixed a lot of bugs and added a lot of features, maps 4x the old volume, a stable economy, new AI attack plans, less AI god sight, troop ships that can be loaded, automatic fighter upgrades for carriers, the ability to delete save games, better mod support, and a lot more. However it has become clear that continuing on this code base is not going to get much better.

Posted by CrunchyGremlin on Dec 13th, 2016

StarDrive BlackBox “Texas”

The Radical Elements version of stardrive comes to a close.

We have fixed a lot of bugs and added a lot of features, maps 4x the old volume, a stable economy, new AI attack plans, less AI god sight, troop ships that can be loaded, automatic fighter upgrades for carriers, the ability to delete save games, better mod support, and a lot more. However it has become clear that continuing on this code base is not going to get much better.

Our dev RedFox, in just a few days, has shown how much better the code could be and how much easier it could be to work with. This is absolutely vital to the continuation of the project. Not only for fixing bugs but allowing new devs to work on the code. To this end we will Release Radical Elements as it is as the latest stable version. We will continue to work on any major bugs that prevent gameplay in Radical Elements but put the rest of our focus on the next version of BlackBox “Texas.”

Texas will be a massive code overhaul.

It has become very clear that working on the code as it is can't continue reasonably. There is too much that the decompiling process has got wrong or at least made extremely difficult to manage. This doesn't mean that the decompilation program isn't amazing, it's just not very good at turning the CIL into efficient code. Chunks of code repeated in several different areas, makes adding content and fixing bugs very difficult. The changes we have made already reduced the game loading speed by half or more.

This process will take several months at most and will be released as unstable texas builds.

There are several goals to this process:

Improve visuals.

Improve core code readability and usability.

Add new content.

Increase game performance.

Wanted Goals:

Playable game with 5-6k ships.

Playable game with 7 players on truly epic map.

Playable game with 1000 planets.

Some of these goals we won't be able to achieve, but we have seen that seemingly impossible things can be done so it might happen. With the more work put into code cleanup it might be possible.

Examples of compiler issues and possible original code hot fixes.

The below is the entirety of the artifact class of the game.

using System;



namespace Ship_Game

{

public sealed class Artifact

{

public bool Discovered;

public string Name;

public string Description;

public int NameIndex;

public int DescriptionIndex;

public float ReproductionMod;

public float ShieldPenBonus;

public float FertilityMod;

public float ProductionMod;

public float GroundCombatMod;

public float ResearchMod;

public float PlusFlatMoney;

public float DiplomacyMod;

public float SensorMod;

public float ModuleHPMod;

public Artifact()

{

}

}

}

What's important to note there is that none of the functional code for the artifact is here. Its spread across 5 or 6 different classes in duplicate. By cleaning the code up and encapsulating the relevant functionality in one place we can then add new abilities and concepts to artifacts considerably easier. Such as artifact origin stories and secret tech artifact related among other things. in the below refactor most of the code from the other areas has been moved to the artifact. The duplication has been removed and the logic improved. This is just a minor example of what we are working on accomplishing.

using System.Collections.Generic;

using Microsoft.Xna.Framework.Graphics;

using static Ship_Game.EventPopup;

namespace Ship_Game

{

public sealed class Artifact

{

public bool Discovered;

public string Name;

public string Description;

public int NameIndex;

public int DescriptionIndex;

public float ReproductionMod;

public float ShieldPenBonus;

public float FertilityMod;

public float ProductionMod;

public float GroundCombatMod;

public float ResearchMod;

public float PlusFlatMoney;

public float DiplomacyMod;

public float SensorMod;

public float ModuleHPMod;

public Artifact()

{

}

NEW METHODS ADDED THAT REMOVE DUPLICATE CODE AND CENTRALIZES CODE CHANGES. THESE TWO METHODS REPLACE MANY LINES OF CODE IN SEVERAL DIFFERENT AREAS.

private bool TrySetArtifactEffect(ref float outModifier, float inModifier, RacialTrait traits, string text, EventPopup popup)



public void CheckGrantArtifact(Empire triggerer, Outcome triggeredOutcome, EventPopup popup)



}

One of the biggest changes we have had recently is RedFox.

RedFox has given concepts for good code and concepts that we just did not see clearly. His ideas are a direct cause for the changes we are working on. He has some understanding of game design that most of us don't have. Hopefully he will stick around for a while but he has already been a big help in the direction of the game.

Invyx has created many new graphics for the game.

New explosion and warp animations and UI art changes. Including adding room for more buttons to the minimap screen.







Here is an example of some of the explosion examples invyx has incorporated in combomod that we will get into the game. We will slowly be adding these concepts to the game.





As always BlackBox is an open, no pressure project. If you have interest in AI, video, sound, content, code, testing, PR, web design, feel free to contact us.

The current devs working on BlackBox are:

Gretman

RedFox

Invyx

Crunchy Gremlin

If you have had interest in BlackBox in the past now would be a good time to get on board again. The current direction of the game modding is very straight forward. Code cleanup and code review.