Wrap behavior problems

For questions about using Classic.

Post » Tue Jul 20, 2010 4:35 pm

How can i wrap a background sprite so that it scrolls down seamelessly for instance if i create a sprite thats 640x480 and the project is 640x480.If i give the sprite a grid movement to move down then the whole sprite must move down without creating a gap.
B
2
S
1
G
2
Posts: 41
Reputation: 882

Post » Tue Jul 20, 2010 7:44 pm

Try the Tiled background object, set to offset(private variable.current offset + distance blah blah blah timedelta)
Image ImageImage
B
168
S
50
G
163
Posts: 8,221
Reputation: 105,061

Post » Tue Jul 20, 2010 9:34 pm

The "set at offset" only works for power of two textures. Another way would to put four instances of the 640x480 sprite and move them when they reach some boundaries.

Here is an example of infinite seamless scrolling:
[url:3d0bygs7]http://dl.dropbox.com/u/5426011/examples/seamlessScroll.cap[/url:3d0bygs7]
req 0.99.91
B
91
S
31
G
102
Posts: 5,232
Reputation: 67,250

Post » Thu Jul 22, 2010 9:56 am

Thank you for your support,This is the number one reason why i will only use construct for my 2d games. :mrgreen:
B
2
S
1
G
2
Posts: 41
Reputation: 882


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests