Author Topic: Quick C# Questions  (Read 3317 times)

0 Members and 1 Guest are viewing this topic.

Offline Father Tim (OP)

  • Vice Admiral
  • **********
  • Posts: 2162
  • Thanked: 531 times
Quick C# Questions
« on: May 11, 2018, 11:18:17 PM »
I was re-reading the changes list for C# Aurora (a.k.a. Aurora 2020), and it made me wonder about a few things to which I could not find the answers.


1.  Will C# Aurora have a minimum 1 second time increment?  A couple of the examples Steve gives use a non-divisible-by-5-seconds time.

2. With the change in large engine & power plant (& shield generator) efficiency, and the introduction of new 'max size' tech for both (all three), will I have the ability to create, say, a size 172.7 HS Engine?  Or will it be a dropdown box with a list something like 100, 120, 140, 160, 180, 200, 225, 250, 300, 350, 400?
 

Offline tobijon

  • Warrant Officer, Class 1
  • *****
  • t
  • Posts: 91
  • Thanked: 11 times
Re: Quick C# Questions
« Reply #1 on: May 12, 2018, 01:18:33 AM »
1. I hope not, that will make beam weapons useless again.
2. Probably a dropdown menu
 

Offline QuakeIV

  • Registered
  • Commodore
  • **********
  • Posts: 759
  • Thanked: 168 times
Re: Quick C# Questions
« Reply #2 on: May 12, 2018, 01:13:05 PM »
Could just change beam weapons, it wouldn't be that crazy.

You could abstractly say the ship computer is making guesses about where the enemy will go, and there is an expanding 'hit radius' growing at the speed of light until it envelops the target.  At that point, hit probability at that range is used to calculate if there was a hit, and how much damage was done, and it is then retroactively assumed the ships fire control computers had always been aiming for that point in space.  Its basically exactly what the game is doing right now, just stretched out over multiple increments.

Alternatively, you could say that the lasers are firing at an extremely high rate, and just have a statistical model of some kind to suggest whether the target has accidentally smashed into one of the many spears of light fired into space in an attempt to hit the target.  That one is less well thought out on my part, but it could be the basis for a decently good system if actual thought went into it.

 

Offline JacenHan

  • Captain
  • **********
  • Posts: 454
  • Thanked: 115 times
  • Discord Username: Jacenhan
Re: Quick C# Questions
« Reply #3 on: May 12, 2018, 01:22:30 PM »
I think the bigger issue is that beam weapons do not currently travel faster than light. Without making them travel over multiple increments like missiles, that makes the max range about 1,500,000 km (5 seconds * 300,000 km/s). With 1 second increments the max range would be only 300,000 km. The obvious solution is just to ignore speed of light restrictions, but Steve seems to have been actively avoiding that in previous versions.
 

Offline tobijon

  • Warrant Officer, Class 1
  • *****
  • t
  • Posts: 91
  • Thanked: 11 times
Re: Quick C# Questions
« Reply #4 on: May 12, 2018, 01:33:37 PM »
the light speed limit is there for a reason, mainly because most beam weapons are light based and as such travel at light speed, you cant make light go faster than lightspeed in a vacuum
 

Offline QuakeIV

  • Registered
  • Commodore
  • **********
  • Posts: 759
  • Thanked: 168 times
Re: Quick C# Questions
« Reply #5 on: May 12, 2018, 01:38:18 PM »
I was talking about the speed of light restrictions to begin with.

So you fire a beam at an enemy 1.9 light seconds away, and after the first one second increment it has engulfed a one light second radius around the ship, this radius represents the possible directions the laser could have been fired in.  The beam is still in flight as you go into the next increment.  At the end of this increment the enemy ship moved out to 2.1 light seconds, and the beam has reached 2 light seconds.  It would have hit, but the enemy ship has moved out of range.  In the next increment after that, the beam catches the ship and a hit is calculated.  At this point it is assumed your ships fire control computer had always been aiming for where the enemy ship went.

Thats how the game works already, its assumed your ship fires where the enemy will probably go, and fires at that point pre-emptively.  We all know a ship could change course multiple times within 5 seconds if it has access to computers.  So, the firing ship calculates where the enemy will go via some extra dimensional subspace technobabble bullsmeg.

Thats how it already works, and you can extend that out over multiple increments just fine.
« Last Edit: May 12, 2018, 01:42:55 PM by QuakeIV »
 

Offline JacenHan

  • Captain
  • **********
  • Posts: 454
  • Thanked: 115 times
  • Discord Username: Jacenhan
Re: Quick C# Questions
« Reply #6 on: May 12, 2018, 01:50:12 PM »
Just to be clear, I don't really have an opinion one way or the other, I just wanted to bring up the reason 1 second increments have not been implemented in the past. Your solution sounds interesting, probably the best one I've seen that takes the speed of light into account, though it does seem like giving all that information to the player could be messy, especially in larger engagements.
 

Offline QuakeIV

  • Registered
  • Commodore
  • **********
  • Posts: 759
  • Thanked: 168 times
Re: Quick C# Questions
« Reply #7 on: May 12, 2018, 01:52:12 PM »
Eh, the player just needs to be told how it works, they don't really need to know about all of the beams in flight.  I'd argue its fine if you just fire a bunch of shots and then they start hitting.


e:  Also, a way you could handle this programmatically is you could add the laser shot to a list on the targeted ship as soon as the laser is fired.  Then the targeted ship tracks how far it has travelled from the point the beam was fired from, as well as incrementing the distance said beam has travellled.  Once that distance catches up to the ship, the ship applies damage to itself.  That way you can easily clean up beams that are still in flight towards a ship that has just been destroyed.

Code: (laser shot object) [Select]
point_of_emanation(x,y,z)
laser power
laser range
firing ship tracking speed
firing ship fire control range

e: I could be forgetting some quantities, but the point is that the amount of data that would need to go into the object is reasonably manageable I think.
« Last Edit: May 12, 2018, 01:58:48 PM by QuakeIV »
 

Offline tobijon

  • Warrant Officer, Class 1
  • *****
  • t
  • Posts: 91
  • Thanked: 11 times
Re: Quick C# Questions
« Reply #8 on: May 12, 2018, 02:46:38 PM »
I think you are heavely overestimating how much a ship can move in five seconds, even with computers, especially since the ship cant see beam weaponry coming in advance and has no chance to dodge
 

Offline QuakeIV

  • Registered
  • Commodore
  • **********
  • Posts: 759
  • Thanked: 168 times
Re: Quick C# Questions
« Reply #9 on: May 12, 2018, 04:35:33 PM »
Just move randomly, there is no need to dodge specific shots.  Also the ships can get going from 0-whateverspeed in a signle cycle, so they are pretty agile.
 

Offline Dr. Toboggan

  • Chief Petty Officer
  • ***
  • D
  • Posts: 30
  • Thanked: 4 times
Re: Quick C# Questions
« Reply #10 on: May 13, 2018, 12:23:34 AM »
One option I had been thinking about was "Trans-Newtonian Projectiles."  Since missiles are long range and beams are extremely short range, these could function as a middle ground.  Since there are FTL sensors, computers can predict where a ship will be on a certain course and heading, and fire towards that spot.  The projectiles are moving too quickly for the enemy to shoot them down, but can spot when they are fired.  Although hit chances would be rather small, they would be deadly, and would provide a more battleship based combat rather than the modern missile combat currently in game.
The ranges could be extremely large (in the tens of millions of kms), but hit chances and reload speed at those ranges would make damage controls more viable, and add some sorely needed spice to detecting ships five days away, and then moving towards them.
 

Offline Steve Walmsley

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: Quick C# Questions
« Reply #11 on: May 13, 2018, 05:41:22 AM »
I was re-reading the changes list for C# Aurora (a.k.a. Aurora 2020), and it made me wonder about a few things to which I could not find the answers.


1.  Will C# Aurora have a minimum 1 second time increment?  A couple of the examples Steve gives use a non-divisible-by-5-seconds time.

2. With the change in large engine & power plant (& shield generator) efficiency, and the introduction of new 'max size' tech for both (all three), will I have the ability to create, say, a size 172.7 HS Engine?  Or will it be a dropdown box with a list something like 100, 120, 140, 160, 180, 200, 225, 250, 300, 350, 400?

1) 5 second increment

2) Dropdown box in units of 1 HS.
 

Offline Father Tim (OP)

  • Vice Admiral
  • **********
  • Posts: 2162
  • Thanked: 531 times
Re: Quick C# Questions
« Reply #12 on: May 13, 2018, 02:12:53 PM »
Thanks, Steve.