Touch Joystick scaling

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I have bumped into a problem with the size of the touch joystick. It doesn't seem to scale with the devices' resolution like the rest of the graphics.

    The game I am making has a resolution of 800x480 and the size of the touch joystick looked fine on my tablet which has a 1280x800 resolution. However, when I ran it on a Samsung Galaxy Ace with a lower resolution of 480x320 the touch joystick looked huge and it interfered with gameplay.

    Is there any workaround for this problem?

  • I would highly recommend making your own joystick just so you know you have full control over everything. Personally, I only use the joystick for testing and I always make custom controls. There have been discussions about the joystick scaling before - I can't remember what was said, but I would say the reason for the joystick's size changes probably has something to do with using DP vs using pixels.

  • Not that I'm aware of, but there are at least a few different ways you could do it. Probably the easiest, most straight forward, would be to use a main center joystick object that you can drag around in a set area, and then have 4 (or 8) other objects - one for each direction, and then place them around your joystick center. Then when your main center joystick object ( the one you can drag around) is overlapping one of the other objects, trigger your events like you would if this were a the regular controller. Of course that is simple breakdown and you would need to figure out the specifics of keeping your joystick in position, etc, and it would be more convenient for coding if you used some alterable values (or flags) so you can set an alterable value (or flag) depending on the state of your custom joystick and then read from those values to actually determine the joystick state (left, right, etc). This way, when triggering something in your code, you just check "Alterable Value of Joystick = right" --> "Do action" instead of checking the actual state of the overlapping joystick objects (if overlapping objects is the way you do it).

  • Yes this is a major problem when I use scaling say a 640X480 to 1280X720.. Or trying to place it somewhere else on a vga res with the joystick object. Just doesn't work the way you would like.
    It's not hard to create your own control system though with the multi touch object.

    Regards

    Ross

    Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!