Removing 'moving map' callback in scrollmap component for touchscreen devices

Game development with Board Game Arena Studio
Post Reply
User avatar
locerol
Posts: 19
Joined: 15 August 2015, 10:20

Removing 'moving map' callback in scrollmap component for touchscreen devices

Post by locerol »

Hi all!

I am developing the adaptation of Ginkgopolis, and I would like to improve how the game is controlled with touchscreen devices. The problem right now seems that when using a BGA scrollmap component, two functions are triggered with each touchmove event, one for scrolling the whole screen and another one for moving the map. Tha makes playing on touchscreens difficult and uncomfortable. When you would like to scroll the screen, the map moves. When you want to move the map, the screen scrolls.

The only solution I see for this is to remove one of the two events. The scroll is the default callback for the touchmove event but, in my case, I think it is needed to see the bottom part of the game.I think using the arrow buttons that also implement the moving map callback may be enough to move the map in the few ocassions it may be needed.

So, I would like to remove the moving map callback after the touchmove event is triggered. So, I still need to use the scrollmap component, the moving map callback will still be needed when using the arrow buttons and with PC players using the 'drag' event.

Is there a way to remove the moving map callback after the touchmove event? The problem is that the dojo.connect function with the touchmove event is probably inside the scrollmap.create function, which is invisible to developers, so I don't have access to that part of the code.

I think adding the possibility to remove this callback will help all games using scrollmap components played on touchscreen devices. Or, if anyone has another solution to this it will be of great help.

Thanks in advance.

locerol
User avatar
Tisaac
Posts: 2736
Joined: 26 August 2014, 21:28

Re: Removing 'moving map' callback in scrollmap component for touchscreen devices

Post by Tisaac »

We had kind of a same issue with Santorini when moving onto the board is used to rotate the board in 3D space.
We just removed the general scroll on this component and we make sure that this component is not taking the all height so that a player can still "grab" something else to scroll if he needs to.

Also, the code of scrollmap is not hidden, only minified. You wouldn't be the first one to overwrite some of BGA components.
Feel free to join the discord server if you want to talk about that, it will be easier in real time :)
Post Reply

Return to “Developers”