Question about slots... Possible mathematical question
digitalzero
Member, BASIC Posts: 639
Ok so I am making a slots mini game and it is going to be a three reel slot thingy with only one line to win.... I have 9 different images and I need to find a way to make a table of all the possible outcomes... For instance...
Table_slots
Row 1- grape, Apple, cherry
Row 2- grape, Apple, banana
Row 3- grape, Apple, coin
Etc...
I know some of you have made slot games before and I hope that I worded it properly
Comments
Something like this should help (I Googled combination maker): http://textmechanic.com/Combination-Generator.html
You'll need 729 rows (9 * 9 * 9).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Omg tatiang thank you so much!!! I searched so hard yesterday but I didn't even know how to word the question lol
Out of curiosity, why do you need to have a table of all possible combinations?
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
You're welcome!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
If you delimit objects with a comma, you can import the output.txt file straight into Excel, click Next, check the box for Comma, and click Finish to separate everything into three columns.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
You will still need a "look for" controller to find winning combinations correct? I make slots games a lot and dont use tables. I woukd like to find a way to do it. Especially when introducing a wild....you have many combinations. I have had to hand do all of it and create a logic tree thats pretty extensive.
My biggest hold back with a wild in a 15 reel slots game with only 20 paylines creates a logic tree of about 7,000+ combinations...ugh. Tables can make this easier @tatiang ?
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing
@digitalzero
Here are some notes I made for a 15 reel slots game...you will see only the winning combinations for just one symbol...for each symbol you will need to create a method...if NOT tables to look for these winning combinations for your 6 symbols. Take a looky...
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing
@Armelline i am going to use a table to check the images for each seperate actor... there is only going to be one line to win... there will be three columns with different image names in them and the last column will tell you how much money you will get from winning... i will have a game attribute that randomizes the row in which prize you get
@Thunder_Child you have some pretty good handwriting btw
That's what I was thinking ! Super neat writing ! Compared to this my handwriting looks like a gang of spiders having a turf war.
@Thunder_Child Um... maybe? Tables make organizing such lists easier, that's for sure. I haven't spent much time thinking about slot machines but as an answer to the question of how to create such a table, it's a cinch using a website like the one I posted.
But searching a table for matches during run-time probably isn't the most efficient way to find them. I'd think it makes more sense to check them on the fly (e.g. When game.firstSymbol=game.secondSymbol=game.thirdSymbol ... winner!) but again, I haven't worked with slot games at all. If you needed to assign point values to various combinations and search for those I'd have to think about how best to do that.
Edit: okay, my initial thought would be to concatenate the three symbols. If you wanted to search for Apple, Apple, Cherry, I'd first code the table rows as three letter (or you could use three words) values: AAA, AAC, ACA, ACC, CCC, etc. Then I'd concatenate the current spin: AAC. Searching for AAC using the tableSearch function would be very quick. And that way you don't have multiple columns of text to deal with.
You could also use string functions:
When textSubStr(game.spin,1,1)=textSubStr(game.spin,2,2) and textSubStr(game.spin,2,2)=textSubStr(game.spin,3,3)
[you matched three!]
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@digitalzero Check the output of that site carefully. I found some duplicates in a test txt file I downloaded.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@digitalzero @Socks
Thanks...I dont know why but many people say this. Strange becasue I can ONLY write this way with technical pencils....7mm...#2 soft...and only in Capital Letters ! Lol. Another thing...thats sad really is I have a slight OCD when writing...if there is one thing out of place...written incorrectly...I cant just erase it I have to start over. Here is a few other notes and another note for a game I had in mind I will probably never make...I bet I wrote this 20 times before I set this one aside in my very neat and ordely notebook
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing
Thanks @tatiang ... Are there video tutorials on how to use table functions..
There are! @Braydon_SFX Has some and I'm sure there are others at http://forums.gamesalad.com/categories/community-tutorials.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks for the mention, @tatiang!
@digitalzero - I have videos for each of the new table functions (and vids for some of the regular functions) starting on page 1 of my community tutorial thread. You can find it here: http://forums.gamesalad.com/discussion/63093/community-tutorials-by-braydon-sfx/p1
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
You all are the complete best!
Here is another texhnique I am about to try...
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing