Help Creating Bingo Style App for Charity Event

Hi guys,

I’m new here and to programming in general. I’m looking for help and advice on creating a bingo caller style app for a charity event I’m running. I need the app to be like a normal bingo caller where it shows the numbers called, but also the number thats due next. I also need it to be split screen.

Thank you

Why does it need a split screen?

There are loads of ways to do this, but here is one…

First, you need to create a dictionary as a property of a window
Then, add a button.
The button generates a random number between 1 and 90
Check the dictionary using .haskey … if the number has been used, get another random number and keep doing that until you find a number that hasnt been used.

//think of a number
//While thedictionary.haskey (thenumber)
//thenumber = random number between 1 and 90

Then display the number.
Also display the numbers that have been used… listbox, grid, whatever.

How you stop is up to you.

Do you know how to use Xojo?

Hi Jeff,

Thanks for your response. I’m new to xojo and programming but I should be ok to pick the basics up. I need it to be split screen so the split screen can show the number thats been called but not the number due next or whats been called.

We’re doing a charity bonkers bingo style night so we need to know what number is next up so the dj can have the song ready to play.

That is unnecessarily complex. Why he has to press a button 90 times?

  • Create an empty integer Array as a property on the window

  • At the window openning use Array.Add in a FOR to populate the array with values from 1 to 90 (or the numbers of your bingo)

  • Use Array.Shuffle to randomize the array

  • Use a variable to track the “Current index” in the array

  • Extract the number from the current index and the index+1, +2, etc to see the upcome values

  • For the “split screen” use a second window

Why does he need to press a button 90 times?
I didn’t say that.

He presses a button to get ‘the next number’.
If it generates a random number, it may need to loop to find an unused one.
As I said, there are other ways to do this, such as pre-seeding an array and removing one random number from that each time.

Split screen on two windows? … this only makes sense if there are two monitors connected so that someone can only see one of the windows, I guess.

Thanks for the help guys I’ve attached a picture of what I’m thinking, what would be the best and easiest way for a complete novice to do it this way?

The numbers in the grid in the top left will obviously go bold or circle as they’re called out. Bottom right is the next number due, middle button to press for the next number and bottom left to show the number that’s just been called

subclass a canvas and add a few methods and define own events there.
it helps if you add the needed methods first and then you fill them with live one by one.
if u use .refresh it invalidate a canvas and a paint event occur where you paint the properties (data).

i would use 4 sublassed canvas that it match your concept on paper.

Hi guys,

I’m struggling with understanding the above. I’m completely new to xojo and programming, any help is appreciated. I’m happy to pay for the help.

Thank you

Welcome @Matthew_Fitton,

What have you been trying already?, what are you struggling with?, can you maybe defer where you are stuck and continue working on another piece of the app?

As a general advice, try to split the problem in smaller chunks and ask specific questions, so the community can give you more accurate tips.

1 Like

Hi Ricardo,

Everything haha. How do I create the grid showing numbers 1-90 that cross out when a numbers been called? How do I get the button to action a random number from 1-90 to appear? How do I get that number to appear in the ‘number called box’ and how do I get the next random number due to be shown to show in the box once i’ve clicked the button.

Have you written any code at all at this point?

Do it bit by bit.

Write a method that returns an unused value between 1 and 90
Drop a button on a window, and have the button get that value and just display it in a messagebox so that you know that is working.
Write a method that resets this ‘list’ for a new game.

Add a listbox, and each time you press the button, add the number to the list so that you can see what has been called.

Add a label, set the font size to 100, and use the label to show the chosen number when the button is pressed.

And so on…

We’ll help, but we won’t write the app. :slight_smile:

Hi Jeff,

I haven’t wrote any code as yet. What would the method line need to be to return the unused value. Like I say, I know i’m asking alot so i’d be willing to pay for the specific help.

I’m not saying you shouldn’t have fun writing your own app, but there are lots of bingo-calling apps available. Just do a search for “bingo caller” on the macOS App Store.

Hey John,

I know mate, the issue is they don’t have split screen and it doesn’t show the next number due to be called. The reason we need this is music is played depending on the next number so it needs to be quickly selected before the numbers called.

This looks like a fun project to learn Xojo.

I think this is more or less what you want, as per your sketch:

Here is how it looks like in Xojo:

For the game “business logic”, you can create an empty class and follow the steps from @Jeff_Tullin or @Ivan_Tellez, whatever you prefer. Add any non-GUI related stuff there, like the helper methods you’ll need later.

For the Grid, you can go crazy and draw it from scratch, using a DesktopCanvas. I’ve did it using a DesktopListBox, and implementing the PaintCellBackground and PaintCellText events. Again, this is up to you, if you prefer drawing on a Canvas, that’s fun also.

If you keep your GUI separated from the business logic, it should be easy to create new windows and maintain them in sync, so you can use them in multiple displays.

As a bonus feature, you can use System.Speak, if you want your OS to “read” the number, once you press on the next number button.

I hope this can help you to start. Ask if you need any help!



This is literally perfect!! Can I not just buy this off you :joy::joy:

Please send me a message, I’d be eternally grateful.

Isn’t as fun as coding it yourself, but I can upload the project to GitHub, if you want, so others can also learn.

That would be perfect! I’d really appreciate that. I don’t mind having a go myself it’s just because I’m new to this and trying to find a solution for our charity fund raiser.

Have you bought Xojo, or are you planning to install Xojo on some machine there and run an app in debug mode?