Chewing up solids

New releases and general discussions.

Post » Wed May 20, 2009 8:39 pm

Is it possible to punch holes into solids and obstacles which you can go through? In The Games Factory this could be done by "Paste into background" as no obstacle. This lead to two limitations: for it to look convincing, you'd have to have a solid background (with the same color as your hole), and second, it does not get along with screen scrolling.

Does Construct have such feature? I imagine it'd be near impossible because of the textural nature of the renderer, unless it's one big depth write hack.
B
3
S
1
G
3
Posts: 48
Reputation: 1,121

Post » Wed May 20, 2009 8:51 pm

You can do this with a canvas. There are a few examples of Worms-style games and even platformer stuff that use the canvas for dynamic terrain.

Large canvases eat up VRAM like candy though, so you have to be careful. You might be able to make a system where the canvas follows the screen and pastes in your background items, then erases the "holes" that have been placed on another layer as sprites.

I haven't really experimented with this kind of thing, though. Someone else may be able to help you out better :D
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu May 21, 2009 7:34 am

- blow the thing up
- paste the hole into a freshly spawned sprite
- is overlapping solid AND hole sprite > keep moving

Just an idea.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Thu May 21, 2009 10:10 am

Large canvases aren't too bad on the VRAM (4mb or so for 1024x1024), it depends how you plan to use it.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Thu May 21, 2009 10:13 am

I think ONE BIG canvas will eat much more VRAM than MANY SMALL canvases.

So you better place in your map many canvases with the screen width and height, like:
canvas 1:................canvas 2:
_______________.________________
|...................|.....................|
|...................|.....................|
|...................|.....................|
|______________|_______________|
B
2
S
1
G
3
Posts: 193
Reputation: 1,486

Post » Fri May 22, 2009 9:37 am

Yes, don't forget to split canvases up, especially if your layout is wider than it is tall.. don't forget also that many graphics cards don't like huge textures.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests