[solved]Limited Axis sliding tile.... borked

Get help using Construct 2

Post » Sat Mar 09, 2013 12:45 pm

Alright. So I have been tinkering with the basics of trying to do a sliding tile based puzzle game. Currently it's rudementary and trying to just get the tiles sliding.

The problem is that I can't get it to work right :(

https://docs.google.com/file/d/0B0V2EvCXNzYUMzJYQ3FiQlZqbjg/edit?usp=sharing

Here are the problems based on the capx
1. The tile selected slides right though other tiles 50% of the time
2. The tile moves the opposing tile out of the way 50% of the time
3. The organized tile setup goes wack at the startup

I've tried to tinker with it, but just made more of a mess :| Can anyone please help. I'll keep tinkering, but it's just not working yet.
jayderyu2013-03-16 13:24:52
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Sun Mar 10, 2013 8:19 am

Made it too page 3 with no reply and I'm still stuck :P

This is a bump, but I think I'm going to try another way of moving the block on a limited access. Maybe that will be easier to trying to fix what went wrong with this one :D
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Sun Mar 10, 2013 9:51 pm

Do you want the tile being dragged to push the other tiles or just stop?

Number 3 can be helped by spacing the tiles out more by either position, size or collision poly. Objects right next to each other count as overlapping.
B
79
S
24
G
54
Posts: 4,753
Reputation: 40,769

Post » Mon Mar 11, 2013 5:40 am

All of those are because you have both 8 directions and Solid behaviour in your tiles.
8 directions came with build-in collision with solid object, thus your tiles went haywire.
Try not to use both together.
B
6
S
1
Posts: 11
Reputation: 934

Post » Mon Mar 11, 2013 6:40 pm

TY

I removed a lot of stuff. I didn't know that stuff 1px away counts. that helps. I just want the sliding to stop. i don't want to move other tiles. I'm trying it another way now
jayderyu2013-03-11 18:42:01
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Sat Mar 16, 2013 11:11 am

Well I did some changes. The 1px check helped. It mostly works the way the sliding blocks should. So no more borked layout. Except now there is one critical problem and could use some smoothing out :|

The CAPX
https://docs.google.com/file/d/0B0V2EvCXNzYUNUFUcFFtWDdvV00/edit?usp=sharing

The project is still relatively small as I'm working on it in my spare time.

Working
* Once block starts sliding the block must remain on the axis
* A moving block should not be able to move through another block
* A block should not be able to push another block
* A block once released snaps to nearest grid position

Problems
* Blocks on the top sometimes get locked. Even though I have a 2px difference. The blocks stills can get locked in the top left corner.
(try grabbing a block from the top right. Drag up, then drag left. Then try dragging down. Some times it locks :( remember to release between drag directions )

* Dragging up "through a block" from below problem.
While the above is a problem. This is one a major problem. When dragging a block up "through" another block above it. The block will slide right trying to move up. once the block reaches open space the block then moves up.

* Not smooth
For some reason when starting to drag the block to the right or down. The block often jumps 1/2px down. This is the possible reason for the locking. however it also looks bad.


Now admittedly using platform and solids may not be the most ideal use, but it is an attempt to use already established plugins to do the work.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Sat Mar 16, 2013 1:24 pm

Never mind. I can spend 4 to 6 hours banging my head against the wall. Make a post and I have a reasonable change to find a solution in aproximatally 1 hour :P

:P happy coding, but I have a solution
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834


Return to How do I....?

Who is online

Users browsing this forum: Lancifer, linkman2004 and 18 guests