Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8565799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:30:40+00:00 2026-06-11T17:30:40+00:00

I want to develop game that generates random simple math equations. easy – 4+5

  • 0

I want to develop game that generates random simple math equations.

  • easy – 4+5, 5-6 (operator used are +,-)
  • medium – 4*5, 5/6 (operator used are +,-,*,/)
  • difficult – 4*5/7, 5/6-5 (operator used are +,-,*,/)

Now I think this can be done simply generating every character randome, i.e. generate two random numbers and then generate a random operator and using them together and keeping conditions to find answer which will also check answer entered by user.

But that would be too rookie to code I guess. I want to know if this is the right way or if I should use any pre-defined math library available for PHP. As of now I have to just work with 4 operators but in future it is possible that I need to implement more complex equations.

Also, I have to implement multiplayer mode and I am thinking to use Comet so that users can play at same time together.
Should I be using PHP and MySQL to create this game or shall I create this using AJAX/JQuery?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:30:41+00:00Added an answer on June 11, 2026 at 5:30 pm

    Make a array of operators, and generate the operands random;

    $operarors = array( '+', '-', '*' );
    $operator = $operarors[rand(0,2)];
    $leftop = rand(0,10);
    $rightop = $rand(0,10);
    
    echo "the math: $leftop $operator $rightop = ??";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Allow me to describe my situation: I want to develop a game, that is
I want to develop a very simple 2D game in Python. Pygame is the
I want to develop a Java game that works on adhoc wireless environment. Do
I want to develop a game in NodeJS but i'm not sure how much
I want to develop a 2d game. I have to choose from Quartz/CoreGraphics, OpenGL
I want to develop a card-base game in Ruby, and I want to do
I am using VS2010,C# to develop a Silverlight web based game. I want to
Want to develop a query refinement tool just like Google Suggest so that i
I want to develop a program in c# that can target and application or
I need to develop a game server that will run periodically (e.g., triggered by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.