Uneven Prankster

"Indiedev juggling 4 things at once."

/*/*/ 3D Rendering goes Uneven

You've been pogged! (and so has been the rules)

I was pulling your leg right there and then. This is mainly my knowledge working with 2D on an enviromment that is mainly meant for 3D.

Anyhow, I have been playing with OpenGL a lot since I was a programming bab and thought making a Minecraft clone would amazing. It's easy to see now that attempting to make something work in Java with no knowledge whatsoever is asking for trouble. But past me didn't know that. They even made 'something' work in C++.

Alas, I always tried to ignore something pulling my own leg at these times. What about a GUI? Sprites? Anything 2D? Lemme tell you 1 (one) thing here: I tried a lot and it was SO annoying. ... Because I also didn't know much about it! It's easy enough to plot pixels or use a nice library solution to do things, but eventually you touch the GPU and things get funny. Touch fuzzy, get dizzy.

Projection, Quads, and You

One thing you first need to realize when making a 2D GL thing is to get a projection matrix right there and then. You'll need Orthographic Projection, it does not account for depth distortions (therefore all things occupy the same size even when far away or close).

Other thing you'll need is Quads. Say you have your little square you made in a structure. Now imagine having that for every tile. Every single one. You'll need to find ways to reduce how many of those you draw. The more famous option is Sprite Batching, which turns all of them into 1 single draw call, at the cost of being quite complex to handle, but libraries exist.

And now, you. You need to make a nice GUI with those, animations with spritesheets, get those to have adjustable timing so your sprite doesn't do the world's fastest disco dance, and that's not even getting started on making them move. I'd call it a fancy 1D cube by the end of the day because it'll not be that different. Did you forget to add audio too? Oh, uh.... Go ask the guy working on his OpenAL solution in your preferred discord server.

Notes: About Shaders

Shaders... What a wonderful thing they are. Learning GLSL has to be one of the best things you can do. I'd sugest you try to learn distorting around the texture for wacky effects. Just simple playing around will open a lot your eyes to the many tricks devs come up with by experimentation. Just beware not to make syntax errors. I'd also really recommend ShaderToy for a web playground. It's free, it's cool, no excuses.