Single-File Tutorials, Gimmick or Valuable Constraint?

I just finished writing the code for the 12th shader tutorial, which is basically taking the 11th tutorial, which is still a "single-file application" tutorial, and converting it to use the OpenGLContext Shader scenegraph nodes and generally look (slightly) more like a real-world rendering engine.

I like single-file tutorials, but really there's a point at which you need to start using compartmentalized code to provide common services. Having hundreds of lines of copied code show up in each tutorial is just a waste, a distraction, and a bit of a maintenance headache.

What the single file tutorial does, however, is make you focus on teaching "just one thing", which is something I'm finding myself struggling with in the current tutorial set. I likely should have had a whole tutorial on the use of textures, but I want to charge ahead and do advanced shadow tutorials, so I'm rushing through the texture intro. I'll likey need to go back and do a simple texture tutorial at some point. Given where the tutorial path has gone, I also might go back and start introducing the nodes as we discover each piece of functionality they encapsulate, showing the raw operation, and then how to use the node that wraps it.

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.