Monday, April 25, 2011

Hiatus Over

After a short hiatus for the holidays, I'm back at work on the game today. I did some work on the ship combat program, basically getting more of the initial ship information loaded up and the basic loop for combat rounds going.

This is still a very nebulous area as far as some of the specifics go, but right now I'm going with the following basic combat format:

1. Determine Initial Distance based on Sensors vs. Signature
2. Determine Maneuver Options for Attacker and Defender
3. Begin Combat Rounds
4. Attacker and Defender Move
5. Any weapons that are in firing range fire.
6. Assess Damage
7. Determine New Ship Characteristics
8. Check Sensors vs. Signature to see if Attacker can still see Defender
9. Check Surrender Conditions
10. Begin Next Round at Step 3
11. Continue Rounds until one side is destroyed or surrenders or escapes.

Tuesday, April 19, 2011

Real Life Intrudes

Got a lot of work going on in my real job and I have some storm damage in my back yard from last week that I've got to work on. Also, other than the storms the weather has been so nice that I've been out walking 4 or 5 miles a day for the past week with my boy. I'm sure this is upsetting to my one blog reader (Hi Grim!), but I'll be back to work on the game very soon, I promise.

Wednesday, April 13, 2011

Pollen, Ugh.

Very busy with other things today, and the pollen is making me feel like a pod person, so I only did minimal work on the game. I did meet my "do at least one small thing" rule today though by making some changes to the Personnel screen that gives you a bit of information if you look up someone employed by another company. Previously it had just said "Not Found." Now it gives you their name, serial number, race, and who they are employed by. Not a huge step forward, but something that had to be done eventually.

Monday, April 11, 2011

Colony Modules

More general work on colony modules today. I created the Module page so you can look at details of any module at a colony you own, and from there you'll be able to upgrade the module if you have the right materials on-hand. The upgrade portion is going to be a good bit of work, but I'm hoping to have it operational in the next few days.

I also got the basic framework for Manufacturing modules into the game, although it's not functional yet either. A colony will be able to build one Manufacturing module per colony class, and each Manufacturing module can have up to 10 factories installed, depending on the Level of the module. Each Manufacturing module will have it's own Build Queue, and the more factories it has installed the faster it can build things.

Mining modules will basically work the same way, except each colony can only have one Mining module.

I know this sounds complicated, but I think it will be a bit more clear once I get the interface up and running for it.

I also spent almost an hour just going through all the different screens in the game and tweaking some of the layout and doing some code refactoring. The game definitely looks different than it did even just a few months ago. The UI is definitely not very fancy, but I can always get an artist to help spruce things up later on. I sort of prefer clean layouts anyway.

My current goal to hit by the end of the month is to have mining and manufacturing in the game and make it possible for a ship to find a mineral deposit and create a new outpost on that deposit and the outpost will start producing minerals. This is a huge step in the game, and will mean the basic core of the game will be done, other than combat, which I had intended to be in Phase 2 anyway.

Shipyard Build Time

Ok, so I probably shouldn't write these posts when I'm so tired late at night. I neglected to run through the calculations for how long it would take for a newly built Shipyard to reach Level 10.0. Turns out it's almost 10 years!

Obviously I don't want it to take that long, and I forgot to include that the character skill Engineering will reduce that time somewhat. I'm not sure by exactly how much, but my goal is that it would take a group of players around 4 to 5 years to get a Shipyard to a high enough level to produce Class 10.0 ships, which will basically be the Dreadnoughts of the game.

There will also probably be special abilities or artifacts that can speed up the build time as well, but I haven't really got those even worked out in my head yet and they'll come in Phase 2.

Sunday, April 10, 2011

Ship Upgrades

I did more work today on Ship Upgrades. A lot of it was getting the framework expanded more and adding supporting code. I did add a Shipyard module into the game and the first one was installed at Fort Jackson in the Marvin(1) system. It's a level 2.0 shipyard and currently a ship can upgrade to Class 2.0 there.

That's likely to be the only non-player made shipyard in the game when it starts, and any player will be able to upgrade a ship to 2.0 there without having to get authorized. It will be up to players to build colonies that are capable of supporting Shipyards bigger than 2.0, and I expect this will likely take a good bit of time to accomplish. Right now I've got the build time for a Shipyard module set to 1 week, so a 1.0 Level Shipyard will take one week to build along with a lot of materials. A 1.1 Level Shipyard will take 10% longer, and so on.

Also, Shipyards will likely only be able to build at colonies of a certain class. Right now I'm thinking Class 5 colonies, but I may lower that to Class 3 but have a restriction that it must be Class 4 or higher to upgrade the Shipyard beyond a certain level.

So it may be up to two years after the game starts before player-built ships larger than Class 2.0 appear in the game. I expect to hear a lot of howling about this, but oh well. I planned from the beginning for this game to have a very long timespan and require long term strategic planning. There will be possibilities of finding derelict ships that are larger than 2.0, but these will be fairly rare and require a good bit of exploration to find.

Thursday, April 7, 2011

Comets

There are certain parts of the code I haven't looked at or tried out in quite a while, and tonight I found that comets were just barely in the game. There was only one comet in the database and it was displaying on the system map, but it had no other data to go along with it and ships couldn't interact with it in any way.

So I fixed that, and now comets can be orbited at least. Next you'll be able to scan the comet to determine some characteristics about, with the most important being the density of Monopoles. Comets are the other object that a ship with a Mining Specialist on board can harvest, resulting in the extremely rare Monopole.

