Newbrict / engi

Oaktales engi fork
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Scrolling backgrounds #16

Open Newbrict opened 9 years ago

Newbrict commented 9 years ago

Need to figure out some custom property in Tiled to add to an image ( and add support in the tmx parser ) so that we can have scrolling backgrounds.

paked commented 9 years ago

logic would be something like this right: add a scroll_x/scroll_y value in tiled and multiply that by the change in position at render?

Newbrict commented 9 years ago

I was originally thinking of just a distance property on which you can do all the math on for how far it should scroll. but maybe scroll_x/scroll_y would give us more flexibility. I guess it's under the discretion of whoever writes the feature ;)

paked commented 9 years ago

@Newbrict are you thinking, scrolling in relation the the camera moving (like image only moves 80% of the camera movement)? Or scrolling as in the image moving automatically (ie, clouds passing by while camera is still). If you are thinking the latter, perhaps these should be entities?

Newbrict commented 9 years ago

Both actually, backgrounds would be images moving with the camera, scenery would be clouds and what not that move around the screen. Both could be entities I think.