Author Topic: August 2015 Development  (Read 9973 times)

0 Members and 1 Guest are viewing this topic.

Offline Nathan_ (OP)

  • Pulsar 4x Dev
  • Commodore
  • *
  • N
  • Posts: 701
August 2015 Development
« on: August 08, 2015, 09:54:35 PM »
Work still goes on with Se5a and Snoppy slogging through the ECS model, while I am trudging through getting game mechanics working. Terraforming and sensor work has been recently accomplished on that end, and survey mechanics are next.
 

Offline Witty

  • Chief Petty Officer
  • ***
  • Posts: 34
  • Thanked: 1 times
Re: August 2015 Development
« Reply #1 on: September 05, 2015, 08:32:24 AM »
Awesome work!
 

Offline ardem

  • Rear Admiral
  • **********
  • a
  • Posts: 814
  • Thanked: 44 times
Re: August 2015 Development
« Reply #2 on: September 08, 2015, 12:42:49 AM »
Great work keep plugging away guys
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: August 2015 Development
« Reply #3 on: September 08, 2015, 05:59:19 PM »
I've been messing with getting some sort of formula parsing going on for the json files.

So instead of having 12 different json files for each level of FuelConsumptionEfficency it has these fields:
MaxLevel = 12;
DataFormula = "1 - [Level] * 0.1";

This is even more useful for describing the ship components.

for an Engine it's going to have fuelConsumption so:
AbilityFormula = "TechData('8557acb9-c764-44e7-8ee4-db2c2cebf0bc') * Pow(Ability(2), 2.25)";

I'll paste the json code for the full component soon.

I'd been trying to avoid implementing this sort of parsing for months, but kept running into problems trying to jump through hoops both in the json definitions of things and in the code, I came to the conclusion I had to do it or we were going to have to refer to softcode/moddata in hardcode, which defeated the whole point of having softcode in the first place.

I'm using NCalc (https://ncalc.codeplex.com/) to parse the expressions and return the values. which is turning out to be just powerful enough to do this sort of thing without being too powerful and having to worry about softcode doing things it shouldn't, and requiring me to sandbox stuff etc etc.

The whole thing is looking like it's managed to crack a very hard problem I've been struggling with for the past several  months - trying to define component descriptions in json that will allow for the user to design a component during the game, and have the game then turn that into a component on a ship. it's been a bit up and down where I wasn't sure it was going to work or not. it's looking good at this point... crossing my fingers.
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: August 2015 Development
« Reply #4 on: September 09, 2015, 11:37:48 PM »
Sneek Peek at what the component definitions are starting to look like:

Code: [Select]
"Key": "e76bd999-ecd7-4511-ad41-6d0c59ca97e6",
"Value": {
  "Name": "Engine",
  "Description": "Moves a ship",
  "ID": "e76bd999-ecd7-4511-ad41-6d0c59ca97e6",
  "SizeMaxFormula": "50",
  "SizeMinFormula": "1",
  "SizeFormula": "5",
  "SizeGuiHint": "GuiSelectionMaxMin",
  "BaseHTKFormula": "Max(1, [Size] / 100)",
  "HTKGuiHint": "GuiTextDisplay",
  "BaseCrewSizeFormula": "[Size]",
  "CrewGuiHint": "GuiTextDisplay",
  "BaseCostFormula": {
    "List": [
      {
        "Key": "2d4b2866-aa4a-4b9a-b8aa-755fe509c0b3",
        "Value": "[Size] * 8"
      }
    ]
  },
  "CostGuiHint": "GuiTextDisplay",
  "BaseResearchCostFormula": "[Size] * 10",
  "ResearchCostGuiHint": "None",
  "ComponentAbilitySDs": [
    {
      "Name": "Engine Type",
      "Description": "Type of engine Tech",
      "GuiHint": "GuiSelectionList",
      "TechList": [
        "35608fe6-0d65-4a5f-b452-78a3e5e6ce2c",
        "c827d369-3f16-43ef-b112-7d5bcafb74c7",
        "db6818f3-99e9-46c1-b903-f3af978c38b2",
        "f3f10e56-9345-40cc-af42-342e7240355d"
      ],
      "AbilityFormula": "TechData('f3f10e56-9345-40cc-af42-342e7240355d')"
    },
    {
      "Name": "Engine Consumption vs Power",
      "Description": "More Powerfull engines are less efficent for a given size",
      "GuiHint": "GuiSelectionMaxMin",
      "MaxFormula": "TechData('b8ef73c7-2ef0-445e-8461-1e0508958a0e')",
      "MinFormula": "TechData('08fa4c4b-0ddb-4b3a-9190-724d715694de')",
      "AbilityFormula": "1"
    },
    {
      "Name": "Engine Power",
      "Description": "Move Power for ship",
      "GuiHint": "None",
      "AbilityFormula": "Ability(0) * [Size]",
      "AbilityDataBlobType": "Pulsar4X.ECSLib.EnginePowerDB"
    },
    {
      "Name": "Fuel Consumption",
      "Description": "From Tech",
      "GuiHint": "None",
      "AbilityFormula": "TechData('8557acb9-c764-44e7-8ee4-db2c2cebf0bc') * Pow(Ability(2), 2.25)"
    },
    {
      "Name": "Fuel Consumption",
      "Description": "Size Mod",
      "GuiHint": "GuiTextDisplay",
      "AbilityFormula": "Ability(2) - Ability(2) * [Size] * 0.002",
      "AbilityDataBlobType": "Pulsar4X.ECSLib.FuelUseDB"
    }
  ]
}

