3 Replies Latest reply on Oct 30, 2014 4:30 AM by Ned Murphy

    Battleship like math game and the limits of flash

    Rackoon Level 1

      Hi I am a math teacher. I created a math game using Activinspire for my class (it took well over 100 hours). I would like to make the same game with flash in order to make the game more dynamic, but I don’t know of flash can do it.

       

      Yes, I have two of the “Classroom in a book” books (the standard one and the action script one) and are working though them.

       

      This is what I need flash to do:

       

      * **[Main screen] Two hundred squares (buttons) in top layer hanging in space like a coordinate grid. Outer space is behind it along with random spacecraft.

            (I know this is do able)

       

      * **When a square (button) is pushed, a new screen appears with a math problem on it and four multiple choice question buttons.

            (I know this is do able)

       

      * **Three wrong answer buttons take the player to a screen with an explosion.

           (I know this is do able)

       

      **The correct button will take the player to the [main screen], with the grid of squares (buttons) and the appropriate one will disappear and reveal what’s      underneath.

          (Can flash do this?)

       

      The main page will be different each time the player returns to it depending on which square they select because that square is now missing. The only way I can come up with is if the squares disappear in order so it can be a different slide each time. I cant make a frame for every configurations of squares selected. Well, I could but that would be a lot of squares.


      I basically want selected buttons in the timeline to alter the main or first frame throughout the game.

       

      Please help

        • 1. Re: Battleship like math game and the limits of flash
          Ned Murphy Adobe Community Professional & MVP

          Yes, what you want to do is easily doable with Flash in somewhat of a variety of ways.  One simple way to do it is to keep everything in one frame of the timeline and just control the visibility of the different elements, the main page content being one of the elements.  That way when you change something in the main, it retains whatever condition you left it in because you never leave it behind... you just make it invisible when you don't want it to be seen.

           

          If keeping things on one frame escapes your current ability to reason it out, another option is to spread things along the timeline to your own comfort level, but keep the main on a layer by itself and extend that layer for the full length of whatever content you have along the timeline.  Then, again, control its visibility so that it only appears when you visit it's normal frame (frame 1 if that's your preference).

           

          Another option would be to work the entire main section out using a coded design where you rebuild it dynamically each time you want to see it, and you use a data structure that defines each of its 200 cells.

           

          Even if you do not want to have the things rebuild dynamically, you should consider building it dynamically rather than manually planting 200 cells on the stage.  You can do this using simple looping and a cell movieclip template that you store in the library and call up to build each cell.

          1 person found this helpful
          • 2. Re: Re: Battleship like math game and the limits of flash
            Rackoon Level 1

             

            First of all, thanks for the help Ned. You rock!

             

            The original game of this I made is played on a seven foot active board so the whole class can see. The two hundred squares look large at that size.

            I think the first method you mentioned is similar to how I though it could be done.

            I understand your second method, but I don't have those skills yet.

            As for building the button squares dynamically, I was going to add them to the library so I will only need to alter a small part to the code.


            The way I was thinking of trying before I was posting was the following:

             

            *   The first frame would be the main frame of the game (just like you mentioned)

             

            *  Create 200 layers each containing a single Button/square making up the grid.

             

            *  Create 200 frames, each containing a math problem and four answer buttons. The correct button that takes you back to the first main frame and makes a specified button square invisible. The three wrong answer buttons will run a short animation of a astronaut being zapped by a alien and then back to the main frame without making any squares turn invisabel.

             

            Am I on track?

             

            If so, I will give it a shot this weekend with four layers and five frames. Well, that is if I can come up with the code between the internet and my text book.

             

            • 3. Re: Re: Battleship like math game and the limits of flash
              Ned Murphy Adobe Community Professional & MVP

              I think you will be making ALOT of work for yourself doing 200 of anything manually other than building a database/datafile that has 200 math problems, but I guess the need for creating 200 equations could be a visual matter involving arrangement of the elements in the equation.

               

              You should not have to create 200 layers for the buttons.

              1 person found this helpful