I'm currently working on a smooth snake game for the lovely bangle watch, and with most games, precise controls are key! I'm using the onTouch event to change the Snake's direction, but it felt weird, and then after debugging I found out that the maximum x value I can receive in the onTouch event is not 176 (as you might expect due to the screen resolution) but 191.
Now I wonder what is the actual resolution of the touchscreen, and is there a function to fetch it dynamically (so I can develop the game device-agnostic)?
Thank you so much! Happy to join the community!
~momo
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi all,
I'm currently working on a smooth snake game for the lovely bangle watch, and with most games, precise controls are key! I'm using the onTouch event to change the Snake's direction, but it felt weird, and then after debugging I found out that the maximum x value I can receive in the onTouch event is not 176 (as you might expect due to the screen resolution) but 191.
Now I wonder what is the actual resolution of the touchscreen, and is there a function to fetch it dynamically (so I can develop the game device-agnostic)?
Thank you so much! Happy to join the community!
~momo