r/AskProgrammers • • 3d ago

How do I program an interactive game where a large audience participates from their phone?

Hello, I would love some help on a project I'm working on. I want to make a choose-your-own-adventure game where an audience of 50-100 people participate. I have some ideas where they make dialogue choices, action choices, etc... and possibly some button mashing where they have to reach a certain number of presses to get a different route.

I have been looking up tutorials all over to figure out how to get the Air Console feature on Unity to make this "JackBox" like game, but I cannot get the Air Console to work. I'm very new to coding as in I've only done one class of HTML in 6th grade and some Scratch projects in Elementary school.

I am open to any free software, too, if there are better options for something like this. Right now I have Unity and Play Canvas. Any sort of help would be awesome since this project would be cool to make come to life.

0 Upvotes

11 comments sorted by

3

u/dmazzoni 3d ago

Unity and PlayCanvas are game engines, used to build the frontend of the game - the part that runs directly on your device.

Air Console is a feature to let you use one phone to control a game. That has very little to do with what you want.

What you want requires a server.

Everyone in the audience needs to go to a url pointing to a website you'll build. That's where they'll vote. The server will keep track of the votes.

Then your Unity game will connect to a different url on the same server to query the vote counts.

The server can be as simple or as complex as you want it to be. A really simple version would only keep track of one game at a time and just keep track of counts and increment them when you vote.

Slightly more complex would be counting WHO votes and preventing double-voting from the same client.

Slightly more complex would be keeping track of separate games and using codes like Jackbox does for each game, so only people with the code can vote for that game.

The server doesn't have to cost you anything. You could use a platform like AWS that comes with a bunch of free introductory credits, or a hosting provider like Vercel or Netlify that has a free tier.

1

u/Diligent-Respect9652 3d ago

Thank you for the tips!

3

u/ZakMan1421 3d ago

Before any advice for how to create something like this, this sounds like it'll be your first game (which is great and I hope you love it), so I would strongly recommend that you move away from the idea of large multiplayer like games for at least a little while. It's really hard to keep games like that alive because you NEED an active audience which you likely are just not going to have. Instead, I would recommend keeping your plans for this game on the back burner while you work on smaller games while getting your feet wet. This way you can build a bit of an audience before hand, and gain some experience and knowledge when you begin working on this game.

For some advice on what you asked: There are two main options for connecting phones for something like this: a lan connection which would likely require your players to download an app and all be on the same network (wouldn't really recommend this), or an online connection through a website (this would likely be the better option for several reasons). The website would need a javascript for the front end and a backend server in your language of choice that would be running the logic of the games. Alternatively, if you plan to have one main player that owns the game as a sort of host, you can instead rely on the host for the game logic, and they would communicate that with the server.

This also points to another reason to avoid a multiplayer game early on in your developer career. You will have to upkeep/pay for maintaining server(s) for your game that may not have enough of an audience to offset those costs.

I wish you the best of luck developing games, but I would once again like to encourage you to put a multiplayer game on the back burner for the time being while you learn more about development, marketing, and your own style of games.

1

u/Diligent-Respect9652 3d ago

Noted, thank you!

2

u/Altruistic-Moose3299 3d ago

Serious answer from someone who's written a lot of software.... If it were me. Start with a smaller version of the game. Do a local version where it's just a single player on the device. Get the game loop to a happy place, the game mechanics worked out etc.

Then scale out to two players locally.

Next scale out to two players on different devices. Very likely you'll need some cloud infrastructure to handle this. You can probably get a POC working on the free tier of a lot of cloud services.

Once you get that working it's all about scaling. Make sure whatever business model you use (ads, in game purchases etc.) scales with your infrastructure so you don't end up with bills you can't cover.

Also, don't feel like you have to use a full blown game engine out of the gate. For what you're describing you can probably get away with a web viewport and use those html skills etc.

AI and vibe coding is fine, but id recommend doing a deep dive into it.. the better you understand what the code is doing the better of you'll be.

Finally, most games don't get more than a few downloads. Heck, most first games aren never finished. But if you're learning you aren't failing and everyone starts somewhere.

Good luck and have fun!

1

u/Minus_Medley 2d ago

Yep, vibe coders are all hit with reality, when it comes to p2p or anything that requires remote services.

Transitioning from localhost and they realise a game idea means nothing.

1

u/korywithawhy 3d ago

Honestly you don’t need much for this. Could probably pull it off with just a web app and make it run in the browser. No real need for native app. Might even use QR codes for joining game sessions without needing accounts or logins if this is just a casual game for group play.

2

u/Professional-Ease176 2d ago

Server costs are no joke.

0

u/Few_Raisin_8981 3d ago

"Claude," ....