Chooo Chooo... All Aboard!

Published August 30, 2006
Advertisement
Recently I've been a bit more tired then usual, with my computer back I should be loading back up visual studio but I haven't. I should be working on my application, but I'm not. I just don't feel like working on it. I don't even feel like posting this message.

It's either that I've just become more lazy, or I'm just running out of ideas and I've overshot my deadline. Sometimes even the smallest issue can halt all thought for me. Hollow halls is supposed to be a e4 entry, but I haven't nearly as much done as I've wanted to. Which is to say that I could get more done then I have, I haven't necessarily overshot my deadline.

The concept of events is driving me nuts, I often find myself in a corner when dealing with input. If the user holds down a button, in my current model it calls the code every frame. So if the character is moving to the right they're constantly being changed to the right every frame. In order to change this I would have to find out when the key was pressed and when it was let go. Even then there is a chance that the proper animation won't be changed.
0 likes 2 comments

Comments

Mushu
Eww, that's yucky. For my event processing I only send the key events to listeners when it changes state. So if the key is pressed then released, only 2 events go out.

Granted, it means you have to keep track of the key state. But I haven't had much of a problem with that :3
August 30, 2006 02:17 PM
PumpkinPieman
Currently I'm using Drew_Benton's win32 input library for handling input events. It ends up calling the callback whenever a windows message comes in. I'm not totally sure if there is a method that allows it to only call the callback for those two events, so if I want to support that I'd have to keep track of the variables. A pain if you ask me ...
August 30, 2006 02:51 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement