[Suggestion] Animated tiled backgrounds

Discussion and feedback on Construct 2

Post » Tue Jul 02, 2013 10:02 am

Pretty much as stated in the Subject. Would be great for making full screen effects like rain, snow, fog etc. That doesn't use a lot of resources.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,828

Post » Tue Jul 02, 2013 4:50 pm

+1
B
17
S
4
G
4
Posts: 143
Reputation: 4,004

Post » Tue Jul 02, 2013 8:42 pm

The tiled background's simplicity, is why it's so efficient...

Maybe a new object altogether..."the tiled sprite"
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,260

Post » Wed Jul 10, 2013 9:19 pm

That works too! This could have a lot of potential uses. Imagine them parallaxed!
B
17
S
4
G
4
Posts: 143
Reputation: 4,004

Post » Wed Jul 10, 2013 10:16 pm

This could be emulated using the recently added sprite font plugin and timer behavior.
B
64
S
27
G
24
Posts: 959
Reputation: 18,478

Post » Wed Jul 10, 2013 11:08 pm

Sprites would be done with WebGL tile effect, it could look like animated tile background.
B
96
S
34
G
29
Posts: 3,139
Reputation: 28,236

Post » Wed Jul 10, 2013 11:09 pm

[QUOTE=nimos100] Pretty much as stated in the Subject. Would be great for making full screen effects like rain, snow, fog etc. That doesn't use a lot of resources. [/QUOTE]

Agree!
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Thu Jul 11, 2013 12:05 am

@Magistross
Indeed... But very bad Idea :D
In Canvas 2D, the spritefont plugin would draw each tile one by one (almost as bad as using tonnes of sprite directly)
Whereas you usually want to use context.createPattern() to make something tile (that's what the tiledbg plugin uses)

In WebGL the spritefont plugin would draw a quad for each repetition (faster than canvas2D, but still).
Whereas you would probably just wrap a texture on a big quad.

Knowing that the major bottleneck in html5 is the rendering... bad idea =)
And in both cases, using createPattern (canvas2D) or a big texture (WebGL) you would avoid seaming issues.

Personnally, I made a quick test on JSBin and animating a tiled bg using image frames should be possible.
http://jsbin.com/aqowin/2 (tested with canvas2D)
I'm not sure though how much strains it puts on performances. But any cases, redrawing big chunks of screen (and tilebg are more likely to be big objects) is expansive.

I'm not entirely sure why tiled background aren't animatable, but I would bet on the "big todolist" syndrom =)

And well... you can always emulate animated tiledbg by using many objects and alternating their visibility. (I did that once)
Yann2013-07-11 00:06:53
B
64
S
22
G
14
Posts: 1,482
Reputation: 16,457

Post » Thu Jul 11, 2013 12:36 pm

+1 Would be very useful, not sure what sort of hit on performance you would get though?
B
11
S
2
G
1
Posts: 108
Reputation: 1,899

Post » Thu Jul 11, 2013 10:00 pm

[QUOTE=Yann] @Magistross
Indeed... But very bad Idea :D
[/QUOTE]@Yann I bet it is ! But hey, emulating something always cost more ressources ! :PMagistross2013-07-11 22:01:23
B
64
S
27
G
24
Posts: 959
Reputation: 18,478

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests