Last post was about my attempt at explaining coordinate transforms. Progress has been slow. I've implemented many of the diagrams but I'm still having trouble with the narrative. Last time I said this was my outline:

1. Show a side scrolling game with some cool camera effects.
2. Introduce world coordinates vs screen coordinates.
3. Solve the problem of scrolling: subtract an offset.
4. Introduce transforms. (may need to be later)
5. Introduce inverse transforms, for mouse clicks. (may need to be later)
6. Introduce cameras. More complicated than offsets, but can do more.
7. Show some cool effects with cameras. (may need to be earlier)
8. Introduce chaining transforms.
9. Show some cool effects with chaining.
10. Demo showing all concepts together.

I've been experimenting with different orders for the topics and now think there are two intertwined “tracks”: the concept track introduces mathematical concepts and terminology, and the problem solving track shows solutions to specific gamedev problems. These two tracks are paired up:

Problem solving Concept
scrolling world/screen coordinates, translate transform
following the player cameras, view coordinates
tile grid coordinates scale transform, chaining transforms
mouse clicks inverse transforms
? function composition
? transform matrices

I think in each case I should start with the problem to be solved, then show the immediate solution, then explain the concept behind the solution. The concepts then lead to a reusable solution. Example:

1. Problem: we want to scroll the screen
2. Immediate solution: add an offset before drawing
3. Concept: we're transforming world coordinates to screen coordinates
4. Reusable solution: a translate transform is a function or object that converts coordinates

The next section is:

1. Problem: we want to keep the player in the center of the screen
2. Immediate solution: use the player plus half the screen size as the offset
3. Concept: a "camera" points at the player, using view coordinates
4. Reusable solution: a camera object is placed in the world, and we use that to build the translate transform

What order should I present these topics? I'm not sure. I know I want to put scrolling first. If I put mouse clicks second, then it's fairly easy to solve, and there's less motivation to learn inverse transforms. So I might put that later. If I put tile grid coordinates second, then it leads to chaining transforms together, which will be useful for following the player with a camera. Or if I put following the player second, then it leads to view coordinates, which might further motivate chaining transforms.

I think the main problem is that I'm not feeling particularly inspired right now, so I'm working very slowly.

CpILL wrote at June 02, 2019 5:57 PM

Having done a little bit of teaching coding myself to young teens I found it is all about motivation. They wanted to make games and the coding was just a means to do that, as was the math and all the other concepts (i highly recommend teaching/tutoring if your writing educational material). Start with motivation, i.e. your "problem solving" track as solving problems is really the ends and the means will follow. I always think of the old proverb:

"If you want to build a ship, don't drum up people to collect wood and don't assign them tasks and work, but rather teach them to long for the endless immensity of the sea."

i.e. Stimulate motivation and the rest will follow by itself. I still haven't found a good intro to game development for kids/teens. The progress is always too slow and they need to feel like they have achieved something at the end of every (not to long) lesson, but its do'able.

I guess the same goes for adults, I find if i break down big projects into small victories I'm more motivated to get to the end.

Your tutorials are the best i have ever seen and online! I hope you find the motivation to continue. Bret Victor also did some inspiring work in a similar direction. The "Explorable Explanations" are what drew me to him originally and seem on a similar tangent to you. Perhaps you just have to evolve these ideas of yours into something nobody has ever seen before. Bret is doing interactive physical spaces now last i heard.

Amit wrote at June 06, 2019 6:44 AM

Thanks CpILL! Yes, I had started out trying to teach matrix transforms but it wasn't motivating. I then switched to coordinate transforms but it was still abstract. I ended up picking game cameras because they give some motivation for using coordinate transforms. I think it's still a little tricky as it's possible to solve many of the game camera problems without learning the theory. I want to at least introduce the reader to the theory so that they learn that there's a better way to solve those problems.

Re: my tutorials - thank you! Check out https://explorabl.es/ for lots of Explorable Explanations! :-) DynamicLand is a fun place to visit.