2D Matrices Workshop

When I was a firstyear, I remember quite a bit of confusion around 2D matrices in programming. The math worked out on paper, but getting it to work in engine was something else.

If you just followed the steps that were given to you, you could make your sprite follow your physicsactor, but I set out to understand these numbers a bit better to create some cool visual effects, lots of which I applied to Half-Line Miami.

I gave a workshop on 2D matrices to clear some things up, and I wanted to share some of the demos I had prepared.

The engine the first years are using – and the one I wrote Half-Line Miami in – is a 2D C++ engine. But there’s quite a lot you can do in 2D.

I created this demo to show what you can do with 2D matrices.

All the physics calculations are done in 2D, but it looks like the world is in 3D.

The application I made together with the students was this one:

A seemingly 3D island scene, but it has various issues. I had the students think about the solutions themselves, and this was the result:

Most of them also got around to adding the shadows.

With some extra, clever vector math you could even take it one step further.

Look at these people learning!

2D Matrices Workshop

Leave a Reply

Your email address will not be published. Required fields are marked *