Apple rejected my game so I need a little help.

Monkey Forums/Monkey Programming/Apple rejected my game so I need a little help.

Tri|Ga|De(Posted 2013) [#1]
In my new game I have to buttons in the top of the screen and Apple says the buttons does not work precisely enough. They do on my iPhone thou.

I was thinking of adding two finger swipe to show and hie bigger buttons. I tried for some hours now but I can seem to get the code that do this trick.

So I ask you codes in this forum, can someone show me some code that detects two finger swipe in the four directions?

I hope someone can help so I can get my game approved at Apple.


benmc(Posted 2013) [#2]
You'll have to watch for a TouchDown(0) and TouchDown(1) at the same time probably, and then calculate the difference in their movement over time to determine if it was an up/down/left/right swipe.

My *guess* is that if the smaller buttons are still not responsive enough, even if you add a swipe for larger buttons, they may still send it back saying you have buttons that aren't working.


Tri|Ga|De(Posted 2013) [#3]
My idea was to show much bigger button on swipe down and hide them with swipe up.
The bigger button should replace my smaller buttons.

The swipe to the sides is for another task in my game.

Do you have some code??
I did try theTouchDown command but I can't seem to get it work as I want.


MikeHart(Posted 2013) [#4]
Are you using fE for it?


Tri|Ga|De(Posted 2013) [#5]
Yes I am


Paul - Taiphoz(Posted 2013) [#6]
is the issue that the buttons your using in game are simply to small, and as a result people or the devs doing your review were strugling to click them correctly ?

I think it might be a better idea to have the button small on screen as you have it now, however actually TEST for a larger area around the button to allow for fat fingers and clicks that are near but just not quite on target.

Would help a lot if you showed a screen shot.


As for the Swipe

On TouchDown(0) and (1) store the current TouchX , TouchY
Start a Timer
Wait around 100 or 200 Millisecs() or until TouchDown() = False
Check the distance and direction traveled from the origin x,y to the new current x,y, for a swipe you dont need to be overly accurate, your just looking for something like is the end y bigger than the start y if so its a swipe.

I could have probably explained this a lot better if I just coded it lol.


Tri|Ga|De(Posted 2013) [#7]
You can se a screenshot here

Remeber is iPhone screen size.

This is the response from Apple.
Specifically, we found that menu buttons were not functional when tapped.



Paul - Taiphoz(Posted 2013) [#8]
First of all I think you need to really make it clear with some form of Button GRFX that its a button, and not just some text.

Secondly I think given how far appart those buttons are your simplest solution will be as I said above, to simply expand on your touch area, for example if your button image is 100*100 pixels, in your code just check 150*150 pixels to give the user a little room for error as there does not seem to be much risk of them clicking another button by mistake.

For sure tho, you need to change those TEXT's to some form of Image Button as their really unclear.

If you need some help with button art I would be more than willing to help you out.


MikeHart(Posted 2013) [#9]
Just checked fE, a two finger swipe is not supported. Never thought you wanna do this. Need to add something for it.


Paul - Taiphoz(Posted 2013) [#10]
Something like this for your menu buttons...




MikeHart(Posted 2013) [#11]
And if you want, I can look at your code to check if there is a possibility for such a strange behaviour.


Tri|Ga|De(Posted 2013) [#12]
@Mike
Do you have a e-mail address to send the code.

@Taiphoz
Very nice buttons, whats the fourth one?


MikeHart(Posted 2013) [#13]
try support (at) whiteskygames.com

I can look at it tommorow evening as I will hit the bed and tommorow is a normal working day for me.


Paul - Taiphoz(Posted 2013) [#14]
Tri, the fourth image is the highlight that can be seen on the first 2, what you would do is draw the 3rd, then draw some text on it, and then cap it off with the 4th on top to complete the highlight or shiny effect.


Skn3(Posted 2013) [#15]
It's also worth testing collisions with circle overlaps rect (button) instead of point inside rect (button). Your thumb/finger tips aren't 1 pixel in size so it's worth giving a bit of leeway.


Shinkiro1(Posted 2013) [#16]
I think the core problem here is that your buttons are not looking like buttons and they are far too small.
Also your 2 finger swipe system idea sounds very confusing to me. When you swipe something you wouldn't expect that something get's bigger right?

Maybe what Apple wants you to do is make it very clear to users what they can click and generally improve your UI.


Tri|Ga|De(Posted 2013) [#17]
@Shinkiro1
I intend to remove the buttons. And when i swipe down with two finger two bigger buttons should appear on an black background. You then touch one of them and go to menu or reset the game.

@Skn3
I use the fantomEngine onTouch event, I don'y know if it only test one pixel.


rIKmAN(Posted 2013) [#18]
I really don't think having to swipe the screen to make buttons appear is the way to go with this, it's an unusual action that not many people will understand (lowest common denominator) and unltimately will confuse and frustrate people.

Just make some nice looking standard UI buttons in place of the text you already have.


Tri|Ga|De(Posted 2013) [#19]
The problem is I can't make the button bigger cause they will cover the the play field.


Volker(Posted 2013) [#20]
Make them bigger and use some alpha?


skid(Posted 2013) [#21]
Have you tried reproducing the bug?

The way I read it is the user is tapping the button not pressing it and expecting it to respond.

You need to use TouchHit not TouchDown for buttons as it is very possible that the button can be pressed and then released between the calls you make to TouchDown while TouchHit


Returns the number of times the specified finger has made contact with the touchscreen since the last OnUpdate.




Tri|Ga|De(Posted 2013) [#22]
I'm using famtomEngine's onTouch events. I don't know if they are using Hit or Down.


ziggy(Posted 2013) [#23]
I'm using famtomEngine's onTouch events. I don't know if they are using Hit or Down.
Can't you check the source code? It is likely to happen that between frames nothing is touch becouse the "Hit" has been too quick. Is this engine open source?


Tri|Ga|De(Posted 2013) [#24]
The engine is free so I guess its open source, but I don't know.
We'll have to wait for Mike to answer.


Shinkiro1(Posted 2013) [#25]
monkey modules always come in source code form.
Look in your monkey modules folder where you should have copied it.


MikeHart(Posted 2013) [#26]
@Tri: I had wrote to you and told you what I see. Change the snapping to 90 degrees. This way it will always have a successfull swipe. Like you have it Swipes at 45, 135, 225 and 315 degrees won't change anything. I also had sent you a new version where you could check for 2 or more Touches for swipes. To me the game behaves fine when you change the snapping to 90 degrees.

SwipeUpdate checks for a Touchdown with the given index.

Your buttons act on a TouchHit like you have coded it.


MikeHart(Posted 2013) [#27]
What I can't check is if the buttons are to small on an actual device. That they cover already some part of the map is not the bets map design.

Edit: What also could be is that if the reviewer has a finger permanently on the device, the index 0 is already in use and so you need to check for more TouchHits than just for index 0.


Tri|Ga|De(Posted 2013) [#28]
@Mike

I know ,I just have not had the time to look at your suggestion and updated fE.
And thanks for your help.

I said we had to wait for you to tell if your code was open source, not that I have not heard from you.


MikeHart(Posted 2013) [#29]
FantomEngine is released with a MIT license. The code is visible in the module folder. Or what did you ment by open source?