Tagged Questions
8
votes
3answers
914 views
Polling vs event driven input
I'm developing a game using polling for the input method. However, now that I'm delving deeper into the game menus and other UI components, I'm finding that I'd probably like to have event driven ...
6
votes
2answers
300 views
How should i have the key/mouse input in an advanced java game?
I am a self taught programmer, so I do not know the proper ways to do things. I have made simple games like asteroids and snake, but in those games, you can easily modify the variables within the ...
3
votes
1answer
305 views
libGDX Multitouch Controls
Has anyone had any trouble implementing multitouch on-screen controls in libGDX, such as multiple joysticks? I've tried and I can't seem to get libGDX to play nice with multitouch/multiple pointers on ...
2
votes
1answer
306 views
How to move a 2d sprite to a target location while avoiding obstacles?
How can I get a 2d sprite to move to a position clicked on the screen, without bumping into other objects? I'm programming in java using the android API library
I have created a surface view and ...
2
votes
3answers
266 views
Efficient way of detecting a touched object in a game?
Imagine a Sims-like 2D game for a touch based mobile phone where one can interact with virtually any object in the scene.
How can I efficiently detect which object is being touched by the player?
In ...
2
votes
3answers
2k views
Understanding MotionEvent to implement a virtual DPad and Buttons on Android (Multitouch)
I'm trying to implement a virtual DPad in android, but I'm still very confused about how do I keep track of each trouch point, from the moment it is pressed, till it is released.
In my code, I test ...
1
vote
3answers
189 views
Implementing pausing functionality
I'm working in LWJGL and trying to implement pausing when the user presses the 'P' key. Thus far I have this:
boolean gamePaused = false;
while(!Display.isCloseRequested()){
...
1
vote
1answer
517 views
How move sprite in Java 2d (swing) with keyboard?
I'm practicing some simple techniques with Java swing games, to learn the basics. Right now I'm practicing how to move a sprite... but it's not working! whhyyyy
Here is what I've come up with so far ...
0
votes
0answers
30 views
What is a library for event-driven mouse and keyboard input in Java?
The title basically says it all.
The only thing to take into consideration is it needs to be cross platform.