Making a voice-based browser friendly game

Making a voice-based browser friendly game

I spent last weekend coding up a game: an Indian version of Flappy Bird called Chidia Udd.

The catch?

I can't write frontend to save my life, so I had to navigate on two fronts: tackling React(frontend framework) side while building the game logic in parallel.


Hurdle #1: Game Technicalities

Game physics is important. The gravity, bird speed, pipe speed and jump strength all should be really fine tuned to make your game not stuck in a limbo.


Stuck in a limbo!


Hurdle #2: WebSpeech API

The game is voice-based, operating on limited specific commands that move the bird or change its avatar. The Web Speech API wasn't ideal for real-time recognition in my use case, as players would repeat the same command. I couldn't afford to drop any events as it affects gameplay. I fetched interim events without waiting for players to complete their sentences, resulting in duplicate events.

A temporary solution was to throttle commands and cap them to a maximum threshold for a given time interval. So even if you say "udd" three times within half a second, it's considered one event. (h/t: Nikhil Srivastava)


Code


Hurdle #3: Distribution

Getting traction for a game which people have iterated or played over multiple times is tough. To tackle this i built public leaderboard where players can claim bragging rights for their scores. A fun message is auto-generated that you can share on Twitter, tagging the user whose score you just beat. This definitely helped the game gain traction on Twitter.

Bragging right!


Hurdle #4: User Feedback

Taking player feedback and introducing touch/keyboard mode. Game's difficulty increases as the mode is changed to keyboard/touch.


User Feedback


Results:

As of now the game as around 40 players, which i feel is really really cool.


Stonks.jpeg


Next steps:

I really want to deprecate keyboard/touch mode and make this a voice-based game only. For that i need to find a very low latency , mobile browser friendly, audio transcribing model.

I will be putting my deep learning skills to use by building a small scale real-time audio transcription model from scratch. It'll learn to identify a very limited set of words.

Ensuring the model is small enough to work well with mobile browsers.


Game link: Play Chidia Udd!

You can comment your scores below haha!


Below are some of the interim iterations of the game.


Iterations



Final look


Interesting

回复
Dushyant Pratap Singh

Senior Software Engineer @ Grappus | Back-End Web Development

4 个月
回复
Nitesh Rawat

Lead Backend Engineer @ Unberry | Python, NodeJs, Golang, SQL, NoSQL | Building systems that scale

4 个月

Interesting game dude! Will give it a go!

Ishan Jain

Software Engineer | Building @SkaiLama | prev @Bytekode @CreworkHQ

4 个月

Such a wonderful game ??????

回复

要查看或添加评论,请登录

Dushyant Pratap Singh的更多文章

  • Building a Cost-Efficient Video Processing Pipeline with AWS Lambda

    Building a Cost-Efficient Video Processing Pipeline with AWS Lambda

    If you have worked on video processing tasks, you likely know how challenging they can be. Recently, I worked on an…

    8 条评论
  • Computer Networks: Fundamentals

    Computer Networks: Fundamentals

    Life is good in Boston, Massachusetts. You and your friend Joel are living in the North End on 21st Street, where all…

    1 条评论
  • Computer Networks : Introduction

    Computer Networks : Introduction

    Let's hop into the time machine with Bill and Ted as we travel back in time to understand how long-distance…

  • Why we don't use www anymore

    Why we don't use www anymore

    Remember this? Back in the day when you accidentally stumble upon a cool website that lets's click on Hitler's face as…

    3 条评论

社区洞察

其他会员也浏览了