Showing posts with label colonies. Show all posts
Showing posts with label colonies. Show all posts

Thursday, May 21, 2020

Year 20 - Day 142

Sorry for the dearth of updates recently. I've been a little busy with other things but I have managed to do some coding almost every day recently. The vast majority of the recent work has been on colonies and colony management. The biggest deal was implementing colony morale and having it affect things like the amount of manhours available to run the complexes. If your people aren't happy, they don't work as much, so you may not have enough labor to go around.

I've also been shifting some screens around and trying to consolidate them to provide more useful information about the colony to the player, as can be seen in the following screenshot.


Right now Morale modifiers are only being affected by certain complexes and the Management skill of the Governor of the colony. As you can see, each level of Mining, Factory, or Processing complex will reduce morale. Eventually I will also add a negative multiplier for having more than one type of these complexes. So if you have Factories and Processors, you will have a penalty. This is to encourage colonies to specialize and not try to do everything at the same colony.

Eventually there will be "Effects" that can also alter colony morale, such as giving them certain items or if certain events take place. So if you give them a Euphoria drug then it may give you a week of +5 morale, as long as you've given them enough for the population.

I've also started buying more artwork from a talented artist I hooked up with in Argentina. I'm not ready to show it off yet, but I think it's really going to make the colonies look good once he's done.

Saturday, April 25, 2020

Year 20 - Day 116

I've been working on a lot of stuff recently and still making good progress. What I've actually been working on has been all over the place, but the last day or so has mostly been concentrated on colonies.

I decided to rename Colony Modules to Colony Complexes to better differentiate them from Ship Modules. That was more involved than I thought and along the way I've finally gotten around to implementing some things that haven't been there yet.

In the screenshot you see a colony that has two Manufacturing Complexes. One is level 5 and the other is Level 2, so this colony would be able to produce 7 things at once. Unfortunately, this colony does not have enough colonists to produce enough manhours, so the second complex is operating at a much lower efficiency. So each one is building the same item, but the second one will take much longer to do so.


Available manhours at colony will be a fairly complicated affair, and will depend on what complexes have been built, where the colony was built, morale boosting items given to the colonists, and even what type of colonists are present. It should present an interesting challenge to colony governors.

Wednesday, April 1, 2020

Year 20 - Day 92

Been a rough start to the year. Got divorced. Had triple bypass surgery. Covid-19. I've been stuck at home a lot for the last 11 weeks so I've gotten back to work on the game after another long break.

To start with, my host upgraded the PHP version so I've had to remediate thousands of lines of code just to get back to basic functionality. Add to that not seeing the code for several years and I've been balls deep in my own crappy PHP code for weeks now. I've even found lines of comments where I was trolling myself from years ago.

Anyway, I've finally got just about everything remediated and I've been cleaning up the code as well, trying to save myself some technical debt down the road. I've actually started working down the huge list I keep on Trello and adding some new functionality to colonies and to ships.

Most of it revolves around building new colony modules and exploring comets. I've also started pondering the way I want to implement the tech tree again and have made a few other decisions around combat, but I haven't started touching that mess of code yet.

Anyway, no idea when/if I'll finish, but it helps keep me sane and distracted in this crazy ass year 20.

Sunday, October 1, 2017

Year 17 - Day 274

Not many major coding changes this weekend so far. I've mostly been killing some more bugs and adding a few minor features I'd neglected previously like sending a report when your upgrade your ship and also adding it to the ship log.

I did finally figure out how I'm going to make Ship Morale have some meaning in the game. I don't want to take away someone's ship just because morale has finally hit rock bottom, but as the ship's morale heads downwards it will affect the crew's efficiency so tasks will take longer. It will probably be in brackets instead of just using the morale as a percentage multiplier. So once the (1 - 100) morale goes below say, 75, things will start taking longer. Maybe a 10% slow down at that point. Once it hits zero you can probably look at things taking double the normal amount of time. 

Morale will still have a major effect on combat, and you probably don't want to try Jumping to a new star system with a ship whose morale is in the gutter. It's not good to be sloppy when entering jump space.

Granting Shore Leave at a colony or space station will improve morale tremendously on a ship, although it will be a 12 hour or so action and cost the ship money, most of which will go to the colony owner, depending on the level of the Entertainment district at the colony. Just letting the crew blow off some steam at a mining outpost with no Entertainment district will help some, but some of the larger colonies will have higher level amenities that will top that morale quickly.

Wednesday, September 20, 2017

Year 17 - Day 263

Lots of bug killing going on the last day or so. It turns out that when you start actually testing your game like you were a player you find all kinds of problems. Who knew?

I recently created a new mining outpost and transferred some human colonists to it and it has generated zero ore, so there's something I've missed in the outpost setup or the mining code.

Still, there's some good progress going on, even if my Trello board is starting to get pretty crowded with work to do.

Monday, September 18, 2017

Year 17 - Day 261

Still working primarily on colonies, and making progress and killing a lot of bugs along the way. I found I had designed and coded myself into a bit of a corner at one point last week, but after talking it over with a friend I finally came to a decision.

I want there to be a clear advantage to building an "Open" colony on a world that will allow Human Colonists to live without very much life support. So an Open Colony will be cheaper to construct in materials and will allow 5 Module slots per level. A Domed Colony or a Space Station will be more expensive to construct and will only allow 4 Modules per level.

The problem I ran into was that I had Five basic modules that I wanted to be in a mining outpost: Mining Module, Warehouse Module, Habitation Module, Nuclear Reactor Module, and a Landing Pad. I needed to get this down to four modules if anyone wanted to build on an airless moon or an asteroid, so I decided to get rid of the Landing Pad. This means that loading/unloading will automatically take two times as long at a colony without a Landing Pad, but it also makes some sense in game turns as well. A newly built Open outpost will also not have a landing pad, but there will already be an empty slot where one can be built if so desired.

Here's a picture of the first Domed Outpost that was built entirely within the game by a landed ship. No database manipulation was required.




Wednesday, September 6, 2017

Year 17 - Day 249

The sentient population of colonies is now increasing weekly based on the fecundity rating of the species. Currently I only have two types of "species" in the game: Human Colonists and Indentured Humans for the more evil players. There will be more to come.

Human colonists have a fecundity rating of 1, while their indentured brethren are rated at 1.2 for now. This is not to make an advantage for unscrupulous colony owners, but will probably cause them to have to jump through more hoops to keep the unwilling workers happier and under control.

Currently a colony checks each population group at exactly one week intervals to see what the fecundity rate is for that group of species and whether they should grow or shrink. The rate can be affected by morale, overcrowding (which also affects morale), and even certain items that have been made available to the population.

By way of explanation for this last feature, each colony governor will be able to Assign certain items as being given to the colony population at large. Each item can have different effects on different species. So an aphrodisiac for Human colonists may raise their fecundity rating, but may lower the morale of another alien species group at the colony, so can have both good and bad consequences.

I'm excited to be moving into the time where morale of a colony population will start to have a real effect in the game. I'm looking forward to creating new items and tech for these purposes. 

Monday, September 4, 2017

Year 17 - Day 247

I got a lot of coding done today on colonies. First I killed some bugs related to mining and the onscreen updating of the current stockpile. I left one variable in an equation that was doubling the rate calculated on the server versus what was being displayed by the player. That one took a while to find.

After that I've implemented the Priority rating for each colony module and made some updates to the Colony Overview screen that is the first screen a player will see when they click on their colony. The screenshot below is what it looks like in its current state. I've still got to add some more bells and whistles to the screen, but the button in the Man Hours section is fully functional and will appear when there are surplus man hours available and not every module has enough man hours assigned to it.

The button calls a method that will sort all of the modules by priority then moduleID in ascending order. So a module that is Priority 1 will go before a Module that is Priority 10. If two or more modules have the same Priority, which they will by default, then the oldest module will take priority, so the module with the lowest serial number.

If the manhours available ever drop below what is the current total for all modules, the game will automatically call a similar method that will run in reverse and remove man hours from each module until everything is rebalanced.

Power allocation will work in exactly the same way, and is the next thing on the list to be worked on after some more man hour tweaks.


Friday, September 1, 2017

Year 17 - Day 244

More colony work going on, and a little bit of work on some admin tools. I can now assign man hours to individual colony modules, and the lack of enough man hours for your Mining Module can now seriously cut into your hourly yield. Each species has a base amount of man hours per individual, and this will eventually be affected by the morale.

Because the amount of man hours, and eventually, power, at a colony can fluctuate, I'm working on coming up with a way for the player to prioritize which modules will lose labor or power first in case there is not enough. For now I think I'll let the player assign a value from 1 to 10 for each module, with the initial default being 1.

Then, when there is not enough labor or power to go around, the game will look at priority 10 modules first to make cuts, then work its way down to priority 1 last. In case of a tie, priority will go to the older module.

I'm also thinking about having morale being calculated for each group of species at a colony. So giving items to the colonists that makes the 1000 human colonists happy might make the 4000 Wookies unhappy and lead to bad things.

(No, there are no Wookies in my game.)

Thursday, January 26, 2017

Year 17 - Day 26

The last few days I've been working on various small items and polishing off some defects. I have taken some time to re-examine the colony mining code that I completed last week and decided to make some changes.

I had originally planned for a colony to have a Mining Module that could be upgraded to Level 10, and at each level a new Automated Mining Unit (AMU) could be inserted. Each AMU would basically produce the effective deposit yield, which would be affected by things like colony morale, damage to the AMUs, and the Mining skill of the Mining Administrator.

I realized this was just over-complicating things a bit, so I changed it so that each time you upgrade the Mining module it will take one AMU to do so. The damage multiplier will then be determined by the damage level to the complex as a whole instead of individual items making it up. This will also simplify the combat code later on when I add colonies to the combat system.

I also started coding the basic framework of Manpower Hours for colonies and realized I needed to rethink how I was handling colonists. Colonists are basically treated as "items" in the game as far as the code is concerned, but I don't want them to take up space in the warehouse of a colony.

So then I started thinking "do I want them to take up space in the cargo hold of a ship?" So now I'm trying to decide if I want to change it so that colonists and other life-forms have to have a specialized ship module and can't go into a Cargo Module. So it would be something like a Passenger Module, which is where any lifeforms besides the Crew on a ship would be stored.

One consequence of this would be that a newbie ship, which can only have one module, would not be able to carry both cargo and lifeforms, other than the crew in the Command Module. I'll be pondering this one for a bit.

Tuesday, January 24, 2017

Year 17 - Day 24

Wow, I didn't update at all in 2016. That's mainly because I made very little progress on anything. I've been back at it for a few weeks since the Christmas holidays and I'm beginning to make progress again.

Today I finished up a major component of colonies: Mining.

Any colony can build a colony module and upgrade that module to a maximum of Level 10. For each level you can install an Automated Mining Unit which will allow you to harvest the yield of the deposit the colony is sitting on. So if your colony is sitting on a Metals deposit that yields 10 / hour and you have a level 2 Mining module with 2 amu's installed you would be mining 20 metal ore per hour.

In the screenshot the deposit shown is much larger than it would be in the game. I want to make a conscious decision that it will be extremely difficult if not impossible for a colony to be self-sufficient just on the deposit it is located on. This should encourage trade and exploration. 

I still haven't implemented the Manpower functionality for colonies, but eventually you will have a certain amount of Manpower Hours based on your population and the morale of the colony. You can then assign those hours to various modules and their efficiency will be determined by how well they are staffed. 

Tuesday, January 15, 2013

Year 13 - Day 15

I'm slowly getting there.  I try to write at least a few lines of code each day.  The colony side of the Market system is almost finished.  Then I'll work on the Ship side of it before I get back to working on Combat.

Part of the complication lies in the way I'm handling items.  I have "stackable" items like mineral ore, which are basically one item with the quantity field set to > 1.  Non-stackable items have a damage rating, which ranges from 1 to the total mass value of the item.

This system works fine until it comes time to sell or buy non-stackable items.  The issues are:

1.  I'd have to list the current damage rating so the buyer can be sure they're not buying a damaged item.

Solution:  Can't sell damaged items on the market screen.  They'll have to be "sold" via colony pickups and money transfers.  This may actually lead to a little more complexity since I may have to add an escrow system, or I could let a player organization handle this.

2.  If I list that I want to buy 20 Jump Engine Modules, it becomes more complex to decide which 20 engines a seller wants to sell out of his inventory, both for the UI and the code behind the scenes.

Solution:  Items are "sold" to a colony from the ship's Inventory screen, where non-stackable items are listed individually and will have a price next to them if the colony is willing to buy that particular item.

3.  Listing multiple non-stackable items for sale will add a lot of clutter to the market screen.

Solution:  Not really sure on this one yet.  I guess I'll have to add some type of robust filtering system to the market screen.  I may have to play around with it a bit to see what works best.

Sunday, January 6, 2013

Year 13 - Day 6

I just finished off 95% of the colony Pickup Orders functionality.  I'm sure I missed something and I still have to test it out a lot, but right now a colony can issue an order to allow another player to pickup items at the colony.  A message is sent to the other player letting them know this, and he can send any ship he owns to the colony to pick the stuff up.

I still need to work on the UI of the colony end a bit, and item transfer itself still has a good chunk of work to be done, since right now transferring items takes no time to complete.  Eventually it will take an amount of time to transfer an item based on it's mass, with the Cargo skill helping to speed this up some.

Sunday, December 23, 2012

Year 12 - Day 357

I just returned from a 9 day trip out of state including a week in Disney World, so work on the game has been on hiatus for about two weeks.  Fortunately, a friend has started doing some play testing for me, so I'm getting a lot of feedback and finding some serious bugs that never would have shown up without multiple people playing at the same time.  The fact that someone is actually willing to spend some time playing the game is exciting to me also, since it means it's close to being a real game that people will be interested in playing.

My focus for the next few days will be to get colony pickup orders working, so I can transfer some material to the test accounts.  This will let me avoid having to create items directly in the database and transferring them over, which should save some time and also get important functionality up and running at the same time.

Then I'll get back to the combat program.  It's progressing nicely so far, and actual damage is being done to ships.  Ships aren't quite being destroyed yet, but that should be in soon.  I'm hoping to reach a point in the next week or so where I can let combat run past the hard 5 turn limit I have now and end programmatically instead.

Wednesday, October 3, 2012

Year 12 - Day 276

I'm currently working on the Colony market screen.  By tomorrow a colony owner should be able to enter new market orders and have them show up on the list.

Thursday, July 12, 2012

Year 12 - Day 193

I continued some work on the colony Market screen today.  I added the market orders table to the database and have orders displaying on the screen.  I found I designed myself into a slight corner, so I'm going to have to rework a little bit of stuff around items, but it's nothing major.  I'm thinking by the end of the weekend most of the buy/sell functionality should be finished off.

Tuesday, July 10, 2012

Ship Upgrades

I finished off almost all of the Ship Upgrade functionality today.  When ships upgrade, they use the correct amount of Starship Structural Units that must be in the cargo hold of the ship that's being upgraded.  I changed this just to make my life easier on the code, plus it frees up warehouse space in your colony.

The only thing that's missing is the ability for ships belonging to another player to use your shipyard via Upgrade Authorizations.  To do this I need to create the Shipyard screen, but I got distracted by stubbing out the Market screen as well.

With Upgrade Authorizations, you'll be able to allow another player to use your shipyard to upgrade to a certain level at a certain price.  You'll also be able to make it an Open shipyard that anyone can use at a certain price.  Along with the maximum level, you'll also be able to set a limit on the number of times a player can use it.

The Friend or Foe lists will also come into play here with options to allow ships on your Defend/Support lists to upgrade and of course to prohibit ships on your Enemy list from using the shipyard.

Year 12 - Day 191

So obviously I shouldn't make game decisions late at night after starting at code too much.  Making the ship upgrades cost 100 Ship Structural Units per level meant a ridiculous amount of materials would be spent at higher levels just for the ability to add another module onto the ship.

So the way I've got it setup now is that it takes 10 SSUs to go to the next level, but if you're going up at new base level (i.e. 1.9 to 2.0) then it takes 30 SSUs.  This takes into account that the new base levels allow you to also add another Engine or Command module.

I'm going to do the same thing for how much time it takes to upgrade ships also.  There will be a built in 1 hour to take into account moving the ship in and out of the shipyard, then it will take about an hour for an upgrade that doesn't increase the base level, and three hours for one that does.

So going from 0.1 to 0.2 will take about two hours.  Going from 0.9 to 1.0 will take about four hours.  There will likely be skills for personnel at a colony that can modify this down a bit, so a colony that is more experienced at upgrading can get you in and out faster.  I may also have it so a colony can specialize in Building or Upgrading so that you're faster doing one over the other.

Monday, June 18, 2012

Year 12 - Day 169

So after what was pretty much a lost weekend due to Dreamhost screwing up the servers all weekend long I was able to finish off most of the Manufacturing functionality today.  I've still got to make it actually use up materials and do some more polishing, but right now I can pick an item from a list and have the colony start working on it.

So far I've worked it that you will build Factory Modules at your colony.  The module can have a number of build queues equal to it's integer level.  So a 1.2 module can have one queue, and a 2.7 module can have two.  Once you start building, any needed materials are moved into "Reserve" status, so they still take up space in the Warehouse, but can't be used for anything else.

If you choose to build 200 Structural Units, then it will build each one individually until they're all completed.  Partial builds will be available as soon as they're completed, so if you start building 200, then about five minutes later you'll have 1 new Structural Unit in your warehouse, and 199 left to build.

I've also nailed down the item hierarchy.  It will consist of four levels:

I : Raw Materials (example: Base Metals Ore)
II : Processed Materials (example: Processed Base Metals)
III:  Manufactured Components (example: Electronics, Structural Units)
IV: Manufactured Items (example: Jump Drive, Laser Cannon I)

Each level will be composed of 1 to 3 different types from lower levels.  So Processed Base Metals will take 2 Base Metals Ore.  There will likely be Technology that will lower this ratio.  Structural Units may take 1 Processed Base Metal and 1 Refined Hydrocarbons.

Here's a screenshot of some build queues in action.


Monday, June 11, 2012

It's Alive!

Earlier today, the colony Fort Jackson in the Marvin(1) system finished the first manufactured items in Project Libertine:  It created 26 units of Processed Metals Ore.

Of course, I had to manually enter the build order into the database, but it is currently chugging away on that build queue, creating a new unit every 600 seconds.  It's also not using raw materials yet, but that's just nitpicking, right?

I'm hoping to have the manufacturing code wrapped up by the end of the week, and then dive right into writing the Mining code, which should involve a lot of copying and pasting of code, so hopefully it will go faster.

I also created the first 1000 Human Colonists today, but they're not doing anything as of yet.  Eventually they will provide man-hours needed by the factories and mines.