Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[RELEASED] Slots Perfect Kit (new v1.5 out now !!!)

Discussion in 'Assets and Asset Store' started by chemael, Aug 30, 2015.

  1. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @brianmok
    How to add new slot game in lobby
    - Save 'SlotGame' scene as different name and modify it what you want.
    - Duplicate UILobbyItem in Lobby Scene and change OnClick event parameter to 1 (from 0) in it's inspector
    - Change OnButtonSelected function in SceneLobby.cs to Load different level with value parameter.
     
  2. outdoorsman

    outdoorsman

    Joined:
    May 16, 2015
    Posts:
    32
    While save as feature works on changing number of reels and rows, having problems with the pay table won't regenerate new lines. It just goes blank.
     
  3. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @outdoorsman
    Hi, Could you tell me reels and row count you changed, and screenshot of the paytable ?
     
  4. outdoorsman

    outdoorsman

    Joined:
    May 16, 2015
    Posts:
    32
    Five reel, four row. Added fourth row Pay line after 33333 pay line without removing the others. Only Pay lines that show on pay table is
    11111
    22222
    33333
     
  5. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @outdoorsman
    Hi, i changed reel & row count, and add payline like you told me, and run at unity 4.6x and 5.3x.
    but i can't find the bug you told me.

    UILineInfo prefab was adjusted to 5x3 size slots. so, if you canged reels and row count, you must change UILineInfo prefab and edit source code in Start function at UISGPayTable.cs to show payline properly.
    (PayTable auto generation still work, but i say, you must change the payline item's shape)

     
  6. outdoorsman

    outdoorsman

    Joined:
    May 16, 2015
    Posts:
    32
    Ok. Thanks for all your help.
     
  7. GameRiser_86

    GameRiser_86

    Joined:
    Jan 10, 2014
    Posts:
    10
    @chemael

    I love your SPK, it is a one kit for reproduction of any slots game. Just a few questions here.

    I do notice there is return rate(RTP) in your "Math", is there any way to adjust the return rate(RTP) to my liking?

    For the "Basic", if I change the reel count anything more than 5, it will broke the game. Once I press spin, the game will move down and disappear. May I know are there any solution for this?
     
  8. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @GameRiser_86
    Hi, Thank you for purchasing the 'SPK'
    - To adjust RTP, you must change each Symbol's frequency & reward values.
    (repeat change frequency&reward -> simulation -> change frequency&reward ->... until you satisfiying.)​
    - Error after reel count changed to 6
    it was caused by array variables in Symbol & Line classes has short length.
    I will patch ASAP.​

    Thank you for notifing me the bug.
     
    Last edited: May 13, 2016
  9. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @GameRiser_86
    Hi, Here is hotfix of that problem.
    Add this code to SlotGame.cs
    1. Add this function to Symbol class
    Code (csharp):
    1.  
    2. public void ReAllocate() {
    3.     int [] frequency2 = new int[10];
    4.     int [] reward2 = new int[10];
    5.  
    6.     for(int i=0 ; i < 10 ; ++i) {
    7.         frequency2[i] = (i < frequency.Length) ? frequency[i] : 0;
    8.         reward2[i] = (i < reward.Length) ? reward[i] : 0;
    9.     }
    10.  
    11.     frequency = frequency2;
    12.     reward = reward2;
    13. }
    14.  

    2. Add this code to Line class

    Code (csharp):
    1.  
    2. public void ReAllocate() {
    3.     int [] Slots2 = new int[10];
    4.     for(int i=0 ; i < 10 ; ++i) {
    5.         Slots2[i] = (i < Slots.Length) ? Slots[i] : 0;
    6.     }
    7.  
    8.     Slots = Slots2;
    9. }
    10.  

    3. add code toSetReelCount function in SlotGame class.

    Code (csharp):
    1.  
    2. for(int i=0 ; i < Symbols.Count ; ++i) { Symbols[i].ReAllocate(); }
    3. for(int i=0 ; i < Lines.Count ; ++i) { Lines[i].ReAllocate(); }
    4.  
    5. // add code before RepositionSymbols();
    6.  

    This hotfix will be applied by next update.
     
    Last edited: May 17, 2016
    douglas128 likes this.
  10. GameRiser_86

    GameRiser_86

    Joined:
    Jan 10, 2014
    Posts:
    10
    Thanks for the hotfix,

    for the first ReAllocate() function

    Code (CSharp):
    1. frequency2 = (i < frequency.Length) ? frequency : 0;
    Code (CSharp):
    1. reward2 = (i < reward.Length) ? reward : 0;
    will have errors

    CS0173 Type of conditional expression cannot be determined because there is no implicit conversion between 'int[]' and 'int'
     
  11. GameRiser_86

    GameRiser_86

    Joined:
    Jan 10, 2014
    Posts:
    10
    Ok,i somewhat solve the error by changing the 0 to null. Do let me know if it is the correct way.
     
  12. GameRiser_86

    GameRiser_86

    Joined:
    Jan 10, 2014
    Posts:
    10
    @chemael

    Now i got error for the SetReelCount function

    Code (CSharp):
    1. for (int i = 0; i < Symbols.Count; ++i) { Symbols.ReAllocate(); }
    2. for (int i = 0; i < Lines.Count; ++i) { Lines.ReAllocate(); }
    Error code
    CS1061 'List<Symbol>' does not contain a definition for 'ReAllocate' and no extension method 'ReAllocate' accepting a first argument of type 'List<Symbol>' could be found (are you missing a using directive or an assembly reference?)
    CS1061 'List<Line>' does not contain a definition for 'ReAllocate' and no extension method 'ReAllocate' accepting a first argument of type 'List<Line>' could be found (are you missing a using directive or an assembly reference?)


    I try to look around for solution, can't seem to find one
     
    Last edited: May 17, 2016
  13. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @GameRiser_86
    I'm sorry about the compile error.
    While copying source code to forum editor, some characters was missing.
    I updated the source code. please check again.
     
    Last edited: May 17, 2016
  14. GameRiser_86

    GameRiser_86

    Joined:
    Jan 10, 2014
    Posts:
    10
    @chemael

    Yeah! It is working as expected now. There is one more issue, which is regarding the row count. Is it possible to align the screen according to the number of rows chosen? It seems that currently the screen is only suitable for 3 rows.
     
  15. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @GameRiser_86
    You can change Row count too.
    Of course, you must adjust Symbol size & Margin Size.
     
  16. GameRiser_86

    GameRiser_86

    Joined:
    Jan 10, 2014
    Posts:
    10
    @chemael

    apparently the big Wild unable to adjust to my liking. Is there any way we can solve it?
     

    Attached Files:

  17. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @GameRiser_86
    The BigWild is FullColumn Wild.
    So, FullColumn Wild must has same height of full column.
    (if your game has 160 symbol size & 10 margin size & 4 rows, the height of full column is 4*160+3*10).

    And another source code fix here.
    at SymbolShiftDown function in UISGReel.cs
    Replace line like this
    Code (csharp):
    1.  
    2. go.transform.localPosition = SymbolPos[3] + new Vector3(0,yOffset,0);
    3.  
    4. to
    5.  
    6. go.transform.localPosition = SymbolPos[game.RowCount] + new Vector3(0,yOffset,0);
    7.  
     
    douglas128 likes this.
  18. GameRiser_86

    GameRiser_86

    Joined:
    Jan 10, 2014
    Posts:
    10
    @chemael

    Thanks for the quick support. I wondering will you be coming up with new update or coming up with new slots asset with new features.
     
  19. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    BugFix !!!
    When user purchase coins in SceneGame, actual coin count in game was not changed.
    To fix this, add code below to end of OnButtonBuy function in UISGShop.cs.
    Code (csharp):
    1.  
    2. if(SceneSlotGame.instance != null) {
    3.     SceneSlotGame.instance.Slot.Gold = (float)BESetting.Gold.Target();
    4. }
    5.  
     
    ibyte likes this.
  20. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    969
    Hi in BESetting.cs and BEUtil.cs there is duplicate function not used - MakeUIInsideScreen? Which file should it be in and will it be used later?

    I noticed the layout is good for newer phones with wide screen but is bunched up in smaller (screen rez) devices? An one have a good solution for this?
     
  21. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @ibyte
    Hi,
    Thank you for purchasing my asset.

    - I made MakeUIInsideScreen function for popup ui (for example: tooltips), but not used in 'SPK'.
    You can remove this.

    - I use Canvas Scaler to support various size of devices.
    Even your device has small sized screen (smaller then 1280x720), 'SPK' still looks good.
    You can change screen ratio in Game Panel at Unity Editor to look how 'SPK' shows in various screen size.
     
    Last edited: May 23, 2016
  22. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    969
    @chemael You're welcome.

    I wish to change some default behaviors .To start with I am not sure I understand how the Slot Game Defaults set via the editor panel affect the game at run time.

    For example Min Lines. I think i changed to code to save and restore the current number of lines selected by the player. If i move between games via the lobby this value is maintained. But if I stop the game it is not restored even though I think i have all the code in the correct place to do it.

    It seems like the MinLines Value in the defaults always overrides it on startup? How may i change this properly so the editor defaults are only used for the first time and not used again if the value is saved and restored via player prefs?

    Edit: I found my issue. DPE.
     
    Last edited: May 23, 2016
  23. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    969
    To clarify the iphone settings all seems to scale correctly (with the exception of the scrolllist in the lobby).

    When I pick any of the iPads then some controls are overlapping and the sides are cut off.

    Edit: I tried some experiments by setting to match width vs height on the screen scaler dialog and that was better for the controls but reels are now not scaled correctly.
     
    Last edited: May 23, 2016
  24. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @ibyte
    Hi,
    - SlotGame inspector values (for example, Min Lines) are saved with scene.
    if you change values and save the scene, values will be preserved when you load the scene later.

    - 4:3 or 3:2 ratio screen size (like ipad), some ui components of 'SPK' may not show properly.
    in this case, you must change ui component's position as your wish.

    ps. Could you tell me what 'DPE' means?
     
    Last edited: May 24, 2016
  25. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    969
    Dumb Programmer Error - I made a simple mistake - all good now with saving and restoring lines and bet amount.
     
  26. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    969
    I am trying to integrate another package that also has saved prefs. I noted that the BESetting class is reloaded in each scene from a gameobject called common.

    Do you see any downside to make that first common object to be DontDestroyOnLoad and remove them from the other scenes?

    I have done this so far, no side effects that I can tell.

    Also it would be good to remove the hardcoded ticket cost in the ticket scripts Start function.
     
  27. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @ibyte
    Thank you for your advices.

    - I know the DontDestroyOnLoad.
    You can use this function to the script that last while scene change.
     
  28. Lohrion

    Lohrion

    Joined:
    Aug 16, 2013
    Posts:
    107
    Hi,

    I'm interested in this kit. Did you try publishing it to WebGL / HTML5? If so, what would the suggested memory size be?

    Thank you,
    Best regards,
    Patrick
     
  29. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @Lohrion
    Hi,
    Yes. I try to run 'SPK' at WebGL Platform.
    It works well and total size of 'SPK' in WebGL version is about 7.5M.
    Here is Link of WebGL version.
     
  30. Lohrion

    Lohrion

    Joined:
    Aug 16, 2013
    Posts:
    107
    Thanks a ton! Now for the next question - I'd like to have a server generate the result. Is your asset already capable of doing this? If not, what steps have to be done (Please be as specific as possible here, as I need to do an estimate of how much time I need to bring an existing system with a non-unity-server and this asset together)? You can also send me a PM if you are more comfortable with that.

    Thank you very much,
    Best regards,
    Patrick
     
    Last edited: Jun 23, 2016
  31. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @Lohrion
    The 'SPK' dosen't require server.
    But If you want to apply results generated from other server, follow instruction below.
    - Change Update() in SlotGame.cs
    In current version, Reel result was applyed after 0.5 sec after spin started.
    You can run spin while getting result from server, and after that, you can start stop of the spins.
    - Change ApplyResult() in SlotGame.cs
    This function set actual result of symbol. you can set result by your own result(symbol index)
    The 'SPK''s source code was created in the light of serverside result.
    So you can easily edit the 'SPK' to support serverside result.
     
  32. Lohrion

    Lohrion

    Joined:
    Aug 16, 2013
    Posts:
    107
    Thank you, that was already very helpful and sounds like little effort for the client side. But how about the server side? Which parts of the code would have to be migrated to server side, and how are the symbols and their frequencies stored?

    Edit: And how can I make sure the server knows how many free spins a user has left, and how do they get distributed to the client? What about compatibility of running multiple client slots (by the same user)?
     
    Last edited: Jun 24, 2016
  33. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @Lohrion
    If you want to make a server, you must calculate result symdol by your self.
    You can't use client's logic in the server.
    And the topic about 'how to implement server fuctions' was not a thing i can talk about.
     
  34. Adswars

    Adswars

    Joined:
    Jun 28, 2015
    Posts:
    13
    Hello,
    I just try to run v1.5 in Unity 5.3.2 but payline is not show.
    Is there any fix to this issue?

    Thanks
     
  35. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @Adswars
    Hi, I have uploaded 2 version of SPK (4.6.x and 5.3.x) because payline render routine is different by unity vesion.
    If you use unity 5.x version, download proper SPK, not upgrade 4.6.x version of SPK.
     
  36. Adswars

    Adswars

    Joined:
    Jun 28, 2015
    Posts:
    13
    @chemael
    What I have done is create new project in Unity 5.3.2 then open asset store from Unity and download.
    But after import it ask me to update API which seem what I got is SPK for 4.6

    Please tell me how to download SPK for unity 5.3.x
     
  37. Adswars

    Adswars

    Joined:
    Jun 28, 2015
    Posts:
    13
    @chemael
    I download SPK package from both Unity4.7 & Unty5.3.2
    It seem I got exactly the same file which is for Unity version 4.x


     
  38. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @Adswars
    Use Unity over v5.3.3 to download SPK.
     
  39. Adswars

    Adswars

    Joined:
    Jun 28, 2015
    Posts:
    13
    It's work, thank you.
     
  40. wtadlock

    wtadlock

    Joined:
    Aug 1, 2016
    Posts:
    15
    Chemael,

    I am considering purchasing this asset but I have a couple of questions before I do so. I have a game in mind, but would like to know how hard it would be to implement a couple of features that I am not sure your package currently has.

    1. Is there a way so that symbols do not appear more than once on a reel?
    2. Is there a way to assign a win amount to the scatter symbols as well as free games? Something like a progressive jackpot for 3 symbols, another progressive for 4, etc?
    3. How hard would it be to add progressive jackpots and display them on the screen?

    Thanks,

    Walter
     
  41. outdoorsman

    outdoorsman

    Joined:
    May 16, 2015
    Posts:
    32
    Hi. I have been trying to ad a reward unity ad but i have come up with errors and doesn't work. I can get the video ads working though. Also I am trying to ad a bonus wheel also but with no luck. I don't know how to make it ad to the balance.
     
  42. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @wtadlock
    Hi, Thank you for the interest in my asset.
    1. The 'SPK' doesn't have Symbols's appear count limitation feature.
    2. The 'SPK' doesn't have progressive jackpot feature.
    3. I estimate the working period for progressive jackpot as less than a week.
     
  43. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @outdoorsman
    Hi, i have no experience of implement unity ad yet. so, i can't tell you about errors while add unity ads.
    Could you tell me detail about errors you have experienced?
    I try to add unity ad for testing soon.
    And about the bonus wheel, I recommend you to add bonus wheel in lobby scene, and after user rotated the wheel, you can add bonus gold to user's gold, and save it like codes in OnButtonBuy function in UISGShop.cs.
     
  44. outdoorsman

    outdoorsman

    Joined:
    May 16, 2015
    Posts:
    32
    Thanks. I'll try that when I get a chance to work with it again.
    About the Ads, I get a parsing error and a namespace error. All I do is copy and paste and change the public class to match the script name. The simple ads work no problem, but the rewarded ads will not.
     
  45. wtadlock

    wtadlock

    Joined:
    Aug 1, 2016
    Posts:
    15
    to @chemael

    Thank you for the response. Based off of your comment, I am assuming that it means that you are working on implementing a progressive jackpot feature? Also, how hard would it be to add a symbol appears count? I would like to create tradition 3 and 5 reel slots, and this feature is a requirement for those.

    Thanks!

    Walter
     
  46. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @wtadlock
    Hi, I just answered to your question, and i'm not implement progressive jackpot feature now.
    I have a plan for update, but list of update features and update date was not fixed yet.
     
  47. johnpschmeidler

    johnpschmeidler

    Joined:
    Aug 27, 2016
    Posts:
    4
    I absolutely love this SPK!! I have a couple of questions though. I am not much of a coder, but can follow instructions pretty well. First, I need to know how to create a countdown where players can "claim" free credits after four hours or something like that. I think I have the in-app purchases figured out, but I know that most people won't want to play a slot where they run out of credits and then HAVE to purchase additional credits. I think most would rather at least have the option to wait it out, and then if they get tired of waiting, they can go ahead and purchase the additional credit packs. My other question is how I would make it so that players can press the "spin" button and expedite the lines won process. If there is a situation where a player wins on 20 lines, it takes a little while for it to finish showing everything, and some of the people that have tested my slot have expressed a desire to be able to either skip the line win process or expedite it. Thanks again for your amazing work, and for your amazing support!!
     
  48. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @johnpschmeidler
    Hi, Thank you for the good word.

    1. Recharge user's gold by periodically.
    I think that this job is not a simple one. so, I can not explain in a few lines of text that feature.

    2. Skip line won animation (and splashes).
    In Update() function of SlotGame.cs, you can find line won animation and splash display related code.
    If you want to skip line won animation and splashes while they playing, you must change sourcecode to skip this process and fill SplashCount array with 0.
    I have a plan to add this feature(skip animation) by next update. but the date of the update was not fixed.
     
  49. waloon

    waloon

    Joined:
    Sep 1, 2016
    Posts:
    2
    Hi
    Currently a full line wild pays nothing even if I configure a reward.
    Where can i change it ?

    And how can I check if 3 or more Bonus symbol for lauch a bonus game ?

    Thanks
     
    Last edited: Sep 2, 2016
  50. chemael

    chemael

    Joined:
    Feb 18, 2015
    Posts:
    195
    to @waloon
    Hi, Thank you for purchasing my asset.
    Here are answers of your questions.

    1. Full line wild reward?
    Currently, the 'SPK' doesn't check full line wild. It cheks only symbols with SymbolType.normal and has reward setting.
    If you want to change this, you must edit source code in CheckSpinWin() function in SlotGame.cs.

    2. How to check bonus symbol count in match line?
    Look at the CheckSpinWin() function in SlotGame.cs.
    You can add bonus count routine similar to check wild symbols count routine.
    Here is rough code.
    Code (csharp):
    1.  
    2. int BonusSymbolCount = 0;
    3. for(int x=0 ; x < Reels.Count ; ++x) {
    4.     if(GetSymbol(iResult[x]).type == SymbolType.Bonus) BonusSymbolCount++;
    5. }
    6.  
     
unityunity