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.

		ArrayList platforms;
		// Holds the list of all of the current platforms.
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(100);
			// Initialize the arraylist to hold up to 100 elements.
			platforms.Add(Rectangle.FromLTRB(50, 415, 200, thelandheight));
			platforms.Add(Rectangle.FromLTRB(100, 465, 225, thelandheight));
			platforms.Add(Rectangle.FromLTRB(150, 515, 250, PFMain.thelandheight));
			// Instantiate the platforms for the level.
Since we are using the Platforms arraylist, we can remove the following lines from the Form_Load.
			platform = Rectangle.FromLTRB(150, 515, 250, PFMain.thelandheight);
			// Instantiate the platform.
Now, let's try to get these platforms to be drawn. Let's move to the Artwork subroutine (of course).
				gfx.FillRectangle(Brushes.Moccasin , platform);
				gfx.DrawRectangle(Pens.BurlyWood , platform);
				// This draws the platform with a maroon interior and a chocolate border.
				// Try the colors out to get a good one.
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. The declaration for platform can, however, be deleted. So, we'll just modify this code to get elements in the arraylist into a new platform rectangle. We'll use a foreach Loop (you can use a For loop if you want).
				foreach (Rectangle platform in platforms) 
				{
					gfx.FillRectangle(Brushes.Moccasin , platform);
					gfx.DrawRectangle(Pens.BurlyWood , platform);
					// This draws the platform with a maroon interior and a chocolate border.
					// Try the colors out to get a good one.
				}
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 else if, we need to inject a foreach between the else and the if blocks.
			if (isjumping) 
			{
				playerloc.Offset(0, playerveloc + thegravity >> 1);
				// dD (.Offset) = Vo (playerveloc) + 0.5 * A (thegravity >> 1)
				playerveloc += thegravity;
				// dV = (playerveloc +=) A (thegravity)
				// Moves the character according to its velocity, gravity, and location.
				updateartwork = true;
				// Need to update everytime during a jump.
				if (playerloc.Bottom >= PFMain.thelandheight) 
				{
					// check if we are touching ground (another rect advantage).
					isjumping = false;
					// Stop jumping... we've hit the ground.
					leftend = 0; rightend = PFMain.themapwidth;
					// Ground range.
					animcycler = 0;
					// Reset animation cycler that was counting during the jump.
					playerloc.Offset(0, thelandheight - playerloc.Bottom);
					// Move the player so he stands properly on the bottom.

				} else {
					foreach (Rectangle platform in platforms) 
					{
						if (playerveloc > 0 && playerloc.Bottom >= platform.Top && playerloc.Bottom - theshoulder <= platform.Top) 
						{
							// The player has landed on the platform.  Using a rectangle for the player made this check much easier than without.
							// We do need to set a few things to let the player know where he is.
							if (playerloc.Right >= platform.Left && platform.Right >= playerloc.Left) 
							{
								// Player is over the platform.
								isjumping = false;
								// Not jumping
								leftend = platform.Left; rightend = platform.Right;
								// Platform endpoints are now the falling endpoints.
								animcycler = 0;
								// Restart the animation cycle to the first frame.
								playerloc.Offset(0, platform.Top - playerloc.Bottom);
								// Position the player so that he is standing on the platform.
							}
						}
					}
				}
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.