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.