Post news Report RSS Monthly Progress Update February 2012

Hey everyone, we had a lot of progress this update cycle. See the news article for more information.

Posted by on

Well we had a very active month for Space Crusade this update cycle. Oh and before we get too much further the title change is because since technically both Combine Insurrection and Space Crusade share an update cycle of two months, each with its own month of work, calling it a "bi-monthly" update is kind of a cheat.

So, lets get right into it. I did a lot of work this update cycle, a lot. I already have the change log on the wiki page updated this time so you can head over there now via this link, Lmpgames.com , or continue reading for the long winded explanation.

I am going to do something different this time and break down the work done by section, like I do in the changelog except covering all of the work down for each changelog entry instead of breaking
that down by day.

Player


The Player class had quite a few changes, some as a direct result of other functions changing and others because changes to it had to be made. I moved a couple of menus out of the class and over to menu processing where they should have been in the first place. I also changed all Item System function calls to Data System in order to reflect a change to the class name.

I added a menu processing reference so that I could call the menu creating functions when needed and I also split the TakeDamage function into three parts, one for each type of health that passes along and damage left over to the next section. I did this because it makes for less mangled code, the previous version was a bunch of If/Then/Else statements that made for a potential error nest. Doing it this way removes that chance and makes the code shorter and cleaner looking.

Next I changed the ship technology level from a string to an int to reflect the type change of the attribute in the ship struct (now a class). I removed any an all ship related functions and code except for the pShip definition and also removed the ranks array. Ships are now handled as instances of the Ship class so this also frees up a lot of code that was otherwise used to setup and get values.

Hostile


I added all of the get and set functions present in the Player class into hostile as well as the related code. I modified it to work with the Hostile class and then I began to work on crafting the initialization system. The system in the previous version of the game was as equally barbaric as the weapon assignment system, I wanted to reprogram it to be cleaner and more functional; also had to do so because of the changes to the way things are grabbed from the matrix now.

The way this system will work is based upon the player CBE level, the player's ship class, or the player's rank. I have not decided which it will be or if it will be a combination of two or all of these. Either way a switch will examine the criteria for initializing the enemy ship. A series of random statements will pick a value corresponding to an metric, weapon, or ship in the respective databases which will then have the data pulled for and setup into the hostile ship. This will work differently between the RTS and RPG/Action segments of the game, the above solution is for the RPG/Action section.

I also renamed the hostileStory constructor to Hostile so that it would actually work (a brain fart on my part) and removed any initialization code from the constructors as that will now take place in battle processing. All of the constructors were edited to complied with variable type changes made and any variables that were removed.

As with the Player class, any and all ship code or functions were removed save for the reference.

Data System (formerly Item System)


This class got some love as well this update cycle. I renamed it to Data System because it now takes care of more then just the weapons and ships. I moved the planet names, race names, player ranks, and race/planet disposition arrays to this class. I removed any functions that were duplicating "gets" and instead created basic functions where only one get function for each table instead of having a get function for each weapon type.

Example there was a GetLaser, GetMissile, and GetBomb function for each data type that needed to be pulled. That has been removed and replaced with a single GetWeaponX styled function as well as all of the weapons tables being combined together to accommodate this change. This was done to cut back on the amount of code being used.

I removed optimum range damage from all weapons and the ship structure in favor of a new system where optimum range damage is added on as a multiplier. Now when a ship hits at the optimum range for a weapon the damage is randomly multiplied by 1.5 to 2.5 times. This not only allows me to get rid of some code that is no longer needed but it also makes it so that nearly all weapons damage is now randomized. Given the nature of how it is calculated there will still be times when damage is repeated in value during optimum strikes but now it will happen less often and there is still a sense of panic and gratification when an enemy attacks you or you attack an enemy and you do not know if you are going to get totally worked over by a 2.0 to 2.5 multiplier or if you get saved and get a lower value.

I also added in several functions, many of which do not have the code implemented yet. These functions deal with both getting the hard points as well as obtaining cost information for weapon purchases or selling. I also fixed several architectural problems with the ship and weapon databases that would have caused some massive problems during compile time.

Weapons


Both the Weapons and Ship structures changed the most over this cycle because I have changed them into classes in anticipation of any specific functions that may be needed in the graphical version. This also allows me greater control over these objects and also lets me clean up the code by moving unrelated functions and definitions out of their old classes and into these.

I added many functions to this class as well as two new variables, weapon tech level and weapon type. Some of the functions have been commented out because they are either not ready for use or are for the graphical version of the game, such as rate of fire. While there is a primary weapon class I have inherited children classes for each specific weapon type that requires more specific functions or variables because of how they operate. These classes are Bomb, Defense, and Heavy. The other weapon types do not have their own classes and operate out of the Weapons class.

Ship


This was the other major work area this update. While there is not quite as much to comment on here I did remove any and all functions that should go here from other classes and moved them here. I also went about each class that used ships and have modified them to work with the classes now.

Much of the same as with the Weapon class, functions were added, edited, or removed as needed from the rest of the game and moved to this class if necessary. I also added functions to get and set ship data in lieu of how ships are now handled.

Damage Types


I have started work on damage types. Currently there are 22 damage types, each either their own effects. Check the changelog for further details.

Menu Processing


I moved several player creation menus into this class from the player class as well as the navigation menus from Main. I also moved the game loop to this class from main. It is not yet finished and has no code though.

Main


I removed the start game and navigation menus from this class since they belong in menu processing. I also removed the game loop and placed it into menu processing as well, yet it has not been completed there yet.

Removed many class pointers and references that are now used only in battle processing.

Battle Processing


I added several new functions for initialization of hostile ships and removed them from the hostile class. This was done because these initializations are a part of the battle initialization process and make more sense to be included there. There is also another reason and that is that class instances cannot be passed cleanly and it is much easier to create them here, where they will be used, instead of trying to get them to pass through a function call or through many "get" commands. Player wingmen will also be done in this fashion once they are implemented.

I created two new arrays that will hold the player and hostile ship instances while they are used to better facilitate a clean code solution and this will also make multi ship battles easier to process with less code since we can iterate through an array of class objects and not need to do the actions for each one individually.

I continued the work on hostile initialization after bringing it over from hostile.

Game


From game I removed the raceNames array and moved it over to Data system.

Planet Processing


I moved the planetNames and planet DiplomaticDispositions arrays to the Data System class.


That encompases everything that I accomplished during this development cycle. I am not sure where my priorities will lie for this month of development, I may choose to continue crafting the hostile creation functions or I may move on to the stations class as that will be a very large undertaking.

Either way I would classify this as a fairly progress fill month. I do not know when we will have an alpha version ready for testing, it still seems pretty far off though. When we do get close to that point though and if we have the website up we will open a form for testing applications so that if you want to help beta test the game we can setup accounts in the forums for tester access and get things setup in our bug tracking software. Again that is at least a year from now if current progress is anything to go by.

Thanks for following the project!

~Geowil

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: