Tuesday, January 24, 2017

algorithm - How to correct shooting in touch-screen shooting games?


Assume a shooting game for iPhone that the character shoot toward where player has touched.


But as we know, There may be fault in touching screen by player and it conclude to bad game play and low fun.


So, How can I correct shooting method ?



Answer




I think when player touch a point, he target some thing that will place in a cone as below picture show.


enter image description here


So, we just need to check collision of objects in this cone, and if any exist, the player most probably decided to shoot at it.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...