SUGGESTION about Platform

Discussion and feedback on Construct 2

Post » Mon May 20, 2013 5:13 pm

I just recently read a post about avoid duplicating official plugins, and I completly understood why.

But, before I noticed that post, I did posted a mod behaviour (of platform) and I actually seen another one.

Well, my suggestion is to add the functionality of Filtering Solids (and jumpthrus) by Layer,
I am very convinced about it's utility and the ease of implementation, to the point I was able to do it in a few hours without knowing the code, so it must be very easy for you.
What I mean about this Filter? Do you know McMillen's Time Fcuk? Its basically a platformer where two "level" exist in parallel, one over the other, and you can switch between those... In that game, there is only the player, so, it's not more than disabling and enabling the solids... but If you have the same idea but multiplayer or enemies using "Platform" then it becomes quite problematic.
What I did is add a boolean, that, when its true it will check if Layer of Platform it's same as Layer of solid object, and ignore if false (this occurs in the for loop that runs throug all solids, before the actual collision checking)
Please, take a look at it, i'm sure you will understan better when you read the code (care, it's ugly, and awfully commented):

CODE: http://www.mediafire.com/download.php?dy41za8h72oslr4
EXAMPLES: http://www.mediafire.com/download.php?qaw1kzqczj990l2
B
14
S
2
G
1
Posts: 15
Reputation: 1,053

Post » Mon May 20, 2013 5:45 pm

Wouldn't being able to enable/disable jumpthrus do this?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon May 20, 2013 6:03 pm

The problem becomes critical when there is more than a single "Platform" instance in play.
Oh, you mean in the different Platoforms, well no, the problem remains the same. The "Platform" with disabled jumpthrus will ignore jumpthrus, yes, but the one with enabled jumpthus will not ignore "Solids" so, he is not actually in another layer in the sense I meant. Also, jumpthrus dont seem to work as walls (and that is the actual functionality of the jumpthrus)

When i searched the forums, i found a solution that did not convinced me... It was to have the different "Solid Layers" actually displaced in space so they not overlap, but draw them as if they where... This might work form some of the problem, but it adds other annoying problems...
In the other hand, adding the filter is seriously easy :)

Paco2013-05-20 18:18:01
B
14
S
2
G
1
Posts: 15
Reputation: 1,053


Return to Construct 2 General

Who is online

Users browsing this forum: 99Instances2Go, Artpunk and 14 guests