Search Unity

Casino Game - SPIN EFFECT

Discussion in '2D' started by ddww, Jan 10, 2014.

  1. ddww

    ddww

    Joined:
    Jan 10, 2014
    Posts:
    4
    Hi, i create 2d game (casino game), but i dont know how make spin effect. Help.

    This spin effect:

     
  2. Seth-McCumber

    Seth-McCumber

    Joined:
    May 26, 2013
    Posts:
    141
    I know this game did a 2D spinning wheel effect, forget how though
     
  3. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    What I did for my slot machine project was to use a custom shader that used uv offsetting to simulate the reel spinning. The shader used two texture strips that contained all the symbols in a single row. One texture held the sharp non blurred symbols and the second held a version with vertical motion blur applied. The shader would then blend between the two depending on how fast the simulated reel was spinning. When the reel was stop you only saw the sharp texture and when it was at full speed you only saw the blurred version. There was a script that fed the shader the uv offset and the blend amount. This way I was able to make the reels seem to slow and lock in place, even simulating a little bounce and settle as the reels came to a stop.
     
  4. ddww

    ddww

    Joined:
    Jan 10, 2014
    Posts:
    4
    My english is very low i dont undestand you :/ do you create example very easy project?
     
  5. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    Another option would be to just use a cylinder type mesh with the texture wrapped around it, then spin it. Then do the same as chronos78 said, and swap for a blurred texture at a certain speed.
     
  6. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    Sorry, I'm not about to give away work for free. I did however throw together an image that might help illustrate the concept a little better.

    $slotsExample.png

    As zombeigorilla pointed out the texture can be mapped to a spinable cylinder. Both are valid solutions depending on what look you want for your reels 2D or 3D. Based on the video in the OP which shows flat reels, a cylinder would not produce the desired effect as the symbols on the reel would be distorted by the cylinders curvature even if projected orthographically. Having implemented both techniques in the past I can vouch that the effect is extremely convincing either way. So the choice is up to you.
     
    MuraliVenkat likes this.
  7. mmoDust

    mmoDust

    Joined:
    Jun 13, 2011
    Posts:
    17
    I recently created a slot machine in Unity and I used nGUI to create this effect.

    I just made each reel for example 15 tiles high with random symbols in each spot and then simply moved the entire group of symbols (moving the panel itself which moved all child objects) vertically up or down based on how i wanted it to spin and when it reached the top or bottom set of symbols on the screen it simply reset the entire thing back to beginning and repeated (basically just like scrolling an endless background). To make it appear like it was seamless I made sure the top/bottom symbols were the same so when it reset the position the symbols did not change. This let me change the "spin speed" by simply changing how far it moved on each update as well as simulate bounce by using a simple tween on the panel.
     
  8. Dave-xP

    Dave-xP

    Joined:
    Nov 8, 2013
    Posts:
    106
    make an array of symbol textures and then randomly put them together into a big texture.
    (with a script, not your hands, unless you want to manipulate it :p)
    put the texture on a sprite renderer, or whatever you want to use and then move the texture offset y to spin it
     
  9. unitylover

    unitylover

    Joined:
    Jul 6, 2013
    Posts:
    346
    This is how you do it. You won't be disappointed.
     
  10. Kmuzu

    Kmuzu

    Joined:
    Jun 20, 2014
    Posts:
    1
    I know I am commenting on this several months after the post - however, I used to design slot machines for a large manufacturer .. I would not recommend using a blur. For these reasons: 1) although these games are for entertainment, if you ever wished to port the game over to a Class 3 gaming device there are many jurisdictions that will not allow you to speed blur your reels. 2)slot machines are mostly about the subconscious and even if the conscious eye can't pick up the blur the subconscious can and it starts to feel wrong to the player. 3) It is best to show the actual symbols in the each step. Even thought an individual spin might not make it through the whole step cycle. .. the players get used to the positions for the reel steps and start to notice and anticipate symbols around the high paying, scatter and trigger symbols. This creates an impression of "near miss". 4) It feels honest .. I don't know how to explain it more than that .. I just feels like it is not some event on and RNG table.

    One last thing - Cherries, bars, bells and even sevens are considered old fashion. Most major manufacturers use "Royal" symbols .. like Ace, Jack, Queen, King. There are several reasons for this .. but in short .. it immediately conveys the hierarchy of pay to the player.
     
    malek256 likes this.