I’ve been going back and forth on whether the objects in this game need to be three dimensional, two dimensional but with polygons defined in OGL to handle transparency and shape, or two dimensional squares with their transparency and shapes just faked by having parts of the texture be transparent (which would require using an image source with an alpha channel, but that’s not really a problem). Agonized about it for quite a while now.  After a couple of weeks trying to decide how to implement it in 3D so I could have pretty shadows and reflected light sources off the sides of ships, I’ve decided to go with 2D.  Pure 2D, and that’s it.  Also, when reading about OpenGL on the web, and probably DirectX too: I have discovered that if there isn’t a date on what you’re reading, or the date is old, to just stop reading it immediately.  I spent quite a while reading up about techniques which aren’t even supported in the current OpenGL, and ignoring other techniques because the consensus seemed to be that it was only supported on “bleeding edge” graphics cards. After checking up on that, I found out that by “bleeding edge” they meant “The GeForce 2.” So despite the red book’s occasionally frustrating habit of not providing any context for its extreme detail, it’s probably the best way to learn.
So now that I’ve finally made the choice to go 2D and got back to writing code, today’s update: Transparencies. Â The colors now mix. Â It’s a little hard to tell, but I’m pretty sure all the combinations blend together, according to their alpha value, which in this case is just 80% across the board for all object types. Â Also, it’s now using transforms to move the dots around instead of drawing the dots in a different position. Â That might not be an obvious difference, but it’s a pretty important change.
So basically, it looks almost exactly the same, but it works differently. Expect things to actually have shapes and point in the right direction soon. Â Either that, or textures. Â Or maybe I’ll implement beam weapons.
-
Recent Posts
Recent Comments
- Alex on Planet data: More flexibility
- Richard on Planet data: More flexibility
Archives
Categories
Meta