Place the picture in order Game

Get help using Construct 2

Post » Tue Sep 24, 2013 11:17 am

Hi All

Have been working on my first project - a game to place pictures in order - and have just about reached the end of my abilities. Have based some of this on the excellent 'Card Match' tutorial by Kitty (many thanks).

The object of the game is fairly straightforward - you have a number of pictures and you have to place them in the correct order - in this case a boy shopping for a fish. It will be an educational game to teach 'sequencing' to people with learning disabilities.

However, I am now struggling.

Firstly, the scoring works fine if you place the pictures in the correct place. It then reverses the score if you take the picture away again. However, if you place a picture from one placeholder to another (say from 2 to 4) the score remains the same. Any ideas how i might solve this.

Secondly, the 'snap to placeholder' action is a little off - even if the card is fractionally touching a placeholder to the right, it will snap there.

Finally, if anybody has any recommendations on improving my methods then they would be gratefully received.

CAPX here

Many thanks in advance

Brian
B
8
S
2
G
1
Posts: 45
Reputation: 1,007

Post » Tue Sep 24, 2013 1:50 pm

Argh. I wouldn't have used arrays myself, seems a bit over-complicated to simulate a deck of cards when really it is just match Card A to Slot A etc. The score remains the same when you go from one frame to another because you are allowed to place more than one on the same frame so they overlap. You will need to stop a card from snapping if the frame is already populated.
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Tue Sep 24, 2013 2:41 pm

Many thanks Plinkie. Great idea - I will give that a go - I guess just set up a Boolean variable on each placeholder and set it to true if an object is placed on it.

I used arrays because I tried using a simple IF statement to detect a match, but then couldn't easily reverse it when a card was then taken away or count up the score. I will have another look if it gets too messy.
B
8
S
2
G
1
Posts: 45
Reputation: 1,007

Post » Tue Sep 24, 2013 3:07 pm

Yeah arrays shouldn't be too much of a problem if you know what you're doing. I guessed they were being used from the tutorial you mentioned anyway. Yep, boolean should work fine.
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Tue Sep 24, 2013 3:32 pm

How many cards?
How many little games?
What I'm asking is are you going to create a animated sprite for each game
frame 1 to 4 picture cards
frame 1 to 4 number cards

I have a number of suggestions, just don't want to waste your time or mine - by going off in the wrong direction.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Post » Tue Sep 24, 2013 4:08 pm

Hi Dutoit

There will be a number of 'little games' each with a different picture set - i was thinking I would just create a new layout and event sheet for each!

There will be anything between 2 and 7 cards for each game, with each game having equal amounts of number cards

Would definitely be interested in any suggestions, this is my first working prototype of many, many attempts
B
8
S
2
G
1
Posts: 45
Reputation: 1,007

Post » Tue Sep 24, 2013 4:10 pm

Different layouts for each game sounds good, however please note that you don't need to duplicate the events on each event sheet for every game. You can have your global variables and logic in a global event sheet and use the 'Include Event Sheet' option to include the global stuff for each game.
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Tue Sep 24, 2013 6:16 pm

Agree about doubling events not required.
Also you only need touch control - as it works with mouse too. So any mouse click is a touch.

I was thinking allong the lines of 4 slots with pictures in animation frames.
Up arrow above and down arrow below slots (great for touch).
Students can cycle threw images until they feel they have right sequence.
You currently have 1 correct of 4 - this could be a blue border around slot if it is correct. and a red one if not.

That is one brain fart thought pattern.

The other along your lines is using Card is overlaping number object.
Do a check
So number(animation frame = 1) = Card (animition frame 1) 1=1 correct
number animation frame 2 =/ card animation frame 3 ||| 2 =/ 3 incorrect

The overlapping makes it easier to just drop card on other card. The whole snap to place isn't needed. makes it look more like a deck of cards that you place down on top of each other.

Well something like that???

EDIT: Damn I really got to learn to edit my writing so others can better understand. Anyways, if you don't understand anything (which I won't blame you) just shout, I'll try to be more clear.DUTOIT2013-09-24 18:22:46
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Post » Tue Sep 24, 2013 6:32 pm

Oooh - I like the first idea Dutoit

So I would set up a number of columns of pics (so a four card deck would be four high by four wide) each column would be randomly shuffled.

Any ideas on making the pictures 'slide' - would i use a plugin like 'litetween', or is there a simpler solution built in?

Thanks so much all for your support and suggestions - it is a great help
B
8
S
2
G
1
Posts: 45
Reputation: 1,007

Post » Tue Sep 24, 2013 6:48 pm

Here is something really small I'm working on for my mom - don't laugh. She likes playing the slot machines, but she is sailing round the world. its her birthday, thought I would make something.

Just started, but the spinning is there. Mess around with it, steal what you want. Anyways, I'm sure you'll figure it out :)

https://www.dropbox.com/s/nmrlmqbs1bnwi05/example_spin.capxDUTOIT2013-09-24 19:27:19
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Next

Return to How do I....?

Who is online

Users browsing this forum: lukewasthefish, marc254, Mayfly, Yahoo [Bot] and 17 guests