How should I setup a vector class for a 2D game engine?

I'm at the beginning stages of building my first 2D game engine, and I'm not sure if I should setup my base 2D vector class as a vec3(x, y, z) or a vec2(x, y)

I might want to use a vec3(x, y, z) for adding z values, for ordering which objects would overlap other objects and still be visible. I'm also not sure if it's just easier to have a vec3 for working with the transformation matrices and graphics libraries like OpenGL. This is my first game engine project, and I don't really know what is required for the long haul, in a 2D game.

How should I setup a vector class for a 2D game engine?

• Use a pre-built library, and an engine if you can. Doing your first game without an engine is hard – Bálint Feb 18 '17 at 21:06
• While I agree with you, I'm using this project as a learning exercise as well. I'm not looking to create the next call of duty or anything, just a simple game that I created with a simple engine I created. Already learning a lot doing so! – Jason Feb 18 '17 at 21:11
• Note that you'll learn a lot about engines by using an already available engine. Designing stuff out of thin air without being familiar with said stuff is hard, and you may learn the wrong things... – Vaillancourt Feb 18 '17 at 22:21
• It is definitely hard, I'll give you that! However, by doing things this way I am also learning tons about how to structure a software architecture appropriately. This means learning practical ways to think and go about building an application. I recommend it to anyone with enough patience. It can be very rewarding – Jason Feb 21 '17 at 2:21