After which time Power is out? (Power Cunsumption Problem: game development)

Sanji

New member
Joined
Dec 19, 2018
Messages
1
Hi,

i am new on this forum. I studied math, but i have no answer to this problem.

I am creating a space game. Currently i need a formula for this problem.

Here is the case:

Lets say, a space ship weapon consumes 10 Power / sec. The power generator provides 100 Power and generates 4 Power / sec.
The question: After which time the power generator is "empty"?

Lets go through step by step without a formula:

1. After 10 sec (100 Power / (10 Power Consumption / sec) = 10 sec) the Power Generator would be empty, if it wouldnt has Regeneration.
2. But during this time the Power Generator generates 50 Power (10 sec * 4 Power = 40 Power).
3. After 4 sec (40 Power / (10 Power Consumption / sec) = 4 sec) the Power Generator would be empty again, if it wouldnt has Regeneration.
4. But during this time the Power Generator generates 16 Power (4 sec * 4 Power = 16 Power).
5. After 1,6 sec (16 Power / (10 Power Consumption / sec) = 1,6 sec) the Power Generator would be empty again, if it wouldnt has Regeneration.
6. But during this time the Power Generator generates 6,4 Power (1,6 sec * 4 Power = 6,4 Power).
7. Now we can make the final step. The space ship weapon has a good Rate of Fire. For example 4 shots / sec. So 2,5 Power Consumption / Shot.
Lets make it easy and just add time one last time: 6,4 Power / 10 Power Consumption / sec = 0,64 sec

>>> 10 sec + 4 sec + 1,6 + 0,64 sec = 16,24 sec

Now what i need is a formula to calculate those values.

Thanks in advance and best regards

Sebastian
 
Hi,

i am new on this forum. I studied math, but i have no answer to this problem.

I am creating a space game. Currently i need a formula for this problem.

Here is the case:

Lets say, a space ship weapon consumes 10 Power / sec. The power generator provides 100 Power and generates 4 Power / sec.
The question: After which time the power generator is "empty"?
I presume you mean that you start with 100 "in the tank" and the generator provides an additional 4 /sec.

So in t seconds, the tank can provide 100+ 4t while 10t will be consumed. The tank will be empty when the amount of energy, initially and generated, is the same as the energy consumed: 100+ 4t= 10 t where "t" is in seconds. Subtracting 4t from both sides: 100= 6t. Divide both sides by 6: t= 100/6= 16 and 2/3 seconds

Lets go through step by step without a formula:

1. After 10 sec (100 Power / (10 Power Consumption / sec) = 10 sec) the Power Generator would be empty, if it wouldnt has Regeneration.
2. But during this time the Power Generator generates 50 Power (10 sec * 4 Power = 40 Power).
3. After 4 sec (40 Power / (10 Power Consumption / sec) = 4 sec) the Power Generator would be empty again, if it wouldnt has Regeneration.
4. But during this time the Power Generator generates 16 Power (4 sec * 4 Power = 16 Power).
5. After 1,6 sec (16 Power / (10 Power Consumption / sec) = 1,6 sec) the Power Generator would be empty again, if it wouldnt has Regeneration.
6. But during this time the Power Generator generates 6,4 Power (1,6 sec * 4 Power = 6,4 Power).
7. Now we can make the final step. The space ship weapon has a good Rate of Fire. For example 4 shots / sec. So 2,5 Power Consumption / Shot.
Lets make it easy and just add time one last time: 6,4 Power / 10 Power Consumption / sec = 0,64 sec

>>> 10 sec + 4 sec + 1,6 + 0,64 sec = 16,24 sec

Now what i need is a formula to calculate those values.

Thanks in advance and best regards

Sebastian
 
Hi,

i am new on this forum. I studied math, but i have no answer to this problem.

I am creating a space game. Currently i need a formula for this problem.

Here is the case:

Lets say, a space ship weapon consumes 10 Power / sec. The power generator provides 100 Power and generates 4 Power / sec.
The question: After which time the power generator is "empty"?

Lets go through step by step without a formula:

1. After 10 sec (100 Power / (10 Power Consumption / sec) = 10 sec) the Power Generator would be empty, if it wouldnt has Regeneration.
2. But during this time the Power Generator generates 50 Power (10 sec * 4 Power = 40 Power).
3. After 4 sec (40 Power / (10 Power Consumption / sec) = 4 sec) the Power Generator would be empty again, if it wouldnt has Regeneration.
4. But during this time the Power Generator generates 16 Power (4 sec * 4 Power = 16 Power).
5. After 1,6 sec (16 Power / (10 Power Consumption / sec) = 1,6 sec) the Power Generator would be empty again, if it wouldnt has Regeneration.
6. But during this time the Power Generator generates 6,4 Power (1,6 sec * 4 Power = 6,4 Power).
7. Now we can make the final step. The space ship weapon has a good Rate of Fire. For example 4 shots / sec. So 2,5 Power Consumption / Shot.
Lets make it easy and just add time one last time: 6,4 Power / 10 Power Consumption / sec = 0,64 sec

>>> 10 sec + 4 sec + 1,6 + 0,64 sec = 16,24 sec

Now what i need is a formula to calculate those values.

Thanks in advance and best regards

Sebastian
Here is my take on it. Let t= amount of time elapsed. 100 + (4-10)t = 0. So 6t = 100, then t =100/6 = 16 2/3 sec
 
Hi,

i am new on this forum. I studied math, but i have no answer to this problem.

I am creating a space game. Currently i need a formula for this problem.

Here is the case:

Lets say, a space ship weapon consumes 10 Power / sec. The power generator provides 100 Power and generates 4 Power / sec.
The question: After which time the power generator is "empty"?

Lets go through step by step without a formula:

1. After 10 sec (100 Power / (10 Power Consumption / sec) = 10 sec) the Power Generator would be empty, if it wouldnt has Regeneration.
2. But during this time the Power Generator generates 50 Power (10 sec * 4 Power = 40 Power).
3. After 4 sec (40 Power / (10 Power Consumption / sec) = 4 sec) the Power Generator would be empty again, if it wouldnt has Regeneration.
4. But during this time the Power Generator generates 16 Power (4 sec * 4 Power = 16 Power).
5. After 1,6 sec (16 Power / (10 Power Consumption / sec) = 1,6 sec) the Power Generator would be empty again, if it wouldnt has Regeneration.
6. But during this time the Power Generator generates 6,4 Power (1,6 sec * 4 Power = 6,4 Power).
7. Now we can make the final step. The space ship weapon has a good Rate of Fire. For example 4 shots / sec. So 2,5 Power Consumption / Shot.
Lets make it easy and just add time one last time: 6,4 Power / 10 Power Consumption / sec = 0,64 sec

>>> 10 sec + 4 sec + 1,6 + 0,64 sec = 16,24 sec

Now what i need is a formula to calculate those values.

Thanks in advance and best regards

Sebastian
Using your method.
Note that (2/5)10 = 4, (2/5)4 = 1.6, (2/5)1.6 = .64 ....
10 + (2/5)10 + (2/5)210 + (2/5)310 + ... = 10(1 + (2/5) + (2/5)2 + (2/5)3 + ...) = 10(1/(1-2/5)) 10(5/3)= 50/3 = 16 2/3
 
Top