Why dont things align properly?

Discussion and feedback on Construct 2

Post » Fri Nov 25, 2016 10:12 pm

Im using the 8 Direction Movement behavior for the lightblue box and the walls have the Solid behavior.
The left pic is how i see the things in the layout editor, everything is aligned properly but one i start the game the lightblue box starts in another position and when i move it sometimes it can reach the walls and most of the times there is always a gap between the box and the walls why does that happen?

Image

Another example here, also apart from the box being in another position from where i put it in the layout editor it also can move along an open are the same size as the box, the box is 32x32 pixeles, and that gap there its suposed to be 32x32 since im using the snap to grid feature, but why cant i travel along that little path? That really gets me angry as i want to make the movement perfect for kinda like a "slide the pieces" puzzle but nothing matches together??

Image


Here is a .capx if you want to take a look at it
https://mega.nz/#!2QpWjYJC!tF0bqDL3wusQ ... DBKf_ZYqyo
Last edited by sachos345 on Fri Nov 25, 2016 10:32 pm, edited 1 time in total.
B
13
S
3
Posts: 101
Reputation: 1,238

Post » Fri Nov 25, 2016 10:14 pm

Could you share your .capx file?
B
124
S
43
G
41
Posts: 849
Reputation: 28,235

Post » Fri Nov 25, 2016 10:25 pm

Are they on different layers with different parallax values?
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Fri Nov 25, 2016 10:33 pm

andreyin wrote:Could you share your .capx file?


I edited the original post with a link to the .capx

blackhornet wrote:Are they on different layers with different parallax values?


Nope
B
13
S
3
Posts: 101
Reputation: 1,238

Post » Fri Nov 25, 2016 11:57 pm

Probably didn't find out the issue, but thought I'd contribute.
I exchanged the TiledBackground object with a regular Sprite which seemed to reduce the inaccuracy.
Might be a bug or an issue with the TiledBackground object.

With TiledBackground:
Image

With Sprite:
Image


[EDIT:] Probably found the issue.
This is what it looks like when disabling the collisions of the Player Sprite:
Image

Maybe you can change your program with that information or submit a [i]bug[/b] thread?
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091

Post » Sat Nov 26, 2016 12:19 am

Thanks for sharing!

It seems the 8-direction behavior is pushing out the player. This happens because they're actually both the player and the solid background are actually touching each other on the grid, so Construct 2 pushes out the player to the left.

I don't think using the 8-direction behavior isn't a good way to set this up. I would try using the bullet behavior instead.
B
124
S
43
G
41
Posts: 849
Reputation: 28,235

Post » Sat Nov 26, 2016 1:11 am

randomly wrote:Probably didn't find out the issue, but thought I'd contribute.
I exchanged the TiledBackground object with a regular Sprite which seemed to reduce the inaccuracy.
Might be a bug or an issue with the TiledBackground object.

With TiledBackground:
Image

With Sprite:
Image


[EDIT:] Probably found the issue.
This is what it looks like when disabling the collisions of the Player Sprite:
Image

Maybe you can change your program with that information or submit a [i]bug[/b] thread?


Thanks for taking your time to try solve this, I tried using Sprites instead of TiledBackground but i still get the same issue and dissabling the collisions defeats the reason to use a movement behavior no?

andreyin wrote:Thanks for sharing!

It seems the 8-direction behavior is pushing out the player. This happens because they're actually both the player and the solid background are actually touching each other on the grid, so Construct 2 pushes out the player to the left.

I don't think using the 8-direction behavior isn't a good way to set this up. I would try using the bullet behavior instead.


Yup i will keep trying to hack some work around to this issue, but i think it should not be this weird/hard
B
13
S
3
Posts: 101
Reputation: 1,238


Return to Construct 2 General

Who is online

Users browsing this forum: mihirolover and 18 guests