gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > A way to solve the annoying touchscreen 'jump'?

#73000 - Puppet - Wed Feb 22, 2006 8:52 pm

Sometimes when drawing something on the touchscreen the first time you touch the screen it registers the touch in a completely different location, then goes to where you have the pen located on the screen resulting in a line between where you actually touched it and where the touchscreen thought you touched it.

I'm no programmer so I'm not sure if my idea is actually possible.....

What if a program was made so that the first 1 or 2 milliseconds (or however long it takes) that you're touching the screen it won't accept any input. Then, when the touchscreen is reporting the correct position again, the program starts receiving the touchscreen input.


Would this be possible?

#73002 - knight0fdragon - Wed Feb 22, 2006 9:02 pm

just do the median technique, take a few scans and grab the median, usually i drop the first 4 or 5 scans then the rest i find the median for
_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206

#73028 - JimmyL - Wed Feb 22, 2006 10:44 pm

I just wrote a quick game the other night to test my touchscreen code, and it seems(at least on my ds) that random popping touchscreen readings happen constantly with light touches, a heavy touch is generally accurate... but of course on the way to a heavy touch a light touch sometimes happens and gives me bad results.

There have been a few discussions on this board about the subject, I was just about to go read them, I suggest you do the same, other people have definitely found work arounds for this problem.

one thread is here: http://forum.gbadev.org/viewtopic.php?t=7980
_________________
A Touch of War