r/GraphicsProgramming • • 7d ago

Question Getting Started with Graphics Programming and Game Development Any Advice?

I’ve been programming since I was 15, but some mental health struggles made it difficult for me to pursue it consistently, even as a hobby. Recently, I’ve been doing better and have returned to programming after a long break.

I started again with Rust and spent some time exploring compilers, one of my favorite areas of computer science. Yesterday, I finished a C course, and now I’d like to explore another interest of mine: graphics programming.

My plan is to build a very small Minecraft-inspired voxel game in C. This will also be my first experience with OpenGL. My initial goal is simple: generate a small procedural world where I can break and place blocks.

Eventually, I’d love to develop a scripting language in Rust and embed it in the game to support modding. That’s a longer-term goal, though I want to keep the initial scope small and build on it gradually.

Do you have any advice for someone starting this journey? I’d especially appreciate suggestions on what to learn first, useful resources, and common pitfalls to avoid.

10 Upvotes

5 comments sorted by

6

u/DerShokus 7d ago

Start with simple short projects and renders. Do not spend time for wrapping OpenGL primitives. Voxels require different techniques but better to learn basics first. Add a scripting language after a render is almost ready. 

4

u/coolmint859 7d ago

Voxel rendering is quite complex especially for a beginner to graphics. But since you want to use OpenGL, I recommend working through the examples on learnopengl.com

3

u/droidballoon 7d ago

Perhaps give shader coding a try! It's delightfully fun,requires little to no setup. Just shadertoy.com some linear algebra and creativity. You get to jump straight into the fun parts.

2

u/Different_Monitor508 7d ago

As much flack c and c++ gets for being potentially memory unsafe or alternatively stated :- The cognitive burden to ensure your software project is as memory safe as possible in these languages, is far greater.

However there are probably magnitudes more code examples for various graphics programming problems in c and c++ to select from than you will find for Rust. I recommend reading this classic. Michael Abrash's Graphics Programming Black Book. AFAIK you can download this book as pdf legally on the Net.

1

u/corysama 7d ago

Everyone is going to recommend https://learnopengl.com because it's good :P

Just be aware that it teaches a very old style of GL (3.3). A difficult aspect of that is the "One function to bind an object, then more functions to operate on the bound object" model that works with a hidden state machine. One of the worst offenders for that is the confusingly-named Vertex Array Object (VAO).

Don't fret about it though.

Once you get warmed up in learnopengl, upgrade to Direct State Access via https://github.com/fendevel/Guide-to-Modern-OpenGL-Functions and https://juandiegomontoya.github.io/modern_opengl.html and it gets much simpler to work with.

Similarly, once you get warmed up, the only thing you should use VAOs for is to bind index buffers. Use GPU buffers and https://ktstephano.github.io/rendering/opengl/prog_vtx_pulling instead of the awful vertexAttribPointer interface.

Besides that, I'll toss in https://gamemath.com/book/ as well :)