The Apple pencil stylus

Post Reply
Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

The Apple pencil stylus

Post by Henko »

Recently, ELectronic Arts decided to discontinue their current "Risk" game at the introduction of iOS 12, and bring out a new version of it under another name and price. As i don't want to pay twice for the same game, i decided to "freeze" my iPad air to iOS 11 to keep "Risk" (and the current version of SmartBasic for that matter) and purchased a new iPad "2018" which will be kept up to date.
Like the "pro" versions of the iPad, the new iPad 2018 supports the Apple pencil and i wanted to try it.

I am now busy to make my own version of Risk in SB.
I started with copying the "world" from the iPad screen using a sheet of transparantpaper, made a small program to pick up touches of the Apple pencil and file the pixel coordinates.
With the pencil, it took me about 5 minutes to record the 172 nodal point.
The sheet of transparant paper :
E32C81BB-988C-4F22-9FDD-0161DAD95A58.jpeg
E32C81BB-988C-4F22-9FDD-0161DAD95A58.jpeg (1.49 MiB) Viewed 2113 times

After jotting down the nodal point numbers of each of the 42 countries, the map was easily programmed, using the "poly draw" and "poly fill" instructions.
Selecting of countries during the game is done by little buttons (which will also be used to show the strength data of the country). The locations of these buttons were also picked up with use of the pencil in an "eyewink".
The current status :
A8B4E68C-75CD-4EAB-995C-3BDF48A2BA05.png
A8B4E68C-75CD-4EAB-995C-3BDF48A2BA05.png (351.77 KiB) Viewed 2113 times

Just to show a nice application of this stylus. It produces high precision relative to the other cheap) stylusses.

User avatar
Dutchman
Posts: 851
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: The Apple pencil stylus

Post by Dutchman »

Is the interaction with SB simple via the touch commands?

Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Re: The Apple pencil stylus

Post by Henko »

Dutchman wrote:
Thu Oct 04, 2018 8:42 am
Is the interaction with SB simple via the touch commands?
Yes, i used the following code snippet to fetch the start- and endpoints of the dotted lines (with the transparant paper aligned on the iPad screen.

Code: Select all

graphics ! graphics clear 1,1,1
do slowdown
  get touch 0 as x,y
  if x<>-1 then
    file "lines" print int(x),int(y)
    pause .3
    end if
  until y>750
end
The PAUSE .3 is needed to prevent multiple registrations when touching the surface.

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: The Apple pencil stylus

Post by rbytes »

I wish I was upgrading my iPad this year. I would like to try the Apple Pencil. But it won't be until at least June next year. Meantime I searched on Amazon for the best-rated active stylus compatible with older iPads. The Heiyo rated 4.5/5, so I ordered one, and it should arrive tomorrow. At least I can be sure that if I am not happy with it, Amazon will take it back for a full refund. They even pay for return shipping.

Update. The Heiyo pen arrived as promised, and I tested it with a a professional drawing app -ArtStudio SB program. It is very responsive.

The I tried it in my SB program Painter. I will have to change my code a bit, because tapping does not draw anything. The pen has to move before anything appears. So to dot an I, I have to move back and forth a bit.
Attachments
FD39F659-D8E3-4802-AF1F-058F217318FD.png
FD39F659-D8E3-4802-AF1F-058F217318FD.png (224.43 KiB) Viewed 2080 times
D8070A31-C310-4FBF-83DF-C35D701CF05B.png
D8070A31-C310-4FBF-83DF-C35D701CF05B.png (245.8 KiB) Viewed 2080 times
The only thing that gets me down is gravity...

Post Reply