AlanWills / Other-Worlds-Than-These

0 stars 0 forks source link

Elapsed Time is always 16 ms #2

Open galadran opened 9 years ago

galadran commented 9 years ago

I don't know if this is failure in my debugging, maybe I'm doing something wrong. But in the SpaceScreen / AddRandomEnemies function, the gameTime.ElapsedGameTime.Millisceonds call always seems to return 16. This seems strange!

image

galadran commented 9 years ago

From investigating gameTime further. It seems ElapsedGameTime only measures since the last update call and is consistently 16ms (it is certainly going to be fairly deterministic on any given machine). I think changing to use TotalGameTime would make more sense for the perspective of a random situation??

Another use of TotalGameTime could be to slowly increase the number of enemy ships attacking to force a resolution (defeat or completion) to a given scenario? image

AlanWills commented 9 years ago

Yeah the ElapsedTime is since the last update call. What you suggested is actually a much better plan idea from a gameplay point of view, but the exact numbers using the TotalGameTime would be more complicated. I.e. I still want random enemies appearing at the start, but obviously scaling it depending on how long the mission goes on is a nice idea. However, there's probably a magic constant (or maybe a multiplier and a addition offset constant) we're gonna need to work out to give a balanced spawning frequency.

Basically, you're idea is great, but at the time I couldn't be bothered to investigate the maths experimentally. You are MORE than welcome however to tweak things as you see fit, because the ideas you're saying are all great.

On 29 July 2015 at 20:50, galadran notifications@github.com wrote:

I don't know if this is failure in my debugging, maybe I'm doing something wrong. But in the SpaceScreen / AddRandomEnemies function, the gameTime.ElapsedGameTime.Millisceonds call always seems to return 16. This seems strange!

[image: image] https://cloud.githubusercontent.com/assets/13476086/8968146/69a652e8-3633-11e5-82d6-034a96c38ebd.png

— Reply to this email directly or view it on GitHub https://github.com/AlanWills/Other-Worlds-Than-These/issues/2.