Distort Map problem.

For questions about using Classic.

Post » Wed May 20, 2009 5:08 pm

Hi,

Today I started making a side-scrolling game.

My platforms use a distort map to have a random shape.

Very nice, it works as I like.. BUT! Collision masks, after the distorsion, don't update.

So the player walks in the same rectangular platform without seeing the distorsion of the platform.

Have you planned to implement it?

Anyway, what can I do?

Thanks
B
2
S
1
G
3
Posts: 193
Reputation: 1,486

Post » Wed May 20, 2009 6:45 pm

Help? (I'm using 0.99 now, but same problem)
B
2
S
1
G
3
Posts: 193
Reputation: 1,486

Post » Wed May 20, 2009 7:08 pm

As far as I know, distort maps are purely cosmetic. If you want funky shaped platforms, you will have to have funky shaped shapes to start with.

Perhaps you could make a system where you create the shape you want with the distort map, and use that as a guide to place invisible, solid objects at the distort map points and rotate/scale them as needed to cover the area.

Or you might be able to work something out with pasting the distorted image into a canvas and using the canvas's collision mask. Just keep in mind that large canvases are memory hogs.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed May 20, 2009 7:19 pm

yea, distort maps don't support collisions. Deadeye mentioned some feasible workarounds, try those.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Wed May 20, 2009 7:26 pm

I agree with Davio, do what he said.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed May 20, 2009 7:56 pm

I try, thanks..
B
2
S
1
G
3
Posts: 193
Reputation: 1,486

Post » Wed May 20, 2009 8:52 pm

depending on how much you need to do this
pasting distorted sprites onto canvases and updating collision masks would work
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Wed May 20, 2009 9:58 pm

It'd be a really tricky algorithm to make distort maps collide properly and be very time consuming... what do you need it for?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Wed May 20, 2009 10:03 pm

He's making terrain that is very slightly randomly bumpy. We're working on a solution in chat that uses canvases.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed May 20, 2009 10:12 pm

With the help of deadeye and lucid, I made this example about random shape platforms:

[url:32kyh0pk]https://dl.getdropbox.com/u/1105488/RandomTerrain.rar[/url:32kyh0pk]

Thanks again :)
B
2
S
1
G
3
Posts: 193
Reputation: 1,486

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests