Previously, I talked about adding a platform to the form.  Now, we want to add more than one platform.  Let's face it:
you can only do so much with one platform (circus acts come to mind, but then, you need a flaming hoop).  So, we need
more platforms.
Ideally, we will have an undetermined number of platforms in each level.  Each level will be on the same form, and we'll just
tweak the variables on it.
Since the number of platforms is unknown, we can just store them into an ArrayList, the .NET version of the
I-don't-know-how-big-my-storage-is-going-to-be storage.
Let's declare our ArrayList.

    Dim Platforms As ArrayList
    'This will store the platforms that are in this level.
Platforms - our arraylist. It has a flexible storage size, and the platforms in this list can be retrieved one-by-one, using a For Loop or a For Each loop. Now that we have a Platform storage, let's set up three platforms. Since each platform is a rectangle, we can just put rectangles into the Arraylist. We can do this right after we initialize the ArrayList. So, this
        Platforms = New ArrayList(3)
        'Initialize/instantiate the platforms arraylist.
        Platforms.Add(Rectangle.FromLTRB(50, 415, 160, LANDHEIGHT))
        Platforms.Add(Rectangle.FromLTRB(100, 465, 185, LANDHEIGHT))
        Platforms.Add(Rectangle.FromLTRB(150, 515, 210, LANDHEIGHT))
        'Create three platforms.
Since we are using the Platforms arraylist, we can remove the following lines from the Form_Load.
        Platform = Rectangle.FromLTRB(150, 515, 210, LANDHEIGHT)
        'Instantiate our platform
Now, let's try to get these platforms to be drawn. Let's move to the Artwork subroutine (of course).
            GFX.FillRectangle(Brushes.Tan, Platform)
            GFX.DrawRectangle(Pens.RosyBrown, Platform)
            'I'm not into interior decorating, so the only thing I can say about these colors is that 
            'they'd better be a light brown persuasion.  This draws the platform.
Those lines already exist in the Artwork sub, but we aren't going to remove them. Why? Well, each element in the platforms arraylist is converted to an object. We are going to have to convert them back into a rectangle for the filling and drawing of the rectangle. Platform is going to be the rectangle that holds the conversion from the arraylist objects to a rectangle. (I like to recycle my old variables.) So, we'll just modify this code to get elements in the arraylist into the platform rectangle. We'll use a For Each Loop (you can use a For loop if you want, you'd just need to declare a loop variable... in .NET 2003 you can do this within the For Loop).
            For Each Platform In Platforms
                'Loop through each platform in the arraylist.
                GFX.FillRectangle(Brushes.Tan, Platform)
                GFX.DrawRectangle(Pens.RosyBrown, Platform)
                'I'm not into interior decorating, so the only thing I can say about these colors is that 
                'they'd better be a light brown persuasion.  This draws the platform.
            Next
Now, all of our platforms should be majestically drawn to the form.
If we were not using a Backbuffer, the form would probably be flickering beyond all recognition. Now, the interesting part is getting the character to react to all of these platforms. We need to identify all of the points in the project that we did something with Platform... well, we've got them all except the one in the CharacterMovement subroutine. This one, unfortunately, requires the most surgery. In order to check the platforms within the ElseIf, the ElseIf needs to broken into an Else with an If inside of it. This embedded If statement will then go inside of another For Each loop, where we once again keep the same code.
            If PlayerLoc.Bottom >= Me.LANDHEIGHT Then
                'Check if we are touching the ground (another RECT advantage).

                IsJumping = False
                'Stop the jump: we have hit the ground.
                LeftEnd = 0 : RightEnd = MAPWIDTH
                'Set the endpoints for the ground.
                AnimCycler = 0
                'Reset the animation cycler: it has been counting during the jump.
                PlayerLoc.Offset(0, LANDHEIGHT - PlayerLoc.Bottom)
                'Move the player to stand on the land properly.
            Else
                For Each Platform In Platforms
                    'Looking at each platform in the platform array.
                    If PlayerVeloc > 0 AndAlso PlayerLoc.Bottom >= Platform.Top AndAlso PlayerLoc.Bottom - SHOULDER <= Platform.Top Then
                        If PlayerLoc.Left < Platform.Right AndAlso PlayerLoc.Right > Platform.Left Then
                            'The player has landed on this platform.  He needs to be updated.
                            'See how many advantages there are to using a Rectangle.

                            IsJumping = False
                            'Hit the ground, we are not jumping.
                            LeftEnd = Platform.Left : RightEnd = Platform.Right
                            'Set the endpoints for the platform.
                            AnimCycler = 0
                            'Reset cycler.
                            PlayerLoc.Offset(0, Platform.Top - PlayerLoc.Bottom)
                            'Move the player onto this platform.
                        End If
                    End If
                Next
            End If
OK, that wasn't terribly complicated, and only a few minor changes allows us to have multiple platforms, so we could set up a whole level based off of this... we'd just need a few more platforms. Next, we'll discuss the dreaded wall.