[Don't Merge] parallax code autopsy
Created by: DeityLink
It's unfinished, it's laggy, I'm only making this PR so other coders can help me make it run fine. I'll make another PR later down the line to actually get it merged.
http://i.4cdn.org/vg/1463351337179.webm
I gave a go at parallax over a year ago but gave up.
Then BYOND 510 came about and someone over at Paradise actually did show that it was possible ParadiseSS13/Paradise#4085, then @dylanstrategie tried porting it #9884 but I didn't like his port (which he gave up due to feedback) and I'm lukewarm on Paradise's single-layered parallax. So I spent hours making 4 versions of every icon_state in turf/space.dmi, to bring you this versions.
Pros:
- Multi-layered (static background+layer that moves at 1 pixel per movement+layer that moves at 2 pixels per movement+dust that moves along with the turfs)
- Players can tweak it in their preferences (enable it, disable it completely, have all the layers be static) They can as well turn off the dust.
- Since the stars are overlay images instead of being blended/static images, they keep their twinkling animations.
- Position of the parallax layers is tied to player movement rather than position in the Z level, which means that drifting from a Z Level to the next won't cause a "Jump" in the parallax. The layers loop around when the player goes too far in the same direction.
Cons:
- Currently causes abysmal lag so I'm currently optimizing it all.