Hey, we have forums!

Author Topic: Tablet support?  (Read 31674 times)

0 Members and 1 Guest are viewing this topic.

Offline IceD

  • Extra Bit
  • *****
  • Posts: 177
    • View Profile
    • Server/FTP
Re: Tablet support?
« Reply #15 on: January 16, 2008, 03:34:34 pm »
I have a trust TB-4200 and my pen has a button with two sides - one for left click and another for a right. It matches the hand perfectly, so I think it would be great to play it. I'll try this within next few hours ;)

btw, you don't have to spent loads of $$$ to buy a good tablet. Wacom is perfect but you mostly overpay because of the company. Wacom also puts loads of expensive graphic programs into the pack, so it's obvious that it will cost far more than any other tablet.  Pentagram and Trust tablets are far more cheaper and also consist to be very good.

I'm happy with my one  :)

EDIT: 5 mins later

I finally tested it. The same problem occured as above, but it's all because of a wrong pen relativity. You have to change tablets pen relativity from "pointer" or "pen" into a "mouse" one. And it works perfectly after that, the rest depeneds on the tablets quality  ;). Mine works fine and I have to tell Aquaria was meant to be played by this kinds of control devices!. Propably Wii is fun too  ;)
« Last Edit: January 16, 2008, 03:50:25 pm by IceD »

Offline tyroney

  • Bit
  • ***
  • Posts: 14
    • View Profile
Re: Tablet support?
« Reply #16 on: January 16, 2008, 08:00:39 pm »
As I stated back towards the top, relative (mouse) mode removes a lot of what makes a tablet great.  (and it sounds like that doesn't work for a tablet PC according to the thread originator)

So now I'm here to ask:  would it be too big a hassle to add a tablet checkbox to the config that would unlock the cursor, and poll the mouse position that way? 

edit for kal: with a wacom, any tap is a left-click, and then the stylus has a button on the side fo right click.  Basically you hold the stylus just over the surface while you use it.  (which actually makes double clicks hard sometimes, since the motion of tapping or pushing the button can cause the cursor to wiggle enough that some programs register it as two separate clicks) 

Also, if you're steady handed, and want to try something quite different with the game, keep your pen in the middle of the screen/tablet, and use it like a joystick to control the cursor.  (the further from the center you move, the faster the cursor will go in that direction)
« Last Edit: January 16, 2008, 08:05:40 pm by tyroney »

Offline Kal

  • Bit Bit
  • ****
  • Posts: 85
    • View Profile
Re: Tablet support?
« Reply #17 on: January 17, 2008, 09:59:08 pm »
haha, good idea except for the steady-handed part (I'm not!)  So the tablet stylus, other than the options menu, behaves the same as the stylus for my lappy (tap = left, hold button and tap = right, plus an eraser for no purpose outside of OneNote  :D)

The issue with that check box, though, is that they may have to go through the ENTIRE code, depending on how they have it programmed.  All for a relatively minor feature (I don't know anyone who has a tablet and doesn't have a mouse just in case).

Offline vitaminNewB

  • Bit
  • ***
  • Posts: 18
    • View Profile
Re: Tablet support?
« Reply #18 on: January 18, 2008, 04:09:52 pm »
Good Stuff!
That all pretty much sums up how my pen works. 

It has just one thumb button.  So you rock one way for button 1, and the other way for button 2.  I tried setting one button to right click, and one to middle click.  That made the boss fights HORRID. ???

little side note:
There are also buttons on the tablet that you can setup.  I finally just set one to middle click, and one to ctrl/right click.  It makes things a little bit interesting, and annoying since the buttons make a *click**click* sound.  (I get the cam today, so the video of the mouse vs. pen mode is still coming)

Some screenshots for reference,  incase someone has this same prob in the future.

Stylus/pen setup



Pad button setup

Offline Astrylian

  • One Bit
  • *
  • Posts: 1
    • View Profile
Re: Tablet support?
« Reply #19 on: January 24, 2008, 11:15:21 pm »
I've got this problem too, with my Wacom tablet. I doesn't look like it'd be hard to fix; they just need a checkbox like someone mentioned in the settings to turn off the locking of the mouse to the center of the screen. The functionality is already done; it's what they use for the Wii controls.

Offline vitaminNewB

  • Bit
  • ***
  • Posts: 18
    • View Profile
Re: Tablet support?
« Reply #20 on: January 26, 2008, 03:49:16 pm »
Astrylian:  Hey, that's a good point.  I'm thinking checkbox too.  This video should at least show what's going on with both modes. 


 YouTube Video:  http://www.youtube.com/watch?v=5ZPba3-4InU
OK.  This took LONGER than expected. >:(
Finally got some reference video of the differences between the "mouse mode" and "pen mode" tablet settings. 

Mouse mode:
Works perfect with Aquaria, of course.

Tablet mode:
errr.
If you try and move the cursor to the center of the screen, it will immediately seek the edge of the screen.  The cursor stays along the edge until you touch the tablet to try and move it.  If you try to balance the cursor in the middle of the screen ( I tried that at about 2:18ish) you can get it to almost stay on Naija.  But as soon as you try to click, it'll shoot to the outer edges of the screen.  And it just stays there.  You can see the times when I tried moving the cursor to center of the screen, and it just seeks the opposite side of the screen. (around 2:27 & 2:40).  It's kinda frustrating but it makes for some good laughs!  There's probably some trick to convert pen to mouse coordinates or something like that.

Offline Wace

  • One Bit
  • *
  • Posts: 1
    • View Profile
Re: Tablet support?
« Reply #21 on: April 06, 2008, 01:01:02 am »
Apologies for bumping. Felt there was still some need to solve this.

At least my Thinkpad does not contain similar setup wizard (Plus Wacom's drivers break its pressure sensitivity for some reason) so the pen -> mouse solution doesn't work for me (And other thinkpad users I guess). Also I'd think the Wacom solution is prone going out of sync if the pen is lifted too far from the surface.

Fortunately Aquaria uses open source library for input, so changing the source and recompiling it isn't that hard.

For those who want to do it themselves:
Get sources from SDL homepage. The mouse handling is located in src/events/sdl_mouse.c. Changing the pointer is moved by incrementing its position on each update:
x = SDL_MouseX + x
y = SDL_MouseY + y

To make positioning absolute, removing these lines works. This stops mouse from staying at edges, but makes it misaligned. Origin of mouse is in middle of screen and origin of cursor is at top left. Changing the two above lines into
x = x + (SDL_VideoSurface->w /2);
y = y + (SDL_VideoSurface->h /2);

fixes the problem. Worth mentioning though, that after this using normal mouse is not possible.

Copy the SDL.dll into Aquaria directory (Backup original, so you can switch it for when you want to use normal mouse!)

Compiled library: http://jubjub.homeip.net/www/files/SDL.dll
Changed source: http://jubjub.homeip.net/www/files/SDL-1.2.13-tablet.rar
The source is under LGPL.

Note: I haven't given it very extensive testing, and only with the demo (Wah! Wants working credit card!). And in case this has been fixed in one of the patches for full version, it can be ignored. Also tablet clicks are sometimes too quick for Aquaria to register them, atleast for me. So if you have difficulties clicking with tablet, try clicking slower.

- Wace

Edit: I hope this doesn't needlessly bump the post. Saw some 404's in web logs and figured the urls here weren't updated. Fixed now.
« Last Edit: June 14, 2010, 06:44:31 am by Wace »

Offline Kal

  • Bit Bit
  • ****
  • Posts: 85
    • View Profile
Re: Tablet support?
« Reply #22 on: April 07, 2008, 08:10:24 pm »
Wace, that's a pretty good idea.  I also have a Thinkpad tablet PC (probably should've mentioned that in the first post  :D).  However, I also use a mouse a lot whenever I'm sitting at a desk, along with the tablet for taking notes, so having to change the SDLs whenever I want to switch back and forth isn't that fun.  Do you have a pointer nub on your laptop?  If you do, can you see if it will still work with the modified SDLs?

Offline jhoff80

  • One Bit
  • *
  • Posts: 1
    • View Profile
Re: Tablet support?
« Reply #23 on: January 03, 2009, 11:57:51 pm »
So I read this thread, and tried the SDL file linked here with the demo on my Dell Latitude XT tablet PC, and it worked pretty well.  Instead of single clicking on menus and things to click them, I had to double tap them with the pen.  In order to double click (for example to pull up the world map), I had to quadruple tap with the pen.

I figured this was fine, a slight inconvenience, but entirely fine.  But now, I've bought the game and progressed further with it.  To revert back to normal form you need to tap left and right on the mouse at the same time, which is entirely impossible with the pen.  Its a shame, because otherwise, the game plays great with it.  (Unfortunately too, the Dell comes with a two button pen.  One button is hard coded to erase, since there isn't an eraser at the opposite end like the Wacom pens generally have.)

It really is too bad there's no official support, it really seems like the perfect control method for this game.