Alpha Blending, Part 3

Ok, in this post I’ll talk about additive alpha blending.  This time for sure, I promise.  In part 2 I talked about disabling depth write, and how that could give okay-ish results.  It’ll come in handy with additive blending, so if you haven’t read that post yet, you should.   Additive Blending: In part 1…

5

Oops!

A reader pointed out that I had made a mistake in my last post about game structure.  I suggested that GameScreen have a GameComponentCollection.  However, the constructor for that type is internal, so that’s not going to work.    Sorry guys.  Fortunately, there wasn’t anything in the design that needed any GameComponentCollection functionality, so just…

1

Basic Game Engine Structure

I’ve seen a couple of posts on the forums asking what the best way to structure a game is. For what it’s worth, here’s a structure I’ve used in a few of my games. The design itself isn’t too complicated, but it’s pretty flexible, and will keep your code simpler in the long run. I think the Spacewars…

13

Alpha Blending, Part 2

Rough Sorting Last time I explained how “normal” alpha blending works, and why the objects should be drawn back to front. Sorting the objects can be a hassle, though. If it suits your game, you could just try controlling the order your draw calls happen. If you’re using DrawableGameComponent, this is an ideal use of…

3

Alpha Blending (Part 1)

When I was first learning game programming, I remember alpha blending being a bit of a mystery. I wanted to use alpha blending to make transparent particles for some cool explosions. Sounds simple enough – but as anyone who’s tried it before can tell you, it’s not as simple as just enabling alpha blending and…

4