KeyDown and MoveEntity Question

Blitz3D Forums/Blitz3D Programming/KeyDown and MoveEntity Question

Red Ocktober(Posted 2006) [#1]
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


Chevron(Posted 2006) [#2]
I would try using flushkeys() after you have processed the players movements once per loop. Maybe that will solve your problem.


DH(Posted 2006) [#3]
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).


GfK(Posted 2006) [#4]
Try EnableDirectInput(True)

(or (False) if you're already using DirectInput and are having problems).


Red Ocktober(Posted 2006) [#5]
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


big10p(Posted 2006) [#6]
Red, what do you mean when you say "all other screen processing seems to slow down"? Do you mean your FPS drops?


Red Ocktober(Posted 2006) [#7]
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


big10p(Posted 2006) [#8]
That sounds like it might just be an optical illusion, TBH. That's if the camera is parented to the player.


Red Ocktober(Posted 2006) [#9]
yes... it might in fact be just that... the camera is a child of the Player...


--Mike


Chevron(Posted 2006) [#10]
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.


N(Posted 2006) [#11]
Shouldn't this be in Blitz3D Programming?


(tu) ENAY(Posted 2006) [#12]
I'd use flushfullstops()


N(Posted 2006) [#13]
I prefer FlushToilet( ), but whatever floats your boat.


Sir Gak(Posted 2006) [#14]
FlushToilet() works best when your neighbor downstairs is using the shower, and the water goes too hot/cold.


Ross C(Posted 2006) [#15]
Annnnnnnyway, what IDE are you using? I got big slowdowns using versions of Visual blitz.


Paolo(Posted 2006) [#16]
hey, wait a minute ... the Gfk's command does exists

EnableDirectInput(True)

so, another undocummented command,
any short explanation about this?


Ross C(Posted 2006) [#17]
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)


Red Ocktober(Posted 2006) [#18]
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


Paolo(Posted 2006) [#19]
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.


Red Ocktober(Posted 2006) [#20]
thx Paolo... looking into it now...

--Mike