Slot Machines – Small Basic Featured Program


Screen shot of a program Jackpot! (Slot Machine)

In LitDev's April Challenges: https://social.msdn.microsoft.com/Forums/en-US/3b975ffc-cbfd-407c-ab95-74912e57c65d/challenge-of-the-month-april-2015?forum=smallbasic

 

We had the...

Game Challenge

Write a slot machine game - pull the handle, spin the wheels and win win win.

 

 

Jibba Jabba submitted this beauty:

Here's my Slot Machine solution: JPT105  It uses some .au sound files so these may not run on some pc's.

 

You have to run it locally to get it to work! That means...

  1. Download Small Basic: http://social.technet.microsoft.com/wiki/contents/articles/30513.download-microsoft-small-basic.aspx
  2. Click Import in Small Basic
  3. Paste in the Import Code: JPT105
  4. Click Run

  

The highest I got up to was $35. I know. I'm no expert. What can you get up to?

 

Have a Small and Basic week!

   - Ninja Ed

Comments (20)

  1. anonymouscommenter says:

    WOW, what fun! Thanks Jibba Jabba! Awesome job!

    In BASIC even!

  2. Jibba Jabba says:

    It pays out well. I've had a couple of Small Basic Royalies. That's when you have 3 squares matching the SB brand colours. That'll pay you $500.

  3. Jibba Jabba says:

    Thanks blain.

    I will rewrite the code with a bit of structure and have all timer updates done in the UI thread. Sometimes I just hack out the idea first to see if it will work then go back and structure the code into an easier to follow game loop.

  4. I love the Small Basic jackpot of getting the three colored squares! Pretty funny! =^)

  5. I love this 🙂 But I'm not lucky 55$ max, I'll continue !

    However I needed to change colors because I'm color blind and I does not distinguish between two of them.

  6. (translated by Google-translator)

    Very nice program.

    I am happy that I found your community. I will be very happy if I could be your friend.

    Evgeniy M.

  7. anonymouscommenter says:

    Jibba Jabba:

    The UI is in my opinion is as good as any professionally made game. The graphics and sound top-notch!

    Perhaps you could write some tutorials! How about some other games like say Video Poker.

    Are you a professional programmer? If not can you give us some info about yourself (only if you feel comfortable). Myself I've programmed on computers only as a hobby as far back as the C64 and Atari 400.

    Loved typing in programs and learning about the computer. Perhaps a project we could do is a community magazine that we can share with others to promote Small Basic. The magazine could include type in games, contests/challenges , articles about Small Basic concepts. I don't have any idea how to do this just thinking.

    Blain

  8. (translated by Google translator)

    Hello everyone.

    I want to perform my first task. I chose the task from topic "Small Basic Challenges – April 2015".

    Now I can not upload a picture from the Internet, as it makes Jibba Jabba in his program "Slot Machine".I can not upload an image from Google Drive and OneDrive, though I did open access to it. Any other images from any other sites have been loaded.

    Please tell me which site is best for storing those images that I will use in programs that will show in the community Small Basic?

    Thank you.

    Evgeniy M.

  9. I'm having trouble getting the images to display. Anybody else?

    Thanks!

  10. Yan, well your $55 is more than my $35! I think I lack the focus to do slots for that long!

  11. Glad to virtually meet you, Evgeniy!

    Please head to the forums and run your programs and questions by the community: social.msdn.microsoft.com/…/threads

    Thanks!

  12. Blain,

    I love your idea of a community magazine! In the past, for other products, we've done it with Flipbook. I'd love to learn more about your idea.

    Can you email me? It's edprice at Microsoft. Or add me on Skype (that's better). It's live:edwardnprice

    Thanks!

  13. Evgeniy, great question about images best practices! I'll see if Jibba Jabba and the team can weigh in on it.

    Could be a good Wiki article.

    Thanks!

  14. Jibba Jabba says:

    Hi blain

    Thanks for your comments and excuse my delayed reply. I'm learning with SB as I go – so progress and replies sometimes take time.

    I'm not a professional and began coding using SB as mentioned in my bio social.msdn.microsoft.com/…/Jibba%20Jabba

    I code because I like it. The information revolution has gifted me the opportunity to do this in a self determined and self paced way.

    I'm learning web programming atm and building my own website to practice this. SB will be a main source of content for it. Tutorials aren't on my agenda atm but I'm building a program gallery where the code is discussed from a top down POV with links to relevant articles.

    Small Basic and its landscape provides infinite opportunity to learn by participation to almost anyone. That's a wide audience. So I like your thoughts on a Magazine. You might also source content for this by way of interviews. Get some leads from the community (their likes, dislikes, hopes and thoughts on SB, past, present and future). You might also get some goss from MS as well. This would a great project for a budding tech journo.

    Magazine eh? Gee you could really do something with how this is presented. I'd even chuck in a SB Fashion feature. Does SB look good on my Win10 convertible. Take designs for SB apparel like caps, tee-shirts, lap-top bags and so on. Should the IDE come with a choice of pink, blue, black or purple. Accessibility in the hands of the user to be who they are.

  15. Jibba Jabba says:

    Ed you mentioned: "I'm having trouble getting the images to display. Anybody else?"

    If you're talking about images for the game, they could be slow or get broken depending on your connection or the host. If so try again later.

    I'll be recoding this and adding it to my "coming soon" gallery. The gallery will be supported and supply Program IDs. Hopefully in the near future i'll post links to the gallery and SB folks can get the ID there. That way updates filter through to the community. Hopefully this will work.

  16. Jibba Jabba says:

    The graphics etc can no longer be downloaded into the program ID so I've posted this game on the gallery:

    gallery.technet.microsoft.com/Slot-Machine-1f5bb1fc

  17. Jibba Jabba, why do you think the graphic can't be downloaded into the program ID? Did something change?

    Thanks!

  18. Jibba Jabba says:

    Yes. This was naĂŻve on my part. The free webhost I was using applied some security feature that prevented acquiring anything automatically (e.g. by a Small Basic program)

    I reckon if you're going to remote host program assets then it's wise to do it with a registered domain name.

    That way if a free host makes changes you can then just move your site and re-point your domain name.

    I've learnt my lesson and registered a domain name, only costs like $20 pa. Can't stop me now.

    In the mean time I've put all my stuff on the gallery.

Skip to main content