Hi

I was wondering if anyone could lend me some help. I’m trying to build a maths game in flash 8 by next Sunday for a college project. I always wanted to build a game with some educational twist to it but this is my first time in trying to build a proper one (not a flash game made in a day) so I need a some of help, so could you please help in anyway you can.

The basic concept of the game is that it involves the player having to make a number that matches a random selected number displayed on screen by the game, through a collecting numbers into a sum box by shooting them and creating a sum. The answers to the sum will accumulate bank box (similar to banking in the weakest link, Oh that Ann Robinson is so cruel) until they match the number displayed by the computer.

Numbers will appear randomly around the screen for a short time and the player has to shoot whatever number they like using a target (like your typical gun game, like time crisis, house of the dead etc) which is operated through the mouse. The first number they shoot will start a sum in a sum box at the bottom of the screen. The player can then choose to add a divide, multiply, addition or subtraction sign to the sum by pressing the respective key on the keyboard then the player can choose to shoot another number and then complete the sum by pressing the respective equals key on the keyboard. If a player shoots a number but doesn’t then press a ‘+,*,-,/’ key and shoots another, the most recent shot number will replace the previous one. This would also be likewise if they don’t press the ‘=’ key to complete the sum. For instance if I shoot 9 off the screen but then shoot 6 without having pressed a ‘+,*,-,/’ key, 6 will replace 9 in my sum. If I have a sum of 6 + 3 in my sum box and then shoot 7 without having pressed the ‘=’ key then the sum will become 6+7.

Ok next part (hope you still with me) all answers they make from sums are accumulated (banked) in a bank box at the top of the screen. Once the number they accumulate in the bank box matches the selected random number by the game, the player is successful and moves onto the next game.

So here’s a scenario. I start the game and the game randomly selects 32 as the number to make. So I start by shooting a 3. In my sum box is 3, then I shoot a 6. The previous shot number 3 is therefore replaced by 6. I then press + on the keyboard. I then shoot a 5, so far then I got 6 + 5. Next I shoot a 10. 5 is replaced by 10 and so now my sum looks like 6 + 10. Then I press the equals key and therefore accumulate 16 in my bank box. I start my sum again by shooting 8, then I press * on the keyboard I then shoot 3 and then press = making 24 which then accumulates to the number in my bank box. Oh no I’ve gone over and accumulated 40 what shall I do? There is something I didn’t explain till now as it’s easier explained in the scenario. The bank box has two accumulation options. Add numbers (from sum answers) or subtract numbers (from sum answers). By default it is set to ‘add numbers’ but by pressing the respective key you can change its setting to ‘subtract numbers’ and vice versa at any time before you get an answer from a sum. Getting back to the scenario then I press the respective ‘subtract numbers key’. Then start a new sum by conveniently shooting 4, pressing +, conveniently shooting 4 again and then pressing = to make 8 which is then subtracted from the current number in my bank box.

Whoo hoo I made 32, that’s right I’m clever at maths.

Just a little bit more to explain (sorry)….

- You can’t have a equals sign after the first shot number i.e. “5 = “is not be allowed

- You can’t have a ‘+,*,-,/’ after the 2nd number in the sum i.e. “3 + 2 +“ is not allowed. I want to make it after the 3rd number but not sure how you would get the game to implement the bodmas rule so that divided and multiplied numbers are calculated first before added or subtracted numbers. i.e. 8 + 12 * 4 = 56 but the game may calculate it to be 80 by adding first before multiplying. (Any tips on how I can get around that are welcomed)

- I will also implement a run down timer of about 30secs or more, which once reaches 0 the game will end. Each randomly selected number you match however will add at least 15 secs to the timer.

- After about 10 matches, the level will go up meaning numbers will appear and disappear on screen faster. The sum in the sum box will disappear after sometime if not completed and will disappear quicker the more levels you go up.
Also I’m hoping to implement a random selection number range as you go up the levels, i.e. level one will randomly select numbers between 0 – 101 to match. Level 2 will randomly select numbers between 100 – 201, level 3 will select numbers between 200 – 301 etc.

- Each match basically increases your score by 1, so therefore your final score will be the number of matches you make before time is up.

If you really good, I suppose you could make it last forever.


So you can see it’s a bit of a tall order but I think I can do it, what I need help with then is;

What core functions will I have to devise?

From what I worked out so far, I’ll need core functions for;

- Random selection of a number within a number range to be displayed on screen.
- Number range which can go up to infinite ranges depending on the level
- A time limit of about 30 or more secs where once it reaches 0 then it is game over
- A target to shoot with
- Random appearing numbers on screen to shoot at
- Numbers that go into a sum when the corresponding number is shot on screen
- A sum calculator which calculates numbers in the sum box, replaces numbers that have not had a “+,-, /,*” or “=” applied to them and doesn’t allow for an “=” after the 1st number or “+,-, /,*” after the 2nd or 3rd number.
- A bank box which takes every answer made from the sum box and accumulates them in the bank box
- An “add numbers” or “subtract numbers” from sum box answers option, applied to the bank box which is also displays next to the bank box
- Once the number accumulated in the bank box matches the displayed selected random number, a new random number should generate from the respective number range
- The players score should also go up by 1
- 15 secs should be also be added to the timer
- A Level increaser that increases the level of the game after 10 number matches
- Faster appearing and disappearing numbers on screen as each level increases
- A higher number range as the level increases
- A time limit on the displaying of the sum in the sum box until the sum is completed. The time limit would also decrease with each level you go up.
- A function to save your score and name
- Check keys;
~ Mouse cursor moves target
~ Left mouse button shoots
~ Right mouse button changes accumulation ( add numbers or subtract numbers)
~ Right arrow key enters a + sign into sum box
~ Left arrow key enters a - sign
~ Up arrow key enters a * sign
~ Down arrow key enters a / sign
~ Enter/Return key enters a = sign


How will I device these functions?

This is really what I need help with so please offer suggestions please
I have my ideas that I’m gonna put together but as I’m a novice, I’m not sure they’ll work.

So please could anyone offer me some help and I’ll let you know how the game goes and send it to anyone who wants it when it’s done, and If you ever need a favour from me I'll do what I can

Best regards
David