Help Wanted: Grid Based Puzzle Game

0 favourites
  • 6 posts
From the Asset Store
Snap to visible grid - perfect solution for any game genre
  • I am trying to create a game like this

    But I am really struggling.

    What would be the best way to have multiple sprites, draggable in set directions, along a grid? (Can't use families)

    Also, how can I do collisions? Solids don't seem to work, when using drag/drop.

    Thanks in advance

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I suppose i would have a Variable like "Alignment" with 1 being Up/down, and 2 being Left/Right. Cars with Value=1 could only move on the grid up and down, and =2 would only be left-right. You could probably use offset or checking nearest grid area as far as placement goes.

    There are tutorials for grid movement floating around the forums, which would be a good place to go for actual grid movement.

    As for collisions, I would try to have some sort of event set up that checks

    A) the alignment of your car

    B) whether or not there is a car immediately a square above or ahead of you

    and if the condition is true, disable the car from moving in that direction.

    Or alternatively, you can have the car be able to move IF and ONLY IF there is not car on the grid square directly in front of it.

    This might over-complicate things in terms of numbers, but you can even have each grid-square be its own sprite, and have a switch 1, or 0. If a car overlaps said grid, then you can have it so that cars cannot go onto any grid square that has been switched on (that is, it has another car on that spot).

    Just some thoughts.

  • Hey Pixiefingers I am making a game similar to the one you are creating I am wondering if you have had any luck with the collision or did you have to resort to doing what Emperorlng360 said?

    Cheers

    Max

  • Hey Pixiefingers I am making a game similar to the one you are creating I am wondering if you have had any luck with the collision or did you have to resort to doing what Emperorlng360 said?

    Cheers

    Max

    Hi Max

    I had help from one of the other forum members.

    Here is the capx I was provided, with thanx to R0J0hound

    Rush Hour

  • Hey Pixiefingers,

    Thank you so much for this as it is going to help me soo much!

    much appreciated thanks to both you, R0J0hound and Emerolong360

    Thanks

    p.s. I wont steal any assets either cheers.

  • Hi Pixiefingers,

    I have encountered a problem which is when I add a new car to the level the collision doesn't seem to be working correctly. Do you know why or the solution to this?

    Cheers

    Max

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