Sprite hiding ?

Get help using Construct 2

Post » Tue Apr 02, 2013 1:08 pm

Hi,

I'm making an space game.as you can see the image below.the force field overflow layout so how do i make invisible or hiding red side automatically ?



B
10
S
3
G
3
Posts: 162
Reputation: 3,190

Post » Tue Apr 02, 2013 1:14 pm

You could cut the image. I guess the biggest question here is, why would you want to do it? Image going over layout borders is not really a problem in most scenarios, as it won't be seen anyway.

You could also place some background colored sprites on top of it to hide the parts you don't want to be seen.vee412013-04-02 13:14:55
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Tue Apr 02, 2013 1:21 pm

[QUOTE=vee41] You could cut the image. I guess the biggest question here is, why would you want to do it? Image going over layout borders is not really a problem in most scenarios, as it won't be seen anyway.

You could also place some background colored sprites on top of it to hide the parts you don't want to be seen.[/QUOTE]

I make game for mobile.i add large black sprite under of layer and i center layout so the screen looks like fullscreen many devices.

As you can see force field out of layout.If i dont cut this anyway it will look some devices.I can hide this with another black sprite but i dont want many sprite for performance.
B
10
S
3
G
3
Posts: 162
Reputation: 3,190

Post » Tue Apr 02, 2013 3:58 pm

[QUOTE=guero]
I make game for mobile.i add large black sprite under of layer and i center layout so the screen looks like fullscreen many devices.

As you can see force field out of layout.If i dont cut this anyway it will look some devices.I can hide this with another black sprite but i dont want many sprite for performance. [/QUOTE]

Performance wise it might be your best choice (apart from scaling the layout/cutting the images). Place tiledBackground with background color over the edges and scale it to cover the area, single 32x32 or something sprite won't really give you any performance hit. :)
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Tue Apr 02, 2013 4:03 pm

Why don't you just make your star field image bigger? Have it as large as it could possibly need to be, and maybe change it to a tiled background to conserve memory. Or start it off as big as necessary and then scale it down to match the screen size.
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Tue Apr 02, 2013 7:12 pm

If you use letterbox fullscreen mode with bounded scrolling, the part overflowing the edge of the layout will never appear anyway. So you don't need to worry about hiding it. There is no performance problem, either, because content off-screen is not rendered.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,498

Post » Wed Apr 03, 2013 1:09 pm

[QUOTE=vee41] [QUOTE=guero]
I make game for mobile.i add large black sprite under of layer and i center layout so the screen looks like fullscreen many devices.

As you can see force field out of layout.If i dont cut this anyway it will look some devices.I can hide this with another black sprite but i dont want many sprite for performance. [/QUOTE]

Performance wise it might be your best choice (apart from scaling the layout/cutting the images). Place tiledBackground with background color over the edges and scale it to cover the area, single 32x32 or something sprite won't really give you any performance hit. :)[/QUOTE]

Yes,i've tried.there is no problem and maybe i will use if Ashleys way dosent work good on mobile

[QUOTE=GeometriX] Why don't you just make your star field image bigger? Have it as large as it could possibly need to be, and maybe change it to a tiled background to conserve memory. Or start it off as big as necessary and then scale it down to match the screen size.[/QUOTE]

Thanks good way    .i can try other game.Ashles solution is      
exact than other.Thanks again.

[QUOTE=Ashley] If you use letterbox fullscreen mode with bounded scrolling, the part overflowing the edge of the layout will never appear anyway. So you don't need to worry about hiding it. There is no performance problem, either, because content off-screen is not rendered.[/QUOTE]

Thanks so much Ashley .I solve it .I hope letterbox mode works like scale mode.I didnt try on mobile but it works good.

Thanks so much again

Best regards,
B
10
S
3
G
3
Posts: 162
Reputation: 3,190


Return to How do I....?

Who is online

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