Jump to content

  • Log In with Google      Sign In   
  • Create Account

Inputs


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 mypel16000   Members   -  Reputation: 46

Like
0Likes
Like

Posted 20 January 2013 - 05:26 AM

Hi there, I have been developing a game for a while and I've realized that it has a problem. I can't aim with the mouse while the player is moving and I can't move when the player is shooting. In simple words, my code can't handle two inputs at a time. However, I sent it to a couple of friends and it works fine for them, so I think it might be a problem with my computer.

 

The code must be fine as it works on other people's computers, but if it doesn't in mine, it might not work on someone else's. I've tried to versions without luck:

 

while (App.getEvent(Event))

{

    If this is pressed exit

    ....

}

 

I also tried an if version and a switch version, but they don't work. Any ideas?



Sponsor:

#2 LennyLen   Crossbones+   -  Reputation: 4022

Like
1Likes
Like

Posted 20 January 2013 - 07:06 AM

It's a bit hard to advise you with so little to go on. Try reducing the code you have to the smallest executable code that reproduces the problem. Then post that code so others can examine it.

#3 Mercile55   Members   -  Reputation: 136

Like
1Likes
Like

Posted 20 January 2013 - 07:05 PM

The usual input processing is buffered and asynchronous, where you get a collection of all input events that happened since your last reading, and the process them doing appropriate actions. Maybe if your loop is reading only one at a time, and reacting to it, it works synchronously, and until it gets turned off, it wont switch to another one ?

make sure that any input reading is asynchronous, and independent of drawing.



#4 mypel16000   Members   -  Reputation: 46

Like
0Likes
Like

Posted 23 January 2013 - 01:35 PM

Sorry for the late response. i am glad to say that this wasn't a problem with my code, it was a problem with my computer.

In case anyone has this problem, it is an issue with HP laptops as the synaptics trackpad has a setting which is palm scrolling cancelling, which is there to basically stop you from moving the mouse while typing. This means that you can't move the mouse while typing.



#5 kburkhart84   Members   -  Reputation: 1776

Like
1Likes
Like

Posted 23 January 2013 - 11:31 PM

My acer does that too...It sucks.








Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS