Homebrew [Question] How to achieve simple touchscreen input for smooth drawing with libnds

aldermath

New Member
OP
Newbie
Joined
Feb 29, 2024
Messages
1
Trophies
0
Age
22
XP
64
Country
Canada
I am currently working on an app that will require a touchscreen drawing component to get hand-drawn images from. I've got some basic code running to draw a pixel on screen wherever the screen is touched, however, if you move the stylus too fast, it gives a bunch of disconnected points instead of a smooth line.

It seems like it's only refreshing the touch position every frame, but it seems like it needs to be faster.

I know smooth input is possible because official things like Flipnote and some homebrew titles seem to be able to do it. I'm just not sure what thing I need to change.
I've tried reading the touch position many times during each loop and adding it to a buffer, but I get the same result.

I've attached some sample code, and a screenshot of what I mean.
 

Attachments

  • spotty drawing.png
    spotty drawing.png
    13 KB · Views: 11
  • main.txt
    1 KB · Views: 10

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Lol rappers still promoting crypto