Aurora 4x

Other Games => Pulsar 4x => Topic started by: Nathan_ on August 08, 2015, 09:54:35 PM

Title: August 2015 Development
Post by: Nathan_ 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.
Title: Re: August 2015 Development
Post by: Witty on September 05, 2015, 08:32:24 AM
Awesome work!
Title: Re: August 2015 Development
Post by: ardem on September 08, 2015, 12:42:49 AM
Great work keep plugging away guys
Title: Re: August 2015 Development
Post by: se5a 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.
Title: Re: August 2015 Development
Post by: se5a 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)
   
Title: Re: August 2015 Development
Post by: Jorgen_CAB 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?
Title: Re: August 2015 Development
Post by: se5a 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.
Title: Re: August 2015 Development
Post by: Jorgen_CAB 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?
Title: Re: August 2015 Development
Post by: se5a 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. 
Title: Re: August 2015 Development
Post by: alex_brunius 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.
Title: Re: August 2015 Development
Post by: se5a 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.
Title: Re: August 2015 Development
Post by: Jorgen_CAB 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.
Title: Re: August 2015 Development
Post by: Nathan_ 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.
Title: Re: August 2015 Development
Post by: MarcAFK on September 14, 2015, 09:55:10 PM
Is some kind of multiplayer system possible?
Title: Re: August 2015 Development
Post by: se5a on September 14, 2015, 09:56:49 PM
The ECS branch has been written with that in mind.
Title: Re: August 2015 Development
Post by: MarcAFK on September 14, 2015, 10:02:18 PM
I've been thinking of the multiplayer potential aurora has, there's a few options which would require massive changes, or automated and abstracted battles. Or going completely real time.
Title: Re: August 2015 Development
Post by: se5a on September 14, 2015, 10:51:45 PM
yeah, another thing that the ECS branch does already is proper threading , though I expect main also doesn't have the problem that aurora has of reading/updating the ui while ticks are being processed. so while not 'realtime' it will be able to do a constant tick rate without the player drumming is fingers not being able to click anything.
How well it'll handle orders being given that are no longer valid is still something that we'll need to think about. that part has not yet been designed.

half decent individual unit AI is high on the list of features, since I hated battles in Aurora due to the micro.
Title: Re: August 2015 Development
Post by: alex_brunius on September 15, 2015, 02:53:46 AM
yeah, another thing that the ECS branch does already is proper threading , though I expect main also doesn't have the problem that aurora has of reading/updating the ui while ticks are being processed. so while not 'realtime' it will be able to do a constant tick rate without the player drumming is fingers not being able to click anything.
How well it'll handle orders being given that are no longer valid is still something that we'll need to think about. that part has not yet been designed.

half decent individual unit AI is high on the list of features, since I hated battles in Aurora due to the micro.

Good priorities!

I'm really stoked for just a potential that there might be Aurora like Multiplayer in the future. For inspiration you can look at Paradox games like Hearts of Iron series that have a few preset tick times + pause option to handle more quiet times. Despite each tick being one hour ingame time it feels like a pauseable realtime game.

I am a frequent participant in Multiplayer in games like this and a single game can go on for half a year with scheduled weekly sessions of 3-4 hours realtime, so it's pretty Epic!

It's a compromise though I don't see any reason it could work with Auroras system if you also add a second scale of tick size ( It's not feasible performance wise to run through millions of 5sec ticks in quiet/peacetime just to have that combat resolution ).
Title: Re: August 2015 Development
Post by: exdeathbr on September 15, 2015, 07:21:52 PM
I've been thinking of the multiplayer potential aurora has, there's a few options which would require massive changes, or automated and abstracted battles. Or going completely real time.
Real time can be just click on the button to pass 5 seconds, every 5 seconds, i mean even if pulsar dont go true real time, this could be an option.

Also same country multiplayr would be a very cool feature, new players could play together on same country, in this care they spread the complexity of the game between two players and learn how to better play the game together with another player(s).
Title: Re: August 2015 Development
Post by: se5a on September 15, 2015, 08:21:17 PM
Also same country multiplayr would be a very cool feature, new players could play together on same country, in this care they spread the complexity of the game between two players and learn how to better play the game together with another player(s).
Rod and I have had long heated arguments about how that should be implemented...
Title: Re: August 2015 Development
Post by: TheDeadlyShoe on September 15, 2015, 11:54:12 PM
with a proper alliance system, shouldn't you be able to effectively play the same side even if they are technically not?



Title: Re: August 2015 Development
Post by: se5a on September 16, 2015, 12:15:19 AM
That was one argument yes, A faction should be a single player and you log in as a faction, then have an alliance system that would handle the interaction, then multiple factions can make up an Empire.

The other side of the argument was that factions should be able to have multiple players and have a player login system instead of a faction login system.
Title: Re: August 2015 Development
Post by: TheDeadlyShoe on September 16, 2015, 01:19:29 AM
well.  sorry to rehash then  ;D

my :2cents: though, in terms of return on effort,  a good alliance system has benefits beyond 'multi player empires' but a multi logon system doesn't. *shrug*
Title: Re: August 2015 Development
Post by: MarcAFK on September 16, 2015, 06:44:13 AM
A system that might be very good for multiplayer would be an option to leave battles to be resolved entirely by AI this would be essential for real time Aurora/pulsar, but it would allow any other kind of game to be controlled by infrequent player interaction.
For this to work you need a robust doctrine system, essentially leaving default orders for your fleets to follow when they make contact. Then modified by the personality, past history and grade of commanding officers within the fleet, individual ships, and even the AI of your top admiral himself.
It could be pretty complex but at it's most basic level you need several different AI, with their own command styles which would be randomly selected for each officer, the fleet enguaged in battle follows your doctrine but based on the commanders AI and then each ship reacts to it's orders slightly different based on its own commander.
Title: Re: August 2015 Development
Post by: se5a on September 16, 2015, 04:30:20 PM
DF in space!

I've always wanted to make a game like that.
whether we can do that sort of thing here or not I'm not sure. definitely not for a while though.
The laundry list of things to do is kinda big, and there's a ton of stuff that lies well out of my area of expertise...
(anyone want to have a mess around with getting an OpenGL window in WPF?)
Title: Re: August 2015 Development
Post by: exdeathbr on September 16, 2015, 04:45:32 PM
Rod and I have had long heated arguments about how that should be implemented...

The entire point behind my 2 players on same team idea, is to allow both players to share the difficulty of playing this game.
This means that if a player think the game is cool but too detailed and would love to play it if another player, he will be able to do it.
Another reason is that 2 new players will be able to try the game together, make (problably) easier to them to learn how to do it), also you could have a new player playing the game with a expecienced player and so learning while he play and the other guy teach him.

DF in space!

I've always wanted to make a game like that.
whether we can do that sort of thing here or not I'm not sure. definitely not for a while though.

The thing (and some mistake people do) is that DF is not just detailed, but super mega ultra specifically detailed and no aurora is not space DF.
Anyway making a Scifi DF is impossible, unless you go post-apocalipse.
Title: Re: August 2015 Development
Post by: se5a on September 16, 2015, 11:14:51 PM
 ::) ...Did you even read Mark's post? or did you just read mine with no frame of reference.
Title: Re: August 2015 Development
Post by: sloanjh on September 19, 2015, 08:54:39 AM
A system that might be very good for multiplayer would be an option to leave battles to be resolved entirely by AI this would be essential for real time Aurora/pulsar, but it would allow any other kind of game to be controlled by infrequent player interaction.
For this to work you need a robust doctrine system, essentially leaving default orders for your fleets to follow when they make contact. Then modified by the personality, past history and grade of commanding officers within the fleet, individual ships, and even the AI of your top admiral himself.
It could be pretty complex but at it's most basic level you need several different AI, with their own command styles which would be randomly selected for each officer, the fleet enguaged in battle follows your doctrine but based on the commanders AI and then each ship reacts to it's orders slightly different based on its own commander.

I think what I'm about to say is already implicit in this thread, but I'm going to be explicit just to be sure:

One of the things I wish Steve had done with Aurora is to set things up so that the AI is multi-leveled, and so that different tiers of AI can be used by the player to delegate micro-management.

From an implementation point of view, I think this would mean introducing the concepts of e.g. "CommanderSlot" (or "Hat") and "Commander" into the design, where a Commander is an object (human or AI) that makes decisions about which commands to emit for a particular CommanderSlot, while each CommanderSlot represents the commanding officer for some organization in the game.  Examples of types of CommanderSlot might be UnitCommander, Task Group Commander, Governor (makes economic decisions), ResearchDirector, Emperor (top of CommandSlot hierarchy).  The AI might then be implemented as a set of "CommandDecisionMakingAlgorithm" types that would be 1-to-1 with the CommanderSlot types and might take individual personality properties of the Commander instances into account.

The nice thing about this sort of design is that it admits both forms of multi-player play se5a mentioned: multi players per faction or multi factions per empire, plus it allows the player to decide how much of the micro-management he wants to delegate to AI Commanders (by deciding how many hats the player wants to wear and how many to assign to AI commanders).  I'm not sure if it's easer or harder to pull off though - on the one hand it feels like having to write an AI can be as challenging as a human for each CommandSlot would be tougher; on the other it seems like any AI written is going to need to be able make decisions for each of the types of CommandSlot, so this is an obvious way to make that decision-making design crisp.  Oooh - that's another nice thing: it also gives the human the ability to have advisors/staff that can suggest sets of orders for hats that the human is wearing.

John
Title: Re: August 2015 Development
Post by: TheDeadlyShoe on September 20, 2015, 03:29:23 AM
there's two games i'm aware of that have pulled that off properly so far. Distant Worlds and Space Empires V (if you use Kwok's mod.)

both use the 'minister' model, with each minister being an independently functioning ai responsible for a particular facet of the empire.

for example, in space empires V, the minelaying minister takes any automated minelaying ships and tells them to automatically pick up produced mines at colonies and deploy them at jump points designated as threat zones.  While in Distant Worlds the ship production minister produces new ships dependent on your capabilities and needs (preset shiptype production ratios, whether you are at war, the strength of your economy).   they are both responsible for a very narrow slice of activity and competent within that slice.  each minister can be turned on or off as the player desires.

personally i've always found colony/city governors to be an unsatisfactory stopgap in most 4x games i've played, but i've been pretty happy with ministers that i can unload drudgework off to.

Aurora/Pulsar are tougher candidates for that for many reasons.  There's a reason NPRs don't have to deal with maintenance or fuel or morale in Aurora, those are challenging factors even for players, and expecting an AI to handle that challenge is asking for failure. NPRs run out of minerals and effectively choke to death often enough as it is.

though it should be noted that civilian shipping lines are an existing low micro ai 'ministers' that theoretically should help take the weight off the players shoulders for certain tasks.  unfortunately i think theyve mostly just turned into a way to make money.  With a minor redesign that could probably be changed.  On that note (randomly inspired suggestion), i always thought how tax and the civilian economy interacted in Distant Worlds to be pretty cool, and might bring a lot to Aurora. In effect, your tax level would determine how much money/resources the civilian economy had to work with.