What’s Next

Lights and materials are advanced topics and we’ve only scratched the surface of what’s possible. They can have a big impact on games. Just don’t get too crazy with them. They can make the computer work hard, slowing down your game. Plus gameplay is more important than anything else.

This is an important lesson in any kind of programming, not just JavaScript gaming: just because you can doesn’t mean you should. The best programmers in the world know this rule well. And now you do, too!

Let’s put our new lighting skills to good use in the next chapter as we simulate the phases of the Moon.

Get 3D Game Programming for Kids, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.