Help Wanted: Grid Based Puzzle Game

Looking to build a team or have a job to offer?

Post » Thu Sep 20, 2012 2:23 pm

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
B
11
S
2
Posts: 127
Reputation: 1,532

Post » Thu Sep 20, 2012 6:26 pm

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.
B
19
S
3
G
2
Posts: 148
Reputation: 1,945

Post » Fri Sep 28, 2012 10:44 am

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
B
14
S
3
G
4
Posts: 32
Reputation: 2,654

Post » Mon Oct 01, 2012 12:46 pm

[QUOTE=maxp010] 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[/QUOTE]

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
B
11
S
2
Posts: 127
Reputation: 1,532

Post » Tue Oct 02, 2012 10:10 am

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.
B
14
S
3
G
4
Posts: 32
Reputation: 2,654

Post » Tue Oct 02, 2012 12:36 pm

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
B
14
S
3
G
4
Posts: 32
Reputation: 2,654


Return to Job Offers and Team Requests

Who is online

Users browsing this forum: No registered users and 4 guests