Touch not working on Palm Pre Plus

Previous topic - Next topic

Millerszone

#60
I received the Palm Pre with 1.4.5 today. I was surprised I received so fast.
MrTAToad, your test program worked with no problems.

But everything people were saying is true, and HTD Baseball does have problems on 1.4.5

- Problem 1: when the ball hits the top of the "batRestingMask" sprite the ball acts like it hit the bat, so the sprite transparency is triggering collisions.
transparency doesn't seem to work on 1.4.5. This also happens with the main animated bat sprite too.
I attached the bat mask sprite I'm using.

- Problem 2: Some button touches are un-responsive and could take up to 25 touches before they work  or would not work at all. This seems to be the problem...
Example of one part of the game that the touch did not work. I had to use BOXCOLL for most buttons.
This did not work:
IF SPRCOLL(mousePointer, mouseX, mouseY, creditsScreen, creditsScreenX, creditsScreenY) = TRUE AND mouseActive  = TRUE
PLAYSOUND(menuClickSnd, 0, menuClickVol)
LOADSPRITE "", creditsScreen
RETURN
ENDIF

This fixed the problem:
IF BOXCOLL(mouseX, mouseY, 15, 15, creditsScreenX, creditsScreenY, 320, 480) = TRUE AND mouseActive = TRUE
PLAYSOUND(menuClickSnd, 0, menuClickVol)
LOADSPRITE "", creditsScreen
RETURN
ENDIF

So now I have all the menu buttons working. I still have to fix the pitch and bat buttons, most likely the same problem as above.
Also the transparency sprites need to be fixed. Somebody with 1.4.5 can you please check.

Here is the bat resting sprite I'm using:



Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

ggindlesperger

#61
Millerzone....I assume you pulled Hit the Deck Baseball off the market for Palm? I was looking for it. I have a Palm Pre Plus with 1.4.5 and  not modified at all. I now have three of my GLBasic games on my Palm and 2 of them seem to work flawlessly. One of them has this button issue. The odd thing is that the one with the button issues has the least amount of buttons. In one of my games you touch the screen to cause a little explosion. That works perfectly and I thought that was a good test for touch positioning. There has to be some simple hitch to this.

Right now I am in the process of converting Hairy Legs to Android. That should be done this week and then I plan on devoting more time to some of my GLBasic stuff. I want to play around and see what is going on with the buttons in Hairy Legs on the Palm that is not happening with my other games on the Palm. The fact that 2 of the games seem to not have problem tells me I just need to find the specific thing that is causing the problem and work around it.

Thanks for all the helpful replies

Millerszone

Quote from: ggindlesperger on 2011-Apr-18
Millerzone....I assume you pulled Hit the Deck Baseball off the market for Palm? I was looking for it. I have a Palm Pre Plus with 1.4.5 and  not modified at all. I now have three games on my Palm and 2 of them seem to work flawlessly. One of them has this button issue. The odd thing is that the one with the button issues has the least amount of buttons. In one of my games you touch the screen to cause a little explosion. That works perfectly and I thought that was a good test for touch positioning. There has to be some simple hitch to this.

Right now I am in the process of converting Hairy Legs to Android. That should be done this week and then I plan on devoting more time to some of my GLBasic stuff. I want to play around and see what is going on with the buttons in Hairy Legs on the Palm that is not happening with my other games on the Palm. The fact that 2 of the games seem to not have problem tells me I just need to find the specific thing that is causing the problem and work around it.

Thanks for all the helpful replies
It's still on the market, but had to change min. requirements to 2.0+ . Will change back to 1.4.5 as soon as I fix the problems with HTD Baseball.

Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

erico

Hey Mike,

you don´t suppose using a 24bit image with a color set to transparent (pink) could work?

MrTAToad

At least you've found out what the problem is - I dont know why my example program doesn't have mouse problems...

Millerszone

Quote from: erico on 2011-Apr-18
Hey Mike,

you don´t suppose using a 24bit image with a color set to transparent (pink) could work?

Hey Erico,
O.K. I changed the transparent part of the bat resting sprite to Pink RGB(255,0,128) but
did not help.

Quote from: MrTAToad on 2011-Apr-18
At least you've found out what the problem is - I dont know why my example program doesn't have mouse problems...
I don't think the problem is mouse coordinates. The problem seems to be collisions.

Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

MrTAToad

Dont forget to put this in the Bug Forum - before it gets lost :)

ggindlesperger

I look some time to look at my various GLBasic projects and I believe MillerZone is correct. In learning GLBasic I tried doing buttons different ways so I have various methods throughout my projects. I looked at what works on the Palm Pre 1.4.5. One method I used was make a sprite that is small and set the alpha so it was invisible and then use sprite collisioning to determine when it hit the graphic that is the button. That method is broke. Works perfect on iOS, but Palm it is hit or miss.

The other method I used it to just determine the mouse coordinates and use IF to see if it is touching a button. This method works. I've tested it pretty thoroughly. I use this method for the keyboard I made for Hairy Legs and that it the only touch element that works good in Hairy Legs. All my other buttons in Hairy Legs use sprite collisioning and they do not work. My other projects use this method and they all seem to work.

Hope this helps.

Millerszone

#68
As far as I can tell, these are the problems.
1. The sprite transparency is triggering collisions.
2. SPRCOLL only detects collision in certain places.
BOXCOLL works O.K.

I fixed all buttons using BOXCOLL, now I have wait for transparency fix. I don't
know anyway around that problem.

- Top button is using SPRCOLL and sprite is transparent with 4 white corners
- Middle button using BOXCOLL
- Bottom button is using SPRCOLL

Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

erico

 ggindlesperger´s check on IF for collisions are only box related right? (least in my mind)
I guess to check on coordinates for a more abstract object would be too hard, maybe use a bunch of smaller squares to compose a similar object could do a quick fix?

Boxcol could also do it for the bat, if you can rotate the box and still check collisions it may be easier to program.

Back on the IFs, what about the diagram I´m sending? can it be done for the targets? is it out of the house? :S

Sorry if I´m too naive on the general ideas, trying to help it out...

[attachment deleted by admin]

ampos

Perhaps just create a sprite that is a rectangle, something like 80x8 pixels...
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

MrTAToad

#71
Wonder what version of SDL the Pre is using ?

Could you make the IPK/code available - so I can test of my 2.1 machine ?

ampos

I have noted that many of you are using boxcol (or sprcoll!) for button collisions, but my code ZONES is a way much easier solution. Don't know why nobody seems to use it...
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

ggindlesperger

Ampos wrote...I have noted that many of you are using boxcol (or sprcoll!) for button collisions, but my code ZONES is a way much easier solution. Don't know why nobody seems to use it...

I am not using it because I have no idea what you are talking about :) Fill me in. I have been away from GLBasic for awhile. I've been using Ansca Corona and converting projects to that so I can publish to Android. Converting, but still using both. GLBasic is one of the best tools out there, but Android is a market I want to hit, so for now I have to use both.

I got Hairy Legs all converted now. For the buttons I guess used a form of Boxcoll I just did a mouse position check. Did not actually use the Boxcoll command. I has to write down the dimensions of my buttons and it was a minor pain doing it this way, but it all works very smooth now.

The Mouseaxis code did not seem to be working so I did away with it and just added a scroll up and down button. On iOS you scroll the scores like you would expect on an iOS device, but on Palm it did nothing.


ampos

check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE