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.

Tuesday, April 14, 2020

Year 20 - Day 105

So I haven't posted many screenshots recently so here's a look at what you might see when you're getting ready to do something with one of your ships that is On Station in Star System. The green square indicates where you are, which is in the same square as a terran type planet. The red square is where the mouse is hovering over a Ferrinian type planet and you can see some information about it near the middle of the screen.

On the left is the list of actions you can do at that moment, including a quick list of major things in the system that you can quickly set a waypoint to. It does not include minor objects like moons or asteroid fields or comets.

Each star system is 75 by 75 squares and is divided up into 9 sectors for reference purposes. The map is draggable with the mouse or you can click on the smaller sector grid to quickly scroll to that sector.



Last night I completely wrapped up the Comet Harvesting code and tested it out. You first have to find a comet, after which it may go out of phase, but they are usually in phase for 25 to 35 days before they go out again. Then you move to the same space square and initiate Harvesting from the action panel as long as someone has the Piloting skill on the ship. You can also have the Captain, Science Officer, or Specialist with the Mining skill to help out, but that is not necessary.

At the end of the 8 hours, a skill check is made for Piloting and Mining. A critical pass on either one will boost how many Monopoles you find significantly, while a Pass on the mining will boost it by 10%. A critical failure will cause a 10% loss but no damage to the ship since this is considered more of a low level risk activity. Below is a sample report from a comet harvest.



Sunday, April 12, 2020

Pagination on Ship's Log Page

Today I added Pagination to the Ship's Log Page so you can scroll through all the events at your leisure without slamming the database too hard on each page load.


Year 20 - Day 103

After many years of being on the ToDo list, I've finally implemented Misjumps for ships that are attempting to jump to a different star system via IAP. There are many factors that influence the chance of a Misjump happening, which include:


  • Size of Ship - the bigger the ship, the more likely it is to misjump.
  • Stability of IAP - some are more unstable than others
  • The Astrogation skill of the Navigator or Captain of the ship.
  • Damage to Jump Engine - this can be bad, very bad.

Depending on how bad your chances of mis-jumping are, the misjump is rated from Minor to Catastrophic. Consequences can range from much longer jump times, damage, and ending up nowhere near where you thought you were going. Damage can be enough to blow up a ship.

Speaking of blowing up ships, I've added another item to the list that when a ship blows up because one section has been destroyed, it won't just disappear. A "wreckage" asset that belongs to no one will be created that can be found by scanning and scavenged. This can result in finding damaged modules and cargo.

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.

Saturday, June 23, 2018

Year 18 - Day 174

Way back when I was first designing this game I knew how I wanted the planet surfaces to look, but I was still struggling on how to display asteroid fields. I wanted them to be rich and complex, and it finally hit me that I should display them in a similar way to how I do planets. Unfortunately, I didn't take the idea far enough at the time and realize that asteroid fields were displayed exactly like planets, so I wrote two separate pieces of code and different database tables to handle them.

Now I'm going back and rectifying this situation, but it's involving a significant amount of code remediation. At the same time, I'm applying some of the better coding habits I've learned over the past 5 years or so and trying to beat this huge pile of crappy PHP code into shape. It's a lot of effort, but should make implementing the rest of the game and debugging it much easier going forward.

Wednesday, October 11, 2017

Year 17 - Day 284

I set out to just add a simple feature on the ship screen to show what a square with a purple outline meant. The purple outline means you've done a mineral scan on that square and there was nothing on the screen to indicate what it meant to the player, so I was just going to add a purple square off to the side and put a label that said "PSMS Peformed" next to it.

I realized that's not really exactly what I wanted to do, so I was off down a rabbit hole adding new functionality before I knew it. I already had a popup area that showed when you were over a colony on the planet, so I wanted that same popup to show the results of lack thereof for a PSMS (Planet Square Mineral Scan). While I was doing this I realized I had designed the database tables badly with too much overlapping information, so I ended up dropping several columns and adding some to other tables and then had to go back through all the other screens to see what that broke.

In the end, when you scroll over a planet square with the cursor that has been scanned, the information will now show up, as seen below. I think it worked out much better than just putting a purple square on the screen and then you having to go to another screen to see what was up.


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 27, 2017

Radiation

I made a decision today to drop Radiation as an overall stat for a planet, moon, or asteroid field. I think it will be better implemented as an individual "hazard" for a specific square of those objects. So if you're scanning a planet square you may discover while reading the report from your science officer that the square you just scanned has "higher than normal radiation levels" or somesuch techno-babble. This means more work for the world builder (me), but I think it will be better in the long run.

Monday, September 25, 2017

Year 17 - Day 268

As I peel the layers of the onion back while working on the colony design and coding, I tend to come to a point where I need to go and work on something else in order to fully develop what I've been working on.

I recently came to this point with colony population growth. I need to figure out what the survivability factor is for a given colony on a given planet, and I realized I never finished putting in all the descriptors in for planets. I had only added Atmosphere type and neglected to add Gravity Rating, Radiation Rating, Temperature, and Tectonic Activity. I may leave that last one out from the general planet description and just add tectonics to certain locations on the planet for the sake of simplicity. I'm also going to add a rating for the amount of sunlight or luminosity that is reaching the planet's surface, but that will be a calculated value based on the distance from the sun and the atmosphere and will require more research.

I did some research looking for planetary temperature ratings systems and found this site:

A Thermal Planetary Habitability Classification for Exoplanets

which offered a great system for rating the temperature of planets that is very authentic and geeky at the same time. So I lifted it whole hog and added it to the game.

Here's a screenshot of what I have so far. I still need to add the other values and I'm toying with the idea of doing a redesign of this screen where I move the top info container over to the left side.


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.)

Friday, August 25, 2017

Year 17 - Day 237

It's been a while since I worked on the game, but I've been getting back to work the last few days. The first few days back always involve me going through the game as it currently exists and fixing some small bugs and adjusting a few things.

I've settled down to working on colonies for now, mainly the concept of Man Hours and how they are used throughout the colony. Here's a quick overview of how it will work.

Each sentient lifeform in the colony will be totaled up. This will not include named characters. Each species has a value for baseManHours. For Human Colonists, this is currently set to 0.9, although it won't likely stay at that number.

So if you have 1000 Human Colonists, they would currently provide 1000*0.9 = 900 Raw Man Hours that could be used to run colony modules or factory queues or mining operations. The final number will also eventually be multiplied by Colony Morale which could increase or decrease the final number. There will also likely be technology or special abilities that will influence these numbers as well.

Morale will be fairly complicated and will include such things as colony type and location, how often the colony is attacked, goods and luxury items given to the colonists, and also tech and special abilities to some extent. Morale will be allowed to go from 0.01 to over 1.0, so it can vastly help or hinder how efficient your colony is.

Below is a screenshot of some of the early work on colony population, showing the different Man Hours generated by Human Colonists vs. Enslaved Humans.


Tuesday, March 14, 2017

Year 17 - Day 73

Spent some time tonight working on comets and the Comet detail screen. Below is my current layout for it. I plan on adding some more information other than monopole density, but need to do some more game design around that first.

Currently comets are not seen on the star system map unless you've discovered it or bought the discovery from someone else. To discover a comet you'll need to be within one square of it when you perform a scan.

I'm toying with the idea of having comets also provide small amounts of He3 along with magnetic monopoles. This will make them a bit more interesting.

I'm really toying with an idea of having comets have periods in which they disappear and reappear from the system map. I need to game that idea out some more and see how it's going to work. Currently I don't have ships orbit a comet to interact with it, but may consider changing that. My only issue there is that it may give ships a sort of hidden base to orbit where other ships can't see them.




Thursday, February 2, 2017

Year 17 - Day 33



I've been drifting about working on some of the content design items recently. Tonight I got busy and after fixing a few bugs I created a screen to help me track IAPs and then created a routine to randomly generate comets for a given star system. Below is a test run for one corner of the Marvin(1) system. I've got a small bug on the Details section in this screenshot, but it shows results nicely.

I'll probably tweak the code a bit so that two comets won't show up directly adjacent to one another.

Comets will be places to harvest Monopoles and possibly contain anomalies and other adventure nodes. Comets will not display on the screen until you've discovered them by performing a scan within one square of a comet, or you purchase a copy of a scan someone else has done.



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.