PGD Home

P0-MS4: Part 247: Infinite Universe, FTL Travel

by on Sep.24, 2017, under Astral Realms, P-0, Software and Games, Spiritus Astrum

I believe I am almost finished with the FTL travel part of this project.

I ran into some issues with transitioning between zones. I had problems deleting the current objects from a coroutine, and I had problems with the random number generation for the zones.

I was using unity’s built in random number generation, but I noticed that the numbers were not always reproducible, ie, I would use a random seed to generate the objects in a particular zone, but the random values would not be the same each time.

This turned out to be caused by the fact that I was generating each objects values within a coroutine for performance purposes, and when control passed to other parts of the engine, other random numbers were being generated, which broke the random number sequence within the coroutine, and led to non-reproducible values.

Unity’s random number generation system does not seem to be instance-based, so I had to use C#’s system, which does seem to work ok.

There are a few more bugs to solve, but I am confident that I will get these sorted out in the next few days. I then need to do some more testing, and I can work on the orbital mechanics, and some other features.




Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!