Question: I'm looking to create a game framework for my own personal use...
I want to use WPF, but I'm unsure if that is a wise choice...

The games I will be writing should not require high performance graphics, so I am hoping to build on native classes... I do not want to rely on external DLL's unless I generate them myself.

The games will be for young children, say 4 to 8. Most will be learning puzzles or simple shooters.

The most advanced will be a platform game (non-scrolling screen like the old Atari Miner 2049er game).

I think I know how to write something like the old Atari Chopper Command (partially written and my 4 year old loves it, but I used WinForms and GDI), Pac-Man, Tetris, Astroids, Space Invaders, Slider Puzzle, but I do not really know how to write the platform game... In my mind, I'm getting caught in collision detection and how to make a character jump and how to make a character walk up a slope or steps...

Can anyone point me to information on developing a platform game in C#?

Would you suggest WinForms or WPF for game development?

I'm not looking for great graphics and speed, just entertaining game play...

Answer: 
"I'm getting caught in collision detection and how to make a character jump and how to make a character walk up a slope or steps..."

Why do you want to write it yourself? You could (if you want simple 2d graphics) use an existing framework for platformers and save a lot of time and energy.

How to make characters walk up and down a slope or a stairway entirely depends on how you model this slope and or stairway in the code. :) It also depends on the kinds of physics you would like to involve, is the steep slope, slippery? I think these questions could all find answer, however it would be simpler to ask them one at a time and have some base code to start with.

I will start by answering the question about collision detection. This is implemented in a lot of existing frameworks.
If you are using a 2d-array to represent a tilemap, you can handle collision between the character and the wall this way:
Assuming the character starts in a collision free area and her feet are positioned in (x,y), you check which tile that is:

```
tilePos.x = character.x / TILE_WIDTH;
tilePos.y = character.y / TILE_HEIGHT;

```

If the character is less wide than one tile and is positioned around the center of the current tile, you simply check if there is a tile directly underneath it.

```
//Tile exists is a function that looks at the 2d-array that represents the tile map
//and checks if a floor tile exists in (int x, int y) 
onGround = tileExists(tilePos.x, tilePos.y - 1);
//if the character is not positioned in the center of the tile, you'd have to check
//tileExists(tilePos.x +/- 1, tilePos.y - 1); depending on where it is leaning to.
//This is also true if the character is too wide to stand on a single tile.

```

if there is no tile, the character begins to fall..

```
character.speed.y -= GRAVITY; //a constant you could define

//Checking if a character can move left or right is just the same
movementDirection = 1 * isRightKeyPressed() - 1 * isLeftKeyPressed();
//Assuming the character is two tiles high
canMove = !tileExists(tilePos.x + movementDirection, tilePos.y) && !tileExists(tilePos.x + movementDirection, tilePos.y + 1);

```

now jumping is made simple:

```
if(isUpKeyPressed() && onGround) character.speed.y += jumpSpeed();

```

This is psuedo code and it needs some refining.. It should give you an idea.

If you never made a platformer, I suggest you learn about states too.
I would reiterate that neither WinForms nor WPF would be good, even for simple games. XNA is specifically made for this scenario.

WinForms has an immediate graphics mode so you will have to refresh and repaint the window every "frame." The trouble is that GDI painting isn't great for performance and you have to play games with double buffering to prevent flickering.

WPF uses retained graphics, which is somewhat easier on you. You can create all your shapes and images, give them to WPF and update them when need be. WPF will automatically redraw what needs redrawn and properly sort everything for you. It also has the benefit of hardware acceleration in some cases. You could potentially do some crazy stuff in WPF to achieve some fancy effects (tranformations, shaders, etc.). But while its great that WPF has this power, it is not meant for real-time graphics.

XNA is built using C# and is designed to be easily understood. The starter-project provided with the install gets a game window up and running with a `SpriteBatch` ready to go. You can get 2D sprites drawing in no time. There is some learning curve with the content pipeline, since it is part of the build procedure. Like most graphics frameworks, it is an immediate renderer, so every frame you have to tell XNA what sprites to draw and where to put them. XNA also abstracts out other parts of game development to make your life easier: audio, input (mouse/keyboard/gamepad), content management, etc.