There's probably errors in the formula, I've not looked too closely at the Aurora formulas. (they're not really formula at all, so you've got to try figure out what formula is going to match the best)
   
 

Offline Jorgen_CAB

  • Admiral of the Fleet
  • ***********
  • J
  • Posts: 2822
  • Thanked: 673 times
Re: August 2015 Development
« Reply #5 on: September 11, 2015, 08:38:37 AM »
Would it be possible for you to list what will differ from Pulsar4X with Aurora feature wise during the first release of the game and perhaps some new future projection of changes to the game mechanics?
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: August 2015 Development
« Reply #6 on: September 11, 2015, 04:11:29 PM »
Harder, Better, Faster, Stronger?

Not really sure what you're asking. it's a little more amorphous and I don't know that there will ever be a 'First release', just lots of incremental little improvement releases and suddenly we have something playable, then it's just keep adding more.

Game Mechanics for the large part will remain as close to Aurora as possible, but with what I'm doing it will be very moddable.
 

Offline Jorgen_CAB

  • Admiral of the Fleet
  • ***********
  • J
  • Posts: 2822
  • Thanked: 673 times
Re: August 2015 Development
« Reply #7 on: September 14, 2015, 05:16:35 AM »
Ok, so it will be almost exactly as Aurora feature wise to start with.

How do you see that Pulsar4X could change in the future, do you have any ideas to change or add any particular game mechanics?
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: August 2015 Development
« Reply #8 on: September 14, 2015, 08:51:05 AM »
due to being able to do shorter tick lengths lasers may work differently, not sure how that'll be handled yet.
Also I'm not sure how ShipYards are going to work out either. those are a bit odd as far as internal mechanics go.
little minor things like increases in abilities as stuff is researched will likely end up a little different too, due to the formula thing it'll be a bit smoother.
for example Aurora MinEngine size vs Efficiency is (iirc) something like:
0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.25, 0.2, 0.15, 0.1
in pulsar it'll either be more linear:
0.9 -  0.1 * [Level]
or a curve... which I've not figured out a good formula for. (tbh this type of math is not my strong suit)


I want to do a Newtonion version, but it'll be a mod, and after we've got something playable.
I want to expand the civilian economy a bit more too, try flesh it out and make it a bit more interesting. 
 

Offline alex_brunius

  • Vice Admiral
  • **********
  • Posts: 1240
  • Thanked: 153 times
Re: August 2015 Development
« Reply #9 on: September 14, 2015, 09:15:24 AM »

for example Aurora MinEngine size vs Efficiency is (iirc) something like:
0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.25, 0.2, 0.15, 0.1
in pulsar it'll either be more linear:
0.9 -  0.1 * [Level]
or a curve... which I've not figured out a good formula for. (tbh this type of math is not my strong suit)

Perhaps not what your looking for but anyways...


I spent some time trying to figure out a General simple formula for engine size vs efficiency that would work and scale well down from a 0.1 MSP ( 0.005 HS ) missile engines up to a 100 HS giant capital engines.

Came up with this:

fuel consumption factor = SQRT(10/HS)

In both extreme ends it would mean missile engines consume around 3-6 times more fuel, fighters consume up to 3 times more fuel, and a size 50 engine consume SQRT(10/50) = 0.45  so just slightly more efficient then todays 50%.


This formula could in theory allow you build Fighters using the same engines that your 40 MSP capital cruise-missiles are using  ;D Or vice verse.
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: August 2015 Development
« Reply #10 on: September 14, 2015, 05:13:54 PM »
That formula was for the minimum selectable Power / Efficiency Modifiers.
It should be more like: 1.0 - [Level] * 0.05
(Where [Level] is the level of tech that the faction has researched in "Minimum Engine Power Modifier".)

Regardless, the example shows the limitations of a formula based system. (though I think the power of such a system vastly outweighs the limitation)
tricky stuff could be done with the 'Round(input, decimalplaces)' function as well though.

I've made a wiki page with some info on the component definitions and the parser here:
https://github.com/Pulsar4xDevs/Pulsar4x/wiki/Component-Definitions-and-the-JsonParser.
It assumes way too much about the knowledge of the reader at this point, but it's a start.
« Last Edit: September 14, 2015, 05:24:37 PM by se5a »
 

Offline Jorgen_CAB

  • Admiral of the Fleet
  • ***********
  • J
  • Posts: 2822
  • Thanked: 673 times
Re: August 2015 Development
« Reply #11 on: September 14, 2015, 05:35:50 PM »
Everything sounds really great so far.

In regards to engines it would be good if there was a curve going from the smallest missile engine up to the largest engines in some form.

The biggest problem that I have with the engines are that it is really prohibitively expensive research wise to build really large space engines for military ships. In some sense I feel there really need more reasons for building larger engines. Perhaps a negative modifier on ships based on amount of engines you put on them for power to weight ratio.

It currently are too man drawbacks of researching large engines and you might as well just make due with very small engines and put more effort into fuel efficiency research or building more harvesters.

A better civilian economy would also be nice, perhaps some more social interaction with planet population or some such. A minor tweak that I would like to see is a small annual wealth cost for all "commercial" classed ships run by the state, not those run by civilian companies. This would be maintenance and crew salaries. There need to be some cost to operate these ships so there also are some incentives to replace them more often.
« Last Edit: September 14, 2015, 05:48:02 PM by Jorgen_CAB »
 

Offline Nathan_ (OP)

  • Pulsar 4x Dev
  • Commodore
  • *
  • N
  • Posts: 701
Re: August 2015 Development
« Reply #12 on: September 14, 2015, 08:36:57 PM »
Would it be possible for you to list what will differ from Pulsar4X with Aurora feature wise during the first release of the game and perhaps some new future projection of changes to the game mechanics?

My goal is, as a baseline, to have a faithful representation of Aurora TN that is faster, with perhaps some UI changes, and the ability to alter balance with regards to TN resources, wealth, and habitable worlds, in a somewhat finer fashion than is currently available.
 

Offline MarcAFK

  • Vice Admiral
  • **********
  • Posts: 2005
  • Thanked: 134 times
  • ...it's so simple an idiot could have devised it..
Re: August 2015 Development
« Reply #13 on: September 14, 2015, 09:55:10 PM »
Is some kind of multiplayer system possible?
" Why is this godforsaken hellhole worth dying for? "
". . .  We know nothing about them, their language, their history or what they look like.  But we can assume this.  They stand for everything we don't stand for.  Also they told me you guys look like dorks. "
"Stop exploding, you cowards.  "
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: August 2015 Development
« Reply #14 on: September 14, 2015, 09:56:49 PM »
The ECS branch has been written with that in mind.