How to make card rotation like a wheel?

Get help using Construct 2

Post » Tue Jun 19, 2012 4:24 pm

Thanks for fixing the link, kyatric.

Another way would be to simply move the cards down in a straight line. You could arrange all of the cards in three columns and then move each card down over time. When a card reaches a certain point at the bottom, move it back to the top. Randomly choose a stopping time for each column, at which point you stop moving all of the cards in that column and make sure the closest card is fully showing in its slot. kittiewan2012-06-19 16:25:12
B
29
S
11
G
12
Posts: 281
Reputation: 11,868

Post » Tue Jun 19, 2012 7:39 pm

C2 Slot machine examples-

Link

Playing card sprites-
Rarchrisbrobs2012-06-19 20:51:54
B
19
S
6
G
7
Posts: 1,204
Reputation: 7,296

Post » Tue Jun 19, 2012 11:08 pm

@kittiewan, yes it was my first idea to do something like that but sure it will be better if using a sprite for each card to improve the wheel effect changing the size of the card/sprite depending on distance between this card and the center pos like this :

      *

     ***
     ***
     ***

    *****
    *****
    *****
    *****
    *****

     ***
     ***
     ***

      *
For me the best display (without using 3D plugin) will be provide by a view displaying more than one card on each view "frame" and using X axis because a card is highter than wide so better effect using smaller area.

view 1 :           
                   
20% C1 + 60% C2 + 1[0]0% C3 + 60% C4 + 20% C5

view 2 : if moving <-

" " + 40% C2 + 80% C3 [+] 80% C4 + 40% C5 + " "

where "[]" is the centered pos .. "x% Cy" the x% size for the y card

For better effect the more centered cards are on top, all cards partially overlap each others (except for 80% size).

so it's not finished i will create another post !!!!
naelian2012-06-20 00:34:51
B
16
S
5
G
3
Posts: 298
Reputation: 5,240

Post » Tue Jun 19, 2012 11:14 pm

Looking at this result (previous post) it's possible to have only one sprite object with 100% size cards (as for a animation) and just create instances of this object to have different pos and size and with instances overlapping each others but you must change the size and position of each instances and also change the frame each time a instance is lesser then 10% size to make it go to the other side of this animated view ! So you are doing yourself the animation and must managed the speed with code.

For me this the better way to do that ;-p

Creating 3 wheels required :

1 sprite object with all cards + 5 instances if this object for each wheel (15) ... it's "light".

By moving instances the result is smooth, by changing size depending on distance between instance and centered pos the animation effect better than using a auto animated sprite.

naelian2012-06-20 01:18:07
B
16
S
5
G
3
Posts: 298
Reputation: 5,240

Post » Wed Jun 20, 2012 8:08 am

@chrisbrobs thank you
B
10
S
2
G
3
Posts: 49
Reputation: 2,333

Previous

Return to How do I....?

Who is online

Users browsing this forum: kingpirux, Magistross and 6 guests