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

0 favourites
  • 7 posts
From the Asset Store
Piano tiles
$9.99 USD
Template for a piano tiles game, fully documented in comments and video
  • 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 :(

    docs.google.com/file/d/0B0V2EvCXNzYUMzJYQ3FiQlZqbjg/edit

    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.

  • 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

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • 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

    docs.google.com/file/d/0B0V2EvCXNzYUNUFUcFFtWDdvV00/edit

    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.

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)