uLove Proposal

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: uLove Proposal

Post by Robin »

vrld wrote:Not so! With touchscreens you wont have that many mouse move events (afaik the move events also are in absolute and not in relative coordinates). This makes hover effects impossible.
I had already thought about this; if we want to abstract touch screens to look like mice, LÖVE needs to make sure the game can process a movement (artificial, if necessary) before it sends the “click-event”. This because games may rely on the fact that with mice, the cursor has to hover an area before it can click it.
Help us help you: attach a .love.
User avatar
Luiji
Party member
Posts: 396
Joined: Mon May 17, 2010 6:59 pm

Re: uLove Proposal

Post by Luiji »

The only way I've ever found in any programming language and any GUI library (including curses) to handle information from a touchscreen is to use MouseDown events. If there is any possible way to figure out whether it is a touchscreen that is being used, please refer me to some documentation, because I've tried, and tried, and tried, and I can't figure it out. It would help so much with some of the software I'm developing...
Good bye.
User avatar
zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Location: In your head.
Contact:

Re: uLove Proposal

Post by zac352 »

vrld wrote:
Luiji wrote:By touchscreens work just like mice I mean from the technical perspective that almost all operating systems do not differentiate between the two when sending events to the program (in this case being LÖVE).
Not so! With touchscreens you wont have that many mouse move events (afaik the move events also are in absolute and not in relative coordinates). This makes hover effects impossible.
With a touch screen, there is only one event: left click. Of course, you *might* be able to use joystick for a touchscreen, but that is a definite might indeed. :|
Hello, I am not dead.
User avatar
Ryne
Party member
Posts: 444
Joined: Fri Jan 29, 2010 11:10 am

Re: uLove Proposal

Post by Ryne »

If a game were going to be 'Touch Based" it would have to have a different UI all together. Though a touch device behaves like a mouse from a computer perspective, actually USING the device like a mouse is nothing short of mind numbing. Interfaces such as the "iPod Touch" are created with efficiency in mind, and to make the user experience a lot more fun.

Imagine holding an iPod touch, though instead of the snappy shortcuts like "slide your finger across the screen to switch screen", you are forced to manually click a next button.

Luiji wrote:The only way I've ever found in any programming language and any GUI library (including curses) to handle information from a touchscreen is to use MouseDown events. If there is any possible way to figure out whether it is a touchscreen that is being used, please refer me to some documentation, because I've tried, and tried, and tried, and I can't figure it out. It would help so much with some of the software I'm developing...
Drivers. Buy a Wacom Graphics tablet and plug it in but DON'T install the drivers. The computer would treat it as a mouse, meaning if the mouse on screen is in the bottom left corner and you press your finger to the center of the tablet the mouse will not move. Though if drivers are installed, the device is treated as a touch device, where if you touched the center of the table the mouse would jump to that area.

The same would apply to handheld devices such as the iPod Touch. It would have a similar driver set. I think you could always program the game to "Grab" the mouse, and manipulate it as you please to get it to behave the way you want though.
@rynesaur
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 35 guests