loading...
Cover image for Game in JavaScript!

Game in JavaScript!

abhiprojectz profile image abhiprojectz ・2 min read

Interrogation-game

This is a interrogation game that is made in pure javascript.

You can play the game at github

and the source code is available here

Alt Text

This game is created using javascript arrays and randomness mainly.

At the end i will show you how can easily make one with your theme.


intro

its all about interrogation is you are a suspect (in the game, obviously) and we will ask you some dozens of questions and you need to be loyal at every time.

if you lie then the game will over and a scorecard appears in. the more you remember the high will be the score!

Is'nt amazing? It improves your memory give it a try!


Game basics

We ask you the question and you set each unique question's answer then on the next time if that particular question appear you need to select the answer which you'd chosen first that's ** within 10 seconds**.

The question will come in random sequence and the optons too.

Each questions option will too come in random sequence.

The timer ticks upto 10 seconds!

Be fast & LOYAL.

Purpose behind the game

Alt Text

well, i was just searching for games in JAVASCRIPT then, i thought to create this one.


Inspiration

Alt Text

I found this game in google play store Indefinite: Interrogation Game by Brandon li.

I found the game so interesting so, i thought it clone it in javascript the game he made was in flash which i came to know after de-assembling it by the file extensions etc.

What do you think about its JAVASCRIPT VERSION ?
DO comment down.

BUILD YOUR OWN IN A MINUTE

here is a code shot

Alt Text

There are some random question i picked a different theme you may pick any depending upon your imagination. and can easily tune it to make your own one.

This shows that you need to a assign a question as

quiz[index] = new Question("___your question_____", "__option1___", "___option2___", "___option3____" , "____option4____");

Enter fullscreen mode Exit fullscreen mode

as


quiz[0] = new Question("What is your name?", "Ayush", "vicki", "mehul" , "kavya");

Enter fullscreen mode Exit fullscreen mode

The game have 4 options and will appear in random.

In this way you can create easily.
if you like this then give it a like.

Thanks.

Posted on by:

abhiprojectz profile

abhiprojectz

@abhiprojectz

Developer of Motionia.js .Basically reading in 12th grade. Do follow me on twitter

Discussion

pic
Editor guide
 

Can you share the link of the game?

 
 

I made a score of 100 and it shows me 0 in the end😂. Fix this plz and increase number of questions and randomness. Btw it's good☺️

 

Simple game but looks promising. Keep it up.