My inspiration for this item came from an old, old PBM I played back in the early 1990's which I can't remember the name of for the life of me. It involved running a colony in a big circular asteroid belt and one of the items you could mine was monopoles.

I'm not sure exactly how monopoles are going to fit into construction yet, but I don know they'll be extremely rare and needed for some of the more powerful items, probably things such as certain weapons or Jump Drives or anything needing something exotic. Whereas scooping a gas giant can net a ship several hundred units of He3, it's likely that harvesting a comet will only result in a handful of monopoles.

One of the things I greatly want to avoid in the game is a runaway economy where colonies have piles and piles of unused materials laying around. I want to err on the side of being too conservative in ore deposits and other raw materials and I want to avoid as much as possible letting one single player have everything they need to build whatever they want without having to interact with other players to get any materials.

Wednesday, April 6, 2011

Ship Morale

Well, I couldn't sleep, so I went ahead and finished implementing Ship Morale decay. Ships should lose 0.1 Morale every 86400 seconds now. For now it will just go down to 0.0 and have no further effect, but implementing the Mutiny/Derelict code is going to be a fairly involved process so I'm going to table it for now. I will slowly add some effects of having medium or low morale in the next few weeks as I touch other things, like affecting the time it takes to complete actions or how much He3 you harvest from Gas Giants.

I'll also be adding the Shore Leave ship action at colonies. The basic action will just give a large boost to your ship's Morale level. When it's finished it will cost the ship owner stellars to grant Shore Leave. The higher rank your crew members are, the more it will cost, which will simulate the higher pay that higher ranks get. The colony you grant the Shore Leave at will receive some percentage of this cost, depending on the level of their Entertainment colony module. So a 2.5 level Entertainment module will mean that the colony will get 25% of what is spent by ships on Shore Leave, and a higher level module will give a higher morale boost.

Ship Upgrades

I'm about 50% finished with the code to let ships upgrade to the next class at colonies. Actually, that's not completely accurate, since it is possible right now for a ship to land at a colony and issue the Upgrade command and go up to the next class level.

Of course, this is wide open right now, and any ship can land at any colony and issue the order successfully. Now I'll have to make it actually require some type of construction materials and currency, and restrict it to only being allowed at a colony with a shipyard of the appropriate level that is owned by the same player.

In order for ships to be allowed to upgrade at a colony not owned by the player, I plan to have it so that colony governors can allow any ship to upgrade at a set price or a governor can issue Upgrade Authorizations which will allow a ship to upgrade to a set level at a set price.

So a governor at a colony with a Shipyard Level 2.4 would be able to issue an Upgrade Authorization that would allow shipID #2324 to upgrade to level 2.0 at a cost of 200 stellars per 0.1 level. Or you could allow a player to upgrade any of his ships to a certain level at a certain cost.

Now that I read this again, I'm probably only about 25% done with Ship Upgrades. Heh.

Monday, April 4, 2011

Skill Ups

Mostly odds and ends taken care of today. I did finally add the code to give ship crew members a chance to gain skills upon completion of actions. So far I've added it to Planet Square Scans and Asteroid Scans.

Here's a screenshot of a report after a successful scan that shows the Science Officer increasing his skill.

I'm currently using the following formula to determine if you get a skillup:

ran(1,200) < (10.1 - Current Skill)*10 = + 0.1 skill increase

For example, if your skill is 0.1, then you have a 100 base chance to get a skill up. The system then gets a random number between 1 and 200. If it comes up less than 100, your skill goes up. I may make some skills harder than this, and will likely make it so that some skill can only go past 5.0 by participating in combat.

Using this method, it will take an average of roughly 800 to 1000 attempts to reach max skill level. This should translate into literally years of real time before a character maxes out the skill, especially with some actions that take a long time like Jumping to a new star system, which is the only way to raise the Astrogation skill.

Sunday, April 3, 2011

Weekend Update

The good news is I'm over my blah feelings from a few days ago. I just needed some time vegetating on the couch and some extra sleep and a few games of Axis and Allies : War at Sea with my son to clear my head.

No major updates in the last few days, but I have been working on a lot of small stuff that will eventually lead to some major changes.

One thing I did add this weekend was a new position to the ship's crew called Specialist. This position will be used to check for skills like Mining that will allow for better Gas Giant Scooping or Comet Harvesting. My vision for now is that most skills can only be raised during "field work" on board a ship, so if you want your mining outpost or colony to have a better mining administrator he's going to need to get some experience out in space first.

I also started getting the framework ready to implement Morale for ships and colonies. Morale on ships will decrease at a steady rate, likely 0.1 per 24 hours, but there are other things that can affect it in more drastic ways like a Misjump or being involved in combat. Ships will need to visit colonies and issue the Shore Leave command to raise morale. Ships with lower morale will face penalties in using the skills of their personnel, and ships with very low morale may face mutiny. This will basically be a way of removing unplayed ships from the game without the GM having to intervene. I'll probably have it so that 0.1 class ships that go to 0 morale just disappear from the game so there won't be too many of them clogging things up.

Friday, April 1, 2011

Blah

Nothing major today, just some small changes to help setup more work for the combat program and a few new colony modules. I'm fighting a small amount of burnout so I'm likely to take the rest of the weekend off and go out and enjoy the weather.