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/AppGameKit Studio Showcase / [Tier 1] Free To Use New Virtual Joystick

Author
Message
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 8th Jun 2014 12:29 Edited at: 8th Jun 2014 21:37
I made a virtual joystick for a game yesterday, and I like it. I figured I could share it with the community.

It's the kind that pops up where ever you put your finger ( as long as that's inside the box you've told the joystick to work within ) and disappears when you lift your finger.

No having to look at the screen to find the stick again, it's always in the right place.

Anyway, included is some sample code and the complete joystick with graphics I created. The graphics is easily interchangeable and you are free to do so, credit me or don't.

Should be tested on a touch device to see the benefit.

Don't forget to add the UDT to your main.agc and #include tonkjoy.agc, and you're all set.

My hovercraft is full of eels

Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 10th Jun 2014 16:38
Haven't tried this yet but does it flip out when you use multi-touch or do you track each touch event and only use the specified event?

I only ask because this sounds very useful if it works well with multi-touch.
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 12th Jun 2014 22:31
I haven't added multitouch. But it does work at the same time as buttons are pushed.

For the moment you have to put the buttons outside the box where the joystick is updated.

As long as it works for my project I probably won't update it more until I need more functionality.

You are however free to add to it

My hovercraft is full of eels

Login to post a reply

Server time is: 2024-11-21 22:57:40
Your offset time is: 2024-11-21 22:57:40