Help with dots game / multitouch game

Hello, I submitted a new topic and it was to be reviewed. Then I earned a trust level minutes after, which allows me to make new topics without review. So I am just going to post again because I would to hear everyones feedback as fast as possible. :blush:

I’m new to kodular but I have some experience with Mit app inventor. My game seems so simple but I can’t seem to work out a solution.

The goal of my game is to touch multiple sprites(represented as dots) at the same time. Then they appear in different places. Eventually, I want to add a time limit that progressively gets shorter as the player successfully touches all sprites. So far, I am just working with two sprites represented with dots.

Here is the process which I am trying to create:

  1. Touch and hold first dot.
  2. While holding first dot, touch second dot.
  3. As soon as second dot is “touch down”, both dots reposition.

Eventually, when the dots reposition, I want the timer to reset as well, with less time available to touch all the dots. Here is what I have so far and it does not work how I want it to:

Any help and/or suggestions are appreciated! I should probably mention I tried using a multitouchcanvas extension, as well as a 9-point multitouch extension, both made by the same user and both with no luck but I was probably using them wrong for what I want to do.

What is the issue? Are you not able to click the second sprite while holding the first one?

Yes, exactly.

Can you provide a test apk or something?

I’m pretty new, so I honestly don’t know how to make an .apk. if I attach an .aia file would that work for you to test?

I don’t have a laptop, and my phone cannot manage to run the builder.

On the top you will find a build option, under the build section select apk and then scan the code.

Voila

2 Likes

DotsGame.apk (7.3 MB)

Don’t mind the first two screens, that portion is still in progress. Just click Start and Go until you reach the “Dots” screen. You can press Back to go back and forth to refresh the Dots screen.

I also added two labels at the bottom that change to “1” when the sprites are being held. They change back to “0” when you let go of the sprite. The problem is that when you hold one sprite, the other does not change. It doesn’t recognize a second “.Touch Down” input.

you might want to try one of these extensions
Scale Detector Extension by Hal: Adds a multitouch scale gesture detector to a Canvas.
Multitouch in Canvas Extension by Juan Antonio
taken from the extensions directory App Inventor Extensions | Pura Vida Apps

Taifun

I did in fact give those extensions a try with no luck. I could not find a way to make it work. I think the Multitouch in Canvas Extension by Juan was the closest. I was able to get the canvas to respond when the exact coordinates of the sprite were touched, but that is not ideal for my game.

For example, if the sprites coordinates are X: 25, Y: 50, touching the screen exactly on that coordinate is nearly impossible. I couldn’t figure out how to broaden the range in which the canvas would respond. For instance, if the sprite coordinates are X: 25, Y: 50, I wanted the canvas to respond when the screen is tapped within 25 pixels of the sprite coordinates. But, I could not figure out how to do something like that.

Anyways, the multitouch capabilities of the extensions available might just not be able to achieve what I am trying to do. I have since come up with other ideas for games/apps that work within the limitations of kodular/app inventor. I think I am just going to work on those until I am more comfortable with Java programming in an IDE. Thanks everyone for the help! Perhaps multitouch can be something that future extension developers can focus on? I had a game that required it and I am sure there are plenty of others out there that would benefit from more capabilities. :blush: