platform player overtake a few pixel difference in level

Get help using Construct 2

Post » Thu Jun 29, 2017 1:46 pm

Hello everyone. Is there a way or option for a player sprite whit platform behavior to overtake a few pixels difference in level ? i have a solid sprites, not perfectly aligned, as ground And when I walk in those points, the character stops..
I would like to be able to continue walking if the altitude difference is not so much.
Thank you in advance for who responds
B
12
S
6
G
3
Posts: 279
Reputation: 3,239

Post » Thu Jun 29, 2017 2:03 pm

Hi,

It sounds like you are using graphics for collisions. That's not a good idea. Use an invisible PERFECT collision box sprite to serve as the floor while you put the graphics on top of it using PIN behavior.

That allows you to have not-perfect graphics of any kind while your floor remains PERFECT.

Good luck.
Thank you to Construct 2 for giving me the ability to create games without programming knowledge.

My games & gaming portal = DolyGames

If anyone wants to cooperate to help each other Win-Win please email me - I am always happy to discover new opportunities.

Cheers,

COSMOS
B
20
S
9
G
1
Posts: 75
Reputation: 2,152

Post » Sat Jul 01, 2017 7:51 am

That's not the point. I already use the invisible collision box but playing a very irregular ground is normal that some points are slightly uphill, I think the Player blocks too easily at these points, for example the Blender Game Engine has an option that allows me to Setting how many pixels I want to jump over to the Player, I wondered if that was possible on Construct.
B
12
S
6
G
3
Posts: 279
Reputation: 3,239

Post » Sat Jul 01, 2017 3:38 pm

I believe almost anything is possible. Naturally different tools work differently and some are more advanced than others (but also more complex).

So if you know from testing that all your floor is totally OK and only a specific area creates a problem due to some weird collision issues - well then i'd suggest you simply modify that area a little bit or place a couple of invisible sprites such as little squares or circles in the trouble areas for a simple/quick solution.
Thank you to Construct 2 for giving me the ability to create games without programming knowledge.

My games & gaming portal = DolyGames

If anyone wants to cooperate to help each other Win-Win please email me - I am always happy to discover new opportunities.

Cheers,

COSMOS
B
20
S
9
G
1
Posts: 75
Reputation: 2,152

Post » Sat Jul 01, 2017 8:41 pm

DolyGamesCosmos wrote: well then i'd suggest you simply modify that area a little bit or place a couple of invisible sprites such as little squares or circles in the trouble areas for a simple/quick solution.


I thank you for the advice, yes, that's exactly what I am doing, but I was hoping for some trick to do what I was asking. I also noticed that when the Player Takes Speed does not hang while it stops in proximity and then starts again and finds the slight difference in height instead. So it might be something related to some kind of intrinsic physics of the platform behavior.. :roll:
B
12
S
6
G
3
Posts: 279
Reputation: 3,239

Post » Sun Jul 02, 2017 5:17 am

technically the player can go up of 1 pixel each pixels officially, but my guess would be that you could prefer to use actual slopes or align your boxes (using for exemple the grid of the layout view for an easier time editing) to prevent this kind of issues.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Sun Jul 02, 2017 5:34 am

You could position the boxes with events in an automated way so that you don't have to manually position them to eliminate corners to snag on.

Add a Sprite that you use to place dots along the floor. The events would the create a box between each dot.
You need to add a family called otherdot which contains dot. This is so we can pick two.
The box Sprite needs to have it's origin at the top left.

Finally the dots need to be created left to right. You could sort them by X or by some other means but that would make the events more complex.

Paraphrased the events loop over the dots and if it's not the last dot it stretchs a new box to the next dot.

Start of layout
For each dot
Compare: loopindex<dot.count-1
Pick otherdot instance loopindex+1
--- create box at dot.x, dot.y
--- box: set angle towards otherdot.x, otherdot.y
--- box: set width to distance(self.x,self.y,otherdot.x,otherdot.y)
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Sun Jul 02, 2017 8:33 am

thanks guys
B
12
S
6
G
3
Posts: 279
Reputation: 3,239


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 46 guests