SpaceTradersAPI / issues-and-suggestions

16 stars 1 forks source link

Current implementation of "FUEL" isn't very user friendly #113

Closed kurt1288 closed 1 year ago

kurt1288 commented 3 years ago

Fuel is currently in a sort of "catch-22" situation. You need to know how much fuel to buy for a flight plan but you don't know how much fuel to buy before trying to create the flight plan.

This gives a user basically has 4 options for buying a required amount of fuel for a trip:

  1. Try to file the flight plan and then use the returned error for buying the amount fuel that's required.
  2. Manually fly and record fuel costs for every route with every ship.
  3. Manually figure out their own calculation for estimating fuel costs.
  4. Get a fuel calculation from the community.

Number 1 is brute-forcing and basically requires 2 requests for each flight plan, one of which will result in an error. You also can't use this method in an automation that buys a maximum quantity of a good, as the maximum depends on the amount of fuel needed for the next flight plan (so you can't buy fuel after buying the good). Not exactly ideal as it means more work for the server (and increases the number of errors on the server), but it will always get a guaranteed number back to the user.

Number 2 also means a guaranteed correct number but it means storing a lot of data on the client and still means reverting back to number one for new ships and new routes. And of course if something on the server changes, these numbers are all invalidated.

Number 3 is probably the least user-friendly as it requires a decent amount of manual time and a the mathematical know-how about how to figure out a calculation given the set of data.

Number 4 isn't particularly difficult but I don't think it's fair to expect users to go to the community just to figure out how much fuel to buy.

Proposed Ideas?

Two ideas:

  1. Remove fuel entirely and have fight plans cost a credit amount. Credits are already used to buy fuel but since a user already has the credits available, it's not something they need to estimate before creating a flight plan. This would also reduce the chance a person strands a ship (like at a wormhole where they can't purchase more fuel). A possible downside is that if a user does want to estimate the credit cost, they still run into the above issues.
  2. Have a separate API route for getting the fuel required for a flight plan between two locations given a specific ship. Downside here is that it's two server requests again, but at least one isn't always an error.
TheMadBotter commented 3 years ago

Agreed with the issue. Every player is guaranteed to run into this and it's the most common question on Discord. I propose a different solution: publish the fuel calculation logic, which is already a public secret anyway.

From a balance perspective: players can already trivially get the fuel required through option 1 or 4. Publishing the logic won't really make the game easier, it will just save players an extra API call (or a visit to the Discord server).

From a realism perspective: we can get a very good estimate of how much fuel a spacecraft needs. In-game it's apparently possible to know exactly when a ship doesn't have enough fuel. It only makes sense that a ship manufacturer would share its fuel consumption with prospective buyers.

Of course this estimate doesn't have to be exact. There could be a small amount of variance, combined with consequences for not packing enough fuel (the ship gets stranded in deep space). But I'm not sure whether that would make the game any more fun.

kurt1288 commented 3 years ago

Another thing that seems to be an issue is locations possibly not having fuel (either because it's a wormhole or because a player has bought all the fuel at the location). I see people on Discord handling this by buying double the fuel, but that's an extremely hackish solution. This de facto makes every trip cost double the fuel which I'm sure is not intended.

It also creates the possibility that a new player inadvertently strands all their ships and is unable to buy more to save them.