Search Unity

Custom Slots framework

Discussion in 'Assets and Asset Store' started by noanoa, Mar 24, 2016.

  1. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Demo

    Documentation

    Asset Store Link


    Custom Slots(CS) Framework is a lightweight, flexible modular slots framework that can be integrated to your project as a mini-game or as a standalone full-featured slot machine game.

    While offering full customizability, CS tries to maintain its core simple and adaptable to any scene a spinning reel could participate. It is also built purely on UGUI to keep up with Unity updates and to make integration less painful.


    Feature

    * Any number of reels, rows, symbols, lines, effects etc supported.

    * Automatically adjusts layout according to your setup.

    * Procedural symbol loadout generation and simulation.

    * Pop multiple instances of CS with smooth transition any moment should your game need.

    * Effects can be easily tweaked via inspector, or disabled to use your own.

    * Wilds, scatters, free spins, betting and other slots functions supported.

    * Change reel behaviours and swap symbols upon entering free spin, bonus etc.

    * High Performance, optimized C# codes, minimum Updates, no GC Allocation during updates.

    * Bonus pay table generator included.

    * Callbacks and runtime capability, extendability.

    * A full-featured complete slot game included as Demo.

    * Included free-for-commercial-use arts by Nz.

    * Detailed documentation.


    CS is part of my other game-under-development and you can expect updates coming as the development progresses.

    We are also available on the official CS thread on the Unity forum.

    Please do not hesitate to ask a question or report a bug you found.

    ( CS uses Demigiant's powerful Tween library DOTween. It is not necessarily to learn DOTween but desirable to fully understand and customize CS. )
     
    Last edited: Oct 5, 2016
  2. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    You can manually put symbols to any position on your reels in CS though that may require lots of drag&drops.When a reel reaches the bottom line, it will repeat from the start in the same order.
     
  3. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Sorry for the late reply, I will check the forum more frequently.
    Setting up reel is pretty simple, here's the section of documentation meanwhile I make a short video( should be uploaded later today)


    Manually Placing Symbols

    To manually setup symbol loadout for your slot, first select a reel in your CS's hierarchy to bring up inspector. Then drag a symbol from SymbolManager and drop it to the Symbols list.


    It is not necessary to do this but to update sprite images in a scene view, click "Refresh Reel" button on the inspector after editing symbol loadout.


     
  4. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    And here's the tutorial vid!

    ( note that portion of the hierarchy structure is slightly different from the current version )
     
  5. Maedhros

    Maedhros

    Joined:
    Sep 22, 2013
    Posts:
    1
    Perfect! Thank you very much.
     
  6. ATeam_Production

    ATeam_Production

    Joined:
    Nov 23, 2013
    Posts:
    82
    Hi,
    I like your slot machine demo, really good job!
    Does it work well for android/ios game?
    Have you an .Apk of this demo for test?

    Have you any idea of a list of future features to be implement?
    Possibility to have several different slot machines to unlock for example (with level progression)?

    Smooth, dynamic and good slot machine spirit, I like it!
     
  7. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Hello there. Unfortunately, I haven't a mobile development environment on my PC to test the performance atm. Most of drawcalls on the demo come from ugui text and it should run smoothly on older mobiles if optimized. I might be able to ask my friend to test it later today.

    As for the future plans, we are kind of running out of ideas( as most of the features we wanted to have are already implemented) and eagerly waiting for user's request/feedback. A generic lobby system might be a good feature to start with.


    [Edit] Uploaded apk file made from Demo Note that this is not optimized for mobile. ( About 27 drawcalls when playing and 50 when intro animation is played due to color tweening.)
     
    Last edited: May 26, 2016
  8. ATeam_Production

    ATeam_Production

    Joined:
    Nov 23, 2013
    Posts:
    82
    Thank you noanoa,

    Even if it's not optimized for mobile, good .apk demo on my Samsung Galaxy note 2.
    Good Job! I really like your work.
    One of the most interesting Asset for a Slot Machine here on Unity Asset Store. I have to think about it.

    Thank you for your reactivity and feedback.
     
    noanoa likes this.
  9. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Upon updating to Unity5.4, it seems Unity shows some error message related to editor windows but CS works fine after. Will try to fix the error message nonetheless if we can. Version 1.3 will have some interesting features like passive result display(no longer stops the gameplay), 243 ways style line generation and methods to land certain symbol at where you want on reels.

    The required version of Unity will still remain at 5.3 for version 1.3. We appreciate any feedback or bug reports, thanks. Also, feel free to request text or video tutorials.
     
  10. navinverma

    navinverma

    Joined:
    Mar 27, 2016
    Posts:
    1
    Hi noanoa,
    I have a question. The reels and rows are Grid Layout Group. How to scale it with different screen resolutions? The UI canvas scales properly but the rows and reels doesn't. Help.
     
  11. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Sorry for the late reply. Can you tell me your canvas setup?(UI Scale Mode, Screen Match Mode, etc).
    It seems I never get to receive notification Email for new comments on this forum.

    Please feel free to PM or Email me directly if not getting my response.
     
  12. johnpschmeidler

    johnpschmeidler

    Joined:
    Aug 27, 2016
    Posts:
    8
    WOW!! I am absolutely stunned, amazed, and impressed with your asset!! I am sure that everyone agrees that yours is by far one of the best in the world as far as quality, the amount of work that you have put into it, and with your customer service!!

    However, I do have a couple of inquiries.

    First, I am trying to figure out a way(easiest possible) to make it so that when a player is done playing on a mobile device, and they close the program, their progress will be saved so that on the next time they play, they will start with the same amount of coins that they left the game with. This would also be handy to save the level that they have reached.

    Second, I would love to find the easiest way to make it so that when they player reaches a new level, they can be rewarded with a certain amount of coins. I think this is an amazing way to help retention and to keep the players....playing!

    I am pretty weak when it comes down to, from scratch coding, however I am pretty good at following instructions. If you have directions and/or any pictures or a video.....That would be amazing!! I would be forever grateful!
     
  13. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Thanks for the compliment :)

    Save/Load methods using PlayerPrefs have been already added to the coming version of CS as part of Elos Demo. I will PM you shortly with the code and instruction. As for the event on leveling up, I've also added a simple example to start with.

    On the second thought, I should probably send you the script(Elos.cs) rather than copy&pasting all the lines. If it's okay with you, please drop me an Email at rfish(at mark here)mbg.nifty.com.
     
  14. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Updated the demo link since web service is no longer available at dropbox. It might take a few days for the link on the asset page to be updated.
     
  15. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Submitted version 1.3 to asset store and waiting for approval.

    version 1.3

    * Added an option to display win results as passive playback. The result playback does not halt the gameplay and can be canceled any time. (Effects -> Line Hit Effect -> Displays Playback option on CustomSlot inspector).

    * Added a button to generate "243 ways" lines(Although not limited to regular 5x3 slots(243 lines)) on LineManager inspector.

    * Added an option for alternative payline check for "243 ways" style slot. When enabled, there will be only 1 win for each hit chain. (repeated/same chains are ignored).
    * Added a few helper functions to easily access/modify/swap symbols on a reel at runtime.

    * Added SetManipulation() method which enables you to make reels stop at certain symbol. Please refer to the documentation for more information.

    * (Elos) Added "Level Up!"event when leveling up.

    * (Elos) Added an option to control BGM/SFX volume using AudioMixer.

    * (Elos) Added an example for saving/loading gameInfo to playerPrefs. Also, added an button to delete save data on Elos inspector.

    * "Back" button now works properly on Android.

    * Updated documentation.

    * Updated DOTween.

    Note: We're aware that the current documentation doesn't cover all the new features added.
    Next update will focus on fulfilling missing documentation and adding comments to runtime methods as well as fixing/improving the existing features.
    Meanwhile, please feel free to ask us questions or request examples/tutorials.
     
  16. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Found a bug in the new version where CS doesn't take account of "Spin Stop Delay" when using reel manipulation which was causing reels to suddenly stop without delay. (Thanks to whom reported it to us).

    The fix should be submitted to asset store for approval within a few days if no other bugs were found. It is not necessary to update your CS if you don't use the reel manipulation feature.
     
  17. ecequalsm2

    ecequalsm2

    Joined:
    Jan 14, 2016
    Posts:
    7
    Hi,
    I just have a couple quick questions before purchasing your asset. First, I noticed there is a single vertical reel option in the demo. I was hoping to use something like that for my game as a bonus slot. Is there a way to make it stop automatically after one button press? And second, do you intend to implement any Playmaker integration in the future?
    Thanks,
    Milan
     
  18. WBeren

    WBeren

    Joined:
    Jan 28, 2017
    Posts:
    3
    Hi,

    I am considering your asset for my project. It seems to be the only one on the asset store which lets me manually design the reel strips. I have 2 requirement which are probably not possible but would like to ask:
    1) apart from setting the symbols manually the way you do it would it be possible to import them from an external file?
    2) is there any way to use multiple reel loadouts in the same game and switch between them in runtime?
     
  19. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    1.Yes, CS has a wide variety of options on how reels start/stop spinning. If they are not enough, you can always email me and I'll send you some custom cods.

    2.Unfortunately no. I am not familiar with Playmaker and I'm afraid I don't have time to learn it currently.
     
  20. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    1. No, there's no built-in importing feature. Although, if it's something simple like importing from excel file, I might be able to provide some codes for it.

    2. Yes, symbols can be replaced or reel loadouts can be wholly replaced in runtime.
     
  21. makoto_snkw

    makoto_snkw

    Joined:
    Aug 14, 2013
    Posts:
    340
    1. Can the *cough* winning probability *cough* being tweaked? Because your winning rate too high for the players now.

    2. I plan to use combu with this to serve as Players Data. How did you save that "Credit" variable?
     
  22. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    1.Yes, winning rate can be tweaked either manually or by using built-in generator. Although, the result the generator outputs is random so you might need to hit the "Generate" button few times.

    2. On the demo, we simply use PlayerPrefs to store values which are just 4x int values. You would have no problem saving them on any storage/device.
     
  23. makoto_snkw

    makoto_snkw

    Joined:
    Aug 14, 2013
    Posts:
    340
    Thanks for replying me! :D
    You have 1 purchaser coming. :)
     
  24. Gary-Pearson

    Gary-Pearson

    Joined:
    Apr 10, 2013
    Posts:
    2
    Can you tell me if the documentation is available to download anywhere? the dropbox link is not working and I would like to have a read up before I consider buying the asset

    Thanks
    Gary
     
  25. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Sorry, I've fixed the link( may take a few days to publish)
     
  26. WedontknowGames

    WedontknowGames

    Joined:
    Nov 30, 2016
    Posts:
    2
    Hi,

    I'm wondering if you're still taking feature requests for this. I'm using this framework (it's fantastic), however, I need a manipulation that will stop each reel on a specific index in the loadout. Say a reel has 20 predefined symbols, I'd like to stop row 0 on index 14 in the loadout, the next reel on index 5, next 19... etc. This way I can force the reels to read the exact way I want on all rows, if this already exists I must have missed it, haha!

    If not, no worries, I'll figure out how to make it happen!

    Regards,
    Conrad
     
  27. WedontknowGames

    WedontknowGames

    Joined:
    Nov 30, 2016
    Posts:
    2
    Oh man, go ahead and disregard that last post. It looked like Setting the manipulation to an array of indices was producing different results on the lines outside of the offset. The day must have been too long. It does work how I thought it did!
     
  28. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Glad to hear it worked! Let us know if there's anything that needs to be fixed.

    Also, to anyone who's reading the forum, please don't hesitate to PM me if you have any question or if my response is too slow.
     
  29. InglewoodTechnology

    InglewoodTechnology

    Joined:
    Mar 7, 2016
    Posts:
    40
    Great asset, a pleasure to work with. I have foolishly asked the line manager "Generate Way Game Lines" and now wish I hadn't. Any way to restore or reload the previous default line data?
     
  30. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    I'm sorry, the action can't be undone once performed.
     
  31. InglewoodTechnology

    InglewoodTechnology

    Joined:
    Mar 7, 2016
    Posts:
    40
    Fair enough, the editor did try and warn me!

    I am also trying to customize demo layout; I have resized the Mask and the Reel grid cell size, looks great. But when Line.cs draws the payout path (DrawPath()), the points on the path are set to the old dimensions/positions. It looks like Line.DrawPath() is using values from SlotLayouter.cs? In general, now that I have moved Reels and Lines, how do I get Line.DrawPath() to draw good paths?
     
  32. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    The grid cell size can be and preferably should be changed via "Layouter -> Size Symbol" field on the CustomSlot's inspector. But if you have to manually change the grid cell size, you can try modifying the script at line 87 in Line.cs.

    Replace

    float cx = slot.layout.sizeSymbol.x + slot.layout.spacingSymbol.x;
    float cy = slot.layout.sizeSymbol.y + slot.layout.spacingSymbol.y;

    With

    float cx = slot.layoutRow.cellSize.x + slot.layoutRow.spacing.x;
    float cx = slot.layoutRow.cellSize.y + slot.layoutRow.spacing.y;

    If that doesn't work, you can also send me your project and I'll take a look.
     
    douglas128 likes this.
  33. InglewoodTechnology

    InglewoodTechnology

    Joined:
    Mar 7, 2016
    Posts:
    40
    That was it, perfect, thank you for the excellent support!
     
    noanoa likes this.
  34. InglewoodTechnology

    InglewoodTechnology

    Joined:
    Mar 7, 2016
    Posts:
    40
    A larger, more general question:

    I'm trying to port Custom Slots to using a more flexible layout; in the end, I'd like to embed Custom Slots in a web page that allows full screen on whatever device the user is using. It seems that a lot of the layout is controlled by fixed values in SlotLayouter, which is inconvenient.

    To adapt to a flexible on-the-fly layout, how can I, for example, tell the SlotLayouter to use relative values instead of hard-coded values? For example, I'd like to have a flexible Reel container that is 50% screen width and 75% screen height, and in that container, have each symbol be 33% container height and 20% container width. Will I have to modify SlotLayouter values on-the-fly and recalculate each for the current resolution, or is there a way to embed the layoutter in a flexible container and get relative values out of it, or some other more elegant method?
     
  35. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    There seem to be several workarounds for your case. You can change the scaling of reels without breaking layouts so the easiest way would be to add the below line somewhere in CustomSlot.cs(for example, in the Update() method at line136)

    mainScreen.localScale = new Vector3(Screen.width/mainScreen.sizeDelta.x*0.5f, Screen.height/mainScreen.sizeDelta.y*0.75f, 1);

    The symbols should also scale with the reels according to your screen size. Pleaes let me know If this isn't what you are looking for.
     
  36. InglewoodTechnology

    InglewoodTechnology

    Joined:
    Mar 7, 2016
    Posts:
    40
    I'm looking to add reel locking; user selects a reel it is is "locked" and not spun for the next spin. It's not clear to me how to have a reel skipped in sequence in the code.

    Would I add logic to this line in CustomSlot.StartSpin():

    foreach (Reel reel in reels) sequence.Append(Util.Tween(_delay, reel.Spin));

    to have it skip the reel in question, and then also in this line in CustomSlots.StopReel():

    reels[currentReelIndex].Stop();

    So that it doesn't try to animate the stop for the reel in question. Are these the appropriate/only places to control for reel locking?
     
  37. InglewoodTechnology

    InglewoodTechnology

    Joined:
    Mar 7, 2016
    Posts:
    40
    Oh, never mind, found the logic in reel.cs, just added a public bool to indicate if Spin() and Stop() should be skipped.
     
  38. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    It's been a while since the last update. Recently there has been a bug report where symbols would disappear or appear in weird positions when spinning reels very fast or when FPS is very low. An update/bug fix should be available sometime late this month. I'm also going to test the compatibility on the latest Unity.
     
  39. ATeam_Production

    ATeam_Production

    Joined:
    Nov 23, 2013
    Posts:
    82
    Eventually this next update could be the good time for a maxi discount for few days (I try ...) :)
     
  40. Dark_Megami

    Dark_Megami

    Joined:
    Aug 31, 2017
    Posts:
    4
    Hi, Im trying to update the framework to use imported 3D models for symbols. Is that possible? I was able to make the symbols in the symbol manager take a mesh instead of a sprite/image but then I don't see the mesh in the editor or when I play the game. Also it will only show the texture images in the Sprite Symbol folder in game. So even if I delete all the symbols in the symbol manager it will still show those. Also if I add my model to that folder it will not show. Is there an easy way to do this or is this beyond the scope of the framework. Thanks!
     
  41. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Hello, yes it's possible to use 3D models. Although, RectMask2D obviously doesn't work with 3d models so you might want to add a quad mesh or use a shader to hide the symbols that are supposed to be masked.

    Here's a brief tutorial to use 3d model as a symbol.
    1. Add a cube gameobject to YourCustomSlot->Skin Manager->SymbolHolder gameobject. Scale the cube gameobject to 100x100x100.

    Add below line to Symbol.cs.(at around line 23)
    public Texture2D tex;

    Add below line at line 42 in SymbolHolder.cs
    GetComponentInChildren<MeshRenderer>().material.mainTexture = symbol.tex;

    2. On the inspector(symbols under SymbolManager), you can set "Tex" instead of "Sprite" to specify the texture.

    This example only changes texture of cube but please feel free to ask/email me if you needed more detailed example .
     
    Dark_Megami likes this.
  42. Dark_Megami

    Dark_Megami

    Joined:
    Aug 31, 2017
    Posts:
    4
    Thank you :D! I did something similar and also updated the script to take in gameObjects. So I can link to prefab objects/ imported models. Probably not necessary but done xD. And I changed the code to turn off certain rows when they are off screen to solve the mask issue. The problem i'm having now is the wins are not correct >_<. I'm assuming its because I shut off certain rows? I will try your example of a quad mesh or shader instead. If you have any more insight into why this might cause issues or any suggestions that would be great. Thank you for responding :)!!
     
  43. Dark_Megami

    Dark_Megami

    Joined:
    Aug 31, 2017
    Posts:
    4
    For instance I should have won here but I didn't. But some 3 in a rows do win.
     

    Attached Files:

  44. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Turning off rows should not affect the wins. I see in your screenshot that some lines on the LimeManager are disabled( "#1 (row 0)" etc) and that might be the problem since disabled lines will not evaluate wins. Or it might be the "Pays" setting on symbols. If you can't figure out the problem, feel free to send me your project and I'll take a look.
     
  45. Dark_Megami

    Dark_Megami

    Joined:
    Aug 31, 2017
    Posts:
    4
    Thank you! I disabled them because I only wanted wins straight across the 3 rows. Is that not the way you should do it? I also have my Pays set to 0,0,10000? If I can't figure it out by tomorrow I will send you the project. Thanks again for your help :)!
     
  46. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    No problem :)
    I didn't notice the inspector on the right, and yes, the setting seems to be alright. I'll wait for you project. ( My email address can be found on the CS's store page (support email link) )
     
  47. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    I've recently recieved a bug report where reel manipulation may not work as intended. To fix this, replace the GetStopDistance() method at line 157 in Reel.cs as follows.

    Code (CSharp):
    1.         public int GetStopDistance() {
    2.             if (manipulation != null) return Mathf.Clamp(slot.currentMode.reelStopDistance + 1, 0, slot.config.hiddenTopRows);
    3.             return Mathf.Clamp(slot.currentMode.reelStopDistance + 1, 0, slot.rows.Length);
    4.         }
    As this has been so far the only change since the last version, I'd like to wait a bit longer before committing an update.
     
    douglas128 likes this.
  48. vastar

    vastar

    Joined:
    Apr 6, 2013
    Posts:
    25
    How can I create payment and draw vertical lines?
     
    Last edited: Nov 2, 2017
  49. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Do you mean pay-tables? What kind of vertical lines would you like to draw? I check the forum more frequently for a while after seeing a post/question but always feel free to PM or email me if you are in a hurry.
     
  50. vastar

    vastar

    Joined:
    Apr 6, 2013
    Posts:
    25
    I sent you an email on Thursday.

    No pay-tables. Match in vertical lines as an 8 lines slot.
    in video
    in 0:38 have a example.
    Sorry my english not good.
     
    Last edited: Nov 4, 2017