Hi all,
I am currently developing a mobile game using Gideros and had a question regarding improving, or adding on to the existing touch detection Gideros offers through their Touch Events.
My game requires that two Bitmaps are placed on the scene tree in very close proximity to each other (position wise), and both have touch event listeners associated with them.
Basically if I tap or swipe on a certain bitmap, I want that bitmap to respond accordingly (exact response is not relevant for this question). However I am finding that when I test the code on my phone, if I accidentally start my swipe outside of the intended bitmap, it does not register as a touch (obviously) and often times will mistake which bitmap I intended to interact with. This issue is not visible when using the computer simulation, as the mouse is much more accurate than a human finger.
Essentially what I am wondering is if anyone has needed to implement a similarly sophisticated touch detection system in a game or application they have made, and if so, what advice or suggestions they would have. Thank you for any information you can provide!
Comments
at first i'd try to make the bitmaps slightly bigger (with invisible frames) and then the touch is detected on their proximity as well.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
In my game, I have several block images which have been incorporated into bitmaps positioned in a starting level position. If a user swipes a block in a specific direction and the path forward is clear of other bitmaps, each block will respond by traveling (position wise) along the specified swipe path.
I have successfully implemented the code that will make the block travel, my issue is more with incorrectly identifying which block bitmap the user has swiped (whether that be because the finger's initial touch was inaccurate or accidentally touched the block beside it).
I agree with you that making the bitmaps larger would certainly help solve my issue. However, due to size limitations on the screen I am not able to make my bitmaps larger, while still maintaining the same game layout.
you can also make a custom hitTestPoint function to achieve the same effect without the dummy objects, this would be more performant but needs a bit of thinking to implement.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://deluxepixel.com
Thanks for your answers.
However, with my new system, you would collect the touch data points, and because I am swiping to the right, when I released my finger, more data points will have registered on the right hand bitmap as opposed to the left, thus correctly determining which block the user MEANT to swipe. I know there is alot of issues with this as well, but I'm just trying to start somewhere and improve as I run into bugs.
Likes: antix
Fragmenter - animated loop machine and IKONOMIKON - the memory game