Sign in to follow this  
  • entries
    182
  • comments
    235
  • views
    188309

Still With the Every Dev-Day Thing

Sign in to follow this  
mittens

56 views

I'm still going with the dev journal entry for every day of actual development I do on this little project affectionately titled Rawr. Today was a sad day. Why was today a sad day, you may ask. Well, today was a sad day because I spent three hours struggling with that goddamn mouse. At first, the goal was to capture the mouse/stylus for the window (::SetCapture( HWND )), because it seemed like the right way to go about dealing with continuous movement. The beginning of this capture was set off whenever the left mouse button was held down and then released whenever the left mouse button was caught in a non-down state.

If you've ever actually tried organizing this inside of a message handler in the scheme of what seems like a "Good Design," then I'm sure you understand the problem here. The problem being that, at least in my case, the actual code which processed (relied on, dealt with, so on) was not, in fact, in the message handler. So there was this flood of input being gathered and the app had nothing much to do with it. It was around this point, which took far longer than it really should have to arrive at, that I realized I might have to violate the original design a bit to include some functionality for capturing the mouse in a window and holding the cursor to the center of the screen. I ended up with a "fake capture" -- so I'll still send the framework-wide flag that the mouse had been captured and various components could do their thing, the cursor graphic would be hidden by the OS, and the cursor position would continually be set to the center of the window after I nabbed the delta position from the frame prior.

I know I've done all this stuff before. At least, I think I have. In retrospect, I may have just looked at example programs and thought "Oh. Hey. This works. I'll just liberate this snippet." Such a course of action is, of course, not acceptable under my current coding laws for Rawr.

None of this stuff makes for a good screenshot and the camera code I'm working on isn't to the point where I can actually move around a scene in a "correct" free-fly first-person camera fashion, so here's a comparison shot between an MD5 mesh from DOOM 3 being lit by vertex normals (on the left) and by a normal map (on the non-left):

Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now