Unity How To Make A Slot Machine Game

Posted on  by 

This is a slot machine that resembles the real slot machines in the casinos. To create the project, you need to insert three image boxes into the form and program them so that they will display a set of three different pictures randomly when the user presses on the spin button. It involves a randomization process. Next, a timer needs to be incorporated into the procedures so that the program can produce animated effects. In addition, you can also insert the Microsoft Multimedia Control so that it can play sounds in synchronization with the spinning of the slot machine as well as when the player hits the jackpot. You can design any interface you like. We have created an interface as shown below:

225k members in the Unity3D community. News, Help, Resources, and Conversation. A User Showcase of the Unity Game Engine. Postap Slot machine game template This content is hosted by a third party provider that does not allow video views without acceptance of Targeting Cookies. Please set your cookie preferences for Targeting Cookies to yes if you wish to view videos from these providers. I have been doing Digital Tutors courses on Unity and have the basic concept of the UI, etc. I have also tried other slot machine assets from the Unity asset store but they all required far too much pre-existing knowledge to make something work immediately. Thanks for taking the time to read through this post and I look forward to any responses.

The Interface

The Video Demo

The Code for Spin Sub Procedure

The three random variables a, b and c will be randomly assigned the values 1, 2 and 3 using the RND function. Based on these three random numbers, three different pictures will be loaded into the three image boxes randomly using the LoadPicture method. Animated effects are created by putting the above procedure under the control of Timer1, which will call the spin procedure after every interval until it fulfills a certain condition. Sounds are also added using the Microsoft Multimedia Control to make the game more realistic and interesting. The amount won is controlled by the If...Then...End If statements

It is important that you define the correct path for the LoadPicture method, otherwise the program will not be able to run. For example, our path is C:VB programImagesgrape.gif, you need to create the necessary folders and have the necessary image file if you wish to copy the program directly. If you place the image file in a differently folder, you need to modify the path accordingly. For example, if your image file is in D:VB programImagesgrape.gif, then you need to modify the LoadPicture method to LoadPicture('D:VB programImagesgrape.gif').

If you wish to use our image files, you can download from the links below:

sound and the other for the jackpot sound. Below is the video demo of the slot machine simulator.
Game

Copyright©2008 Dr.Liew Voon Kiong. All rights reserved |Contact|Privacy Policy

hi pls I need someones help. i am not good at programming and i have this subject ; but i am a BSBA major. it is like free section for me and i want to learn it to so i can be flexible. but this project is getting all my soul. We where told to create a game using a C# . a very simple game . then the prof listed games to pick like snake, tictactoe, etc. i picked the slot machine figuring that i already thought that its using timer , and bunch of if statements so i picked it. I am already done with the timer part and pictures part but the if statement is what i have been troubled. i dont know what to do. i thought that its only if pic1.image pic2.image. /// so on so forth.....
can you help me i want it to be when the picturebox hit lets say 3 banana the amount bet is multiplied.... here i will post my codes as well as a linked to download my project.... i really badly need some1 help.

in the downloadable is forgot to put a on the end part of the path.

the link: http://www.4shared.com/zip/1bJpVMk4/project_final_2.html

really appreciate the help.

Editedby kidkardel because:typo
Unity How To Make A Slot Machine Game

Unity Slot Game

  • 4 Contributors
  • forum5 Replies
  • 2,687 Views
  • 1 Day Discussion Span
  • commentLatest PostLatest Postby tinstaafl

How To Make A Slot Machine Game Unity

Recommended Answers

Sorry, we do not delete posts on request. Please see the DaniWeb '>Terms of Service statement:

Posts contributed to the community immediately become the property of DaniWeb upon submission. Members may edit their …

Jump to Post

Unity Slot 7

You could do this if you create your own Image class. Something like:

Jump to Post

All 5 Replies

Best Slot Machines To Win On

how can i delete this thread. or can som1 delete this thread pls. tnx

Coments are closed