Thread: tbd_sanctum
View Single Post
Old 04-02-2011, 05:10 AM
silent skies silent skies is offline
Senior Member
Join Date: Jun 2010
Location: in the map editor
Posts: 613

Thanks for the feedback.

Also everyone is doing their parallax layers wrong and they're all wrong in the same way... parallax is really weird but where is this miss information coming from? My poorly written wiki article? Unless you're going for a weird effect here's what parallax should be for background layers:

Width: always LESS than game layer width
Height: always SAME as game layer height
X min : always 0
X max: always game layer width
Y min : always 0
Y max: always game layer height
I think it might actually be the wiki article... it's what I was referring to when I made the background.

To make a background scroll by slower giving the illusion that it's further away you stretch the background image to be as wide as the "game" layer.

I mentally processed this as "background image" + "wide as game layer"

So lets make some background mountains that scroll by 25% slower than the "game" layer scrolls by.
This means we make a background image (in our favorite image editor) that is 1536 x 768 pixels (you should explicitly restate here that this is smaller than the game layer's width 2,048)
Now that you have your background mountains create a new layer in the "View Editor" window. Window->Show View Editor View Editor->Right click->New View->

Width : 1,536
Height: 768
X max : 2,048
Y max : 768

(Since it's not stated on this particular page [read: the game layer size is mentioned only in a previous page], I looked at the width here and assumed that it was the same as the game layer size, with the X max being set as wider than the game layer. This is how I made my parralax.)

Move mid_hills view "Up" so that it is behind the game layer

With the mid_hills view selected in the view editor click Map->Import Large PNG and select mid_hills.png

You now have parallax hills in the background! Check it out using Test->Run
I think the problem is that nowhere on the page does it mention the original game layer size and it being 2,048. I was specifically referring to this page only when making parallax and skipped the first page, where it's stated that our example map's game layer is 2,048.

I think this page of the wiki should be re-written as an individual chunk that can be taken in as such. Parralax tends to be the only thing I keep 'reviewing' in the editor wiki, but I'm naturally not going to reread the entire wiki every time I want to review just a specific portion of it. I think this is probably leading to the trend to make this mistake that you've been seeing.

Interestingly enough, having it set as such makes the background move slower than the game layer, which is the effect wanted to begin with. However, I was just testing with nobodyhome and he told me there were performance issues similar to what tbd_underpark had -- is this parralax issue a probable cause?

Also, that pixel-distance between bases is very valuable info, thanks --- should be on the wiki if it isn't already.

Last edited by silent skies; 04-02-2011 at 05:24 AM.
Reply With Quote