KeyDown and MoveEntity Question
Blitz3D Forums/Blitz3D Programming/KeyDown and MoveEntity Question
| ||
is there some kind of keyboard interrupt thing that messes with emtity movements... i ask because when i'm moving and entity in a certain direction using a keypress, all other screen processing seems to slow down until i release the key... amy insights to this? thx --Mike |
| ||
I would try using flushkeys() after you have processed the players movements once per loop. Maybe that will solve your problem. |
| ||
What's the code your using to acomplish this? I haven't had issues on any of the PCs I have used for testing (6 various breeds). |
| ||
Try EnableDirectInput(True) (or (False) if you're already using DirectInput and are having problems). |
| ||
thx for the suggestions guys... already doing the flushkeys bit, but will look into others... thx again... octothorpussullamius... get a life and stop sitting around counting ellipses... ........................................................................................ ........................................................................................ ^ there, something for octo to do until he gets a real life :P --Mike |
| ||
Red, what do you mean when you say "all other screen processing seems to slow down"? Do you mean your FPS drops? |
| ||
no... the frame rate looks constant... but when i am on deck (a childentity) of a sub that is moving forward, and i turn around and walk towards the rear of the sub, the wave action and the movement forward of the parent object (the sub) seems to slow down... once i release the key, it jumps back into motion... --Mike |
| ||
That sounds like it might just be an optical illusion, TBH. That's if the camera is parented to the player. |
| ||
yes... it might in fact be just that... the camera is a child of the Player... --Mike |
| ||
Well it might well be slowing down if you are moving the camera to the rear of the sub as you walk. If you are moving the waves forward at say 1 unit, and moving the camera, 180 degress rotated from the wave, by 1 unit then the wave would effectivley be standing still. |
| ||
Shouldn't this be in Blitz3D Programming? |
| ||
I'd use flushfullstops() |
| ||
I prefer FlushToilet( ), but whatever floats your boat. |
| ||
FlushToilet() works best when your neighbor downstairs is using the shower, and the water goes too hot/cold. |
| ||
Annnnnnnyway, what IDE are you using? I got big slowdowns using versions of Visual blitz. |
| ||
hey, wait a minute ... the Gfk's command does exists EnableDirectInput(True) so, another undocummented command, any short explanation about this? |
| ||
It's something to do with Blitz using Windows messaging to relay mouse and keyboard inputs, instead of them going direct. Windows messaging is slower, but more reliable. I believe that is the reason, for lack of detail :o) |
| ||
hey guys... a lil more on this... is it possible that while there is a moveEntity instruction in a loop for the parent, and on a keydown, a move instruction for a child, would it interfere with the parents movement... it's looking to me like whenever i move a child, the parent object slows down or stops moving... and as soon as i release the key for the child movement, the parent resumes moving... could this possibly be happening... --Mike |
| ||
Mike, I'm not sure but your problem sounds to me like a scale problem. When you scale a parent up or down, automatically the children are scaled too, BUT the problem is when you have many parents and children with different rotations and such ... then moving the entities could produce strange results and subtle deformations of the movement itself. just a thought Paolo. |
| ||
thx Paolo... looking into it now... --Mike |