Showing posts with label ships. Show all posts
Showing posts with label ships. Show all posts

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.

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.


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.




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.

Thursday, September 12, 2013

Year 13 - Day 255

Still lots of combat work going on.  I'm doing some code refactoring as well while I'm working on the Retargeting Algorithm.  So far it works like this:

1.  Ship needs a new target.
2.  Is there only one ship left on the opposing side?  Choose that ship as target.  End.
3.  Get a list of all opposing ships.
4.  Sort the list by distance ascending.  Multiple ships at the same distance are sorted randomly.
5.  Pick the closest ship as the first "potential" new target.
6.  Check targeting preference for ship.  Does it prefer to target Armed or Unarmed.
7.  Check potential target vs. targeting preference.  If it does not match, choose next ship in list.  If it does match, set this ship as the Final target.
8.  After all ships are checked and none match preference,  set the original potential target as the Final target.

What this means is if the ship prefers to target Armed opponents, then if the closest ship is Unarmed it will go to the next closest ship and see if it's Armed.

Thursday, August 29, 2013

Year 13 - Day 241

I'm still working on the combat routine.  It was taking way too long for an armed ship to destroy the smallest unarmed, unarmored ship, so I adjusted the hit chances and damage up for Beam Lasers.  I'm afraid if it takes too long for combat to finish it will stress out the server too much if I ever manage to go live with the game.  It's going to require a lot of balancing regardless.  I may have to end up raising the damage and hit chances considerably or limiting the number of rounds that combat will run.

The latest code I've been working on is to create a page that will instantly create armed ships for testing purposes.  I've thought about rigging up an entire combat simulator, and I still may, but for now that would require a lot of extra work that I'd rather spend on just getting the combat routine completely fleshed out.

I'll end today's post with a recent screenshot of a ship that was destroyed in combat.  This is what you would see if you clicked on the name of a ship in your Dead Ship List.


Monday, August 19, 2013

Year 13 - Day 231

Game development reached an important milestone yesterday evening when the first ship was blown up in the game by the combat routine.  The IND Mobile Bay had the honors of being the first ship lost to enemy fire in the history of Project Libertine.

Even though the ship was blown up, the combat routine still tried to continue, so work continues on making the combat end properly when there are no enemy ships left.  In addition the game doesn't currently show destroyed ships properly, so a lot of work on the interface remains before my first pass at ship combat can be considered complete.


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.

Saturday, July 7, 2012

Year 12 - Day 188

I took a break for the last week or so due to the holidays and a small amount of coding burnout, but I got back into it tonight.

First up I was trying to kill a bug where all the new ships I was creating was starting with Morale set to 0, when it should have been 10.  At first I thought it was a problem with my SQL insert, but I checked everything and an almost duplicate default value for Ship Class was working fine, so I tried not using the default value on the insert and it still came up 0.  After over an hour, I finally started thinking "oh, it must be a bug with MySQL", which is almost always NOT the case, but after a while you start getting desperate for answers.  I finally figured out it was because I wasn't initializing the time for when morale was last checked for the new ship, so the game though morale for the new ship hadn't been checked since Jan 1, 1970, which caused it to go to zero instantly.  Bleh.

After that I started giving some love to the Shipyard functionality when a ship is landed at a colony.  I've got it cleaned up a good bit, and now I just need to make it use resources, which will likely be Starship Structural Units.  Initially I'm going to set it to New Ship Class * 100 Structural Units, so to go from 0.1 to 0.2 it will take 20 units.  These units will either have to be in the ship's cargo hold, or in the colonies warehouse if your ship is at a colony you own.  I'll post a screenshot soon.

Saturday, June 9, 2012

Friend or Foe Wrapup

I finished off the Friend or Foe functionality today and killed a few other bugs I found.  Each list is now limited to 10 entries, and I added error messages to let the user know why a ship didn't get added.  When the game eventually goes live, one of the perks for being a paying "Member" of the game is that the size of the Friend or Foe lists will be bigger.  I haven't even started adding any of that to the game yet, though.

To test the lists, I had to create a bunch of new ships.  None of them are armed, and to arm them I'd have to create a bunch of weapons by hand in the database.  So I think this might be a good point to veer off for a bit and work on the manufacturing part of the game for colonies.  I'll decide when I sit down at the computer tomorrow afternoon and fire up the editor.

Thursday, June 7, 2012

Friend or Foe?

As part of my current effort to actually have ships shooting at each other in the near future, I've been working on getting the Friend or Foe lists completed on the Ship Combat Programming page.

Basically, how it works is that each asset you own (ship, colony, or expeditionary force) has a Combat Programming page.  At the bottom of this page are three lists: Support, Defend, and Enemy.

If you're in the same location as an asset on your Support List, you'll join in on their side if they attack someone else.

If you're in the same location as an asset on your Defend List, you'll join in on their side if they are attacked.

The Enemy list will not let you automatically attack someone, since I'm going to require you to actually click a button to attack someone.  However, it will be useful in giving you more visual indicators that there's a possibly hostile ship in the same location as you, and will probably give you a small advantage if you're attacked by someone on your Enemy list.  I haven't worked all of that out yet.

Unarmed ships don't have a Combat Program, other than attempting to flee on round #1 or maybe an option to surrender immediately.  I'm still working out the details on that part as well.  You don't have to put your own ships on the lists, since an armed ship will automatically Support/Defend other ships belonging to the same player and/or faction.

Here's a screenshot of a current Combat Program page showing the Friend or Foe lists.  The top part of the page is still under construction.


Monday, June 4, 2012

Back

I spent last week on the beach near Gulf Shores, Alabama, and I was almost completely offline, so no work on the game happened, although I did come up with a few new things while I was relaxing on the beach.

Today I did some small polishing work on stuff like the Reports page to keep one part of my mind occupied while I mull over how to do a few things.  I started goofing around with the ship combat code a little and made a little progress there.  I can tell already that to get the combat the way I want it is going to be a huge pain in the ass, but it should be worth it.

I think I mentioned it before, but I decided to go ahead and write the combat code to include multiple ships per side.  I was going to do 1 vs. 1 to get started, but I think that to rewrite it afterwards would be almost as bad as coding it up in the first place.  So to do that, I'll have to code up more on the Ship Combat Programming, but that's a good thing.

Hopefully soon I can post a few initial combat reports.  Right now they're mostly just debugging statements.

Wednesday, May 23, 2012

More Weapons Work

I'm still working on the Ship Weapons page.  I've got it so you can install weapons from cargo into available turrets, and now I'm doing some work on items in general to actually require time to elapse while items are being transferred from cargo into a turret or back to cargo.  This will also let me finish up the cargo transfers and means a lot of the work will already be done once I start coding up the Market buys and sells.  Some of the same code will also be used once I start working on Manufacturing, so this is all significant progress that I'm making.

Tuesday, May 22, 2012

Weapon Systems Coming Online

I created the first weapons in the game yesterday, which were a few Beam Lasers.  Sometime later today they should be installed on a starship for the first time.

I was going to just develop the starship combat first for 1 vs. 1, but I've decided to go ahead and have it account for other ships joining in since it would involve a lot of rework later on.  This means I'll have to do a little more pre-work before I get started on the combat, but should be much more satisfying when it's done.

All combat will begin by one ship clicking Attack on another ships, but then friend vs. foe lists will be checked for any other ships/colonies at that location so if you have the defending ship on your Defend list, you will join in on their side.  Conversely, if you have the attacking ship on your Support list, you'll join that side.

Thursday, May 17, 2012

Updated Resumes?

One of the things I want to emphasize in the game is character development for the ship crews.  In order to do this I've started implementing personnel "events" in the game.  This will allow you to see a list of important events that have occurred to that character during play.  It will track things like being hired, fired, participating in a battle, discovering a new star system, etc.  This will also allow me to implement a sort of badge system, so characters can earn medals like battle stars for combat or a ribbon for making your 100th jump.  I plan to do something similar for ships as well.

Saturday, December 17, 2011

Gas Giant Scooping

For the past week or so I've been going through the game and fixing small problems, refactoring some code, and starting the process of getting everything moved over to the HTML5 standard, even though I'm not really doing anything that needs HTML5. Yet.

Tonight I finally jumped in and started doing some meatier coding, and I've finished up the ship action of Gas Giant Scooping by having a check performed so that before you can scoop you have to have an crew member on board with the Mining skill and that crew member must be assigned to the Specialist position on the ship.

I think my focus for now is going to be getting as much of the ship actions as possible coded out that don't involve interaction with colonies and combat. This is a blatant attempt to avoid working on the combat code since I'm still not exactly sure how I want combat to work.