Let's say I want to make a really simple artillery game, something like Gorillas. I don't have any experience in games, just some basic understanding of OpenGL. I want to do this for fun and to learn something.
I figured out how to simulate gravity and generate simple terrain and how to do some collision detection. But I have no idea how do they mask out the part of the terrain that is hit with a projectile that leaves a hole in form of a circle.
I tried enabling stencil buffer and put a quad which has a circle texture on it expecting to mask out only the circle part, but it masked out the whole quad -- I mean it was a rectangle shaped hole and not a circle shaped one. Next I thought maybe some blending will do the trick but I didn't figure it out how. Or should I just draw a polygon with many edges to look like a circle and use that instead (with the stencil buffer)? I'm just curious how it is done. Can someone point me in the right direction?