Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

Big Issue with Qt key inputs for gaming

$
0
0
I have been learning Programming for 12 months and while learning Qt decided this is the library i also want to use for game dev. I use PyQt so im not sure if this problem is present with Qt on C++. Firstly i made a small demo with a sprite that responds to key inputs. I sub classed QWidget and reimplimented its PaintEvent. The issue is this: my sprite can move left or right based on a key press, but when, say a key is pressed and held to keep moving left, it moves left once, stops for a split second, then keeps moving left. This pause in between the press has a horrible, non fluid effect for gaming and controls. I then did a quick space invaders clone and its hell to dodge the enemy fire. I decided to quickly try the same demo using the QGraphicsView classes. Sadly the same issue is present with the key inputs. When held, there is still that delay before it starts responding. So quick shifts in movement is impossible. Before i started learning Qt i tried this same demo with another library and the key inputs were spot on. Im wondering if anything can be done about this? Other than say static board games, it will be impossible to make fast dynamic games using Qt it seems. Im wondering if this is just a PyQt issue, or is it also present in C++? could someone please check? Can anyone please tell me If this is a bug that can be fixed, or are we stuck with it?

Viewing all articles
Browse latest Browse all 18427

Trending Articles