Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Virtual Joystick Issues...

Author
Message
bstebbs
11
Years of Service
User Offline
Joined: 10th Jan 2013
Location:
Posted: 15th Dec 2013 05:02
I am running into a problem with the Virtual Joystick. I am controlling an Animated Sprite with it and periodically, it stops working. I continue to use it and the Sprite moves in the direction of the Virtual Joystick so I know it's attempting to move it but the sprite doesn't move.

Has anyone else had an issue with this? I've tried using Virtual Buttons to simulate a Virtual Joystick but that doesn't work too well as it continues to go in the same direction until I lift my finger off of the device. And, I've used Sprites as well and that's better but it's not quite working as well as the Virtual Joystick. To really make this game playable the way I want it, I really need the Virtual Joystick working correctly.

Any suggestions is greatly appreciated.
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 15th Dec 2013 09:56 Edited at: 15th Dec 2013 10:02
You might want to do the following to test if the virtual joystick is working: set it up and make sure it is displayed on the screen. Next, print the output of the virtual device on the screen, to see if the X and Y-coordinates are behaving as you would like. I'm a bit starved for time, so I'm unable to write a program that does this, but here is some code that might help you on your way:

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 15th Dec 2013 14:46
You could just make your own, then read the touch input. Also, that would allow you to have a virtual stick that works with multi-touch, so a fire button or even another stick.

I am the one who knocks...
bstebbs
11
Years of Service
User Offline
Joined: 10th Jan 2013
Location:
Posted: 16th Dec 2013 01:56
It's not a matter of the Virtual Joystick working. It's a matter of it working all the time. I have a Person who I've animated and it's controlled with the Virtual Joystick. It's being chased and at certain times, the Virtual Joystick doesn't work. Doesn't move the Person. There's no barrier it's running up against, it just doesn't move the Person. I know it's trying to work because it's correctly positioning the Person in the same direction as the Virtual Joystick is moving. So, the Person could move around in circles but it's not moving. It should move. Somehow, it's like the Virtual Joystick gets stuck. So, I put some code in the game so that if it gets stuck, then I move the Person a little bit in hopes that frees up the Virtual Joystick. And that seems to work but it doesn't make the game too much fun to play because you have this delay in the game.

I'd really like someone from AppGameKit to reply to this to figure out if there's a bug in the Virtual Joystick.

Also, I've made two versions of my own solution without using the Virtual Joystick. One was to put arrows and then depending on which ones I pressed, it moved the person in that direction. But, that just doesn't work too well. Another was to make my own version of a Virtual Joystick where I put a circle on the bottom right of the screen and then wherever I touch on the circle moved the Person in that direction. That worked ok but sometimes I found it easy to move my finger off of the circle and thus it wouldn't move the Person. Whereas, with a Virtual Joystick, as long as I have my finger pressed on the screen, it continues to move the person.
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 16th Dec 2013 10:27
bstebbs, could you post the code you have which moves the player? I am using the virtual joystick (Tier 1) in my platform game and have not experienced any issues, it also supports multi-touch so there are no issues there either...

Login to post a reply

Server time is: 2024-11-24 23:39:28
Your offset time is: 2024-11-24 23:39:28