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
G
2
Posts: 41
Reputation: 732

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 Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273

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
79
S
24
G
54
Posts: 4,754
Reputation: 40,771

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
G
2
Posts: 41
Reputation: 732


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests