Closed Germanunkol closed 9 years ago
That is a good idea. I also noticed, that every time you die, the background jumps around. That should not happen either. That could simply be avoided by passing the level-number as a random seed (or only generate the background, when the level is loaded from file, not when it is started.)
I like the idea of giving the level number as the seed. Then we could maybe pass something like -1 as the seed for the menu.
Will you do this?
Sure.
I implemented it a bit different, but the effect is the same: in the menu the background is always the same and in each level the background is only created, when the level is loaded.
At the moment, the parallax background is recreated by every level, so the menu also needs to recreate it every time.
This means that the background is generated randomly every time, which may be a bit weird. We could add an optional parameter to the parallax:init function which is the random seed - then we could force the menu to always generate the same parallax background...