Whew. I did a lot of work today. I fixed that bug I was having with the world disappearing - I had set it up to work with multiple vertex buffers, and to make a new one whenever it crossed a 65000 vertex border. I had neglected to tell it to also make a new one to put the leftovers in.
So, with that done, I was finally able to see pits being dug. The picking was a little bit misplaced, but I adjusted and got the ray lining up exactly where I wanted. That was awesome. I went ahead and added code for placing blocks, too, and that worked out. The only bad thing about the whole thing is that there's some lag when doing it, because it has to refresh all the vertex buffers. I'll be optimizing that, as well as making it to where I can do varied textures, so you'll have stuff like dirt on the sides and bottom of grassy blocks.
The other major thing I did is first person camera. It's no longer free flying. It also is controlled by the mouse rather than keys. What's the big deal about that? Well... First thing is that with control done by mouse rather than keys, it feels very intuitive. Just move the mouse around to move your view, just like other first person games. With it no longer free flying, it means you won't get your roll messed up and lose your sense of balance, and you're pretty solidly on the ground. Muuuch better.
Next thing I'm working on is preparing for multiple textures, and optimizing the speed of things. Multiple textures because duh, that's important for knowing what you're dealing with in a world of blocks. Optimization because there's a fair amount of initial load time with just 64x64x16 blocks, and yet more lag whenever you change the world due to all the recalculation. It's a little different than the whole turn based thing I'm used to.
But this is definitely starting to come along.
No comments:
Post a Comment