CoronaCrush using a simple code with raycasting. It is Awesome but, I found a BUG.

I just love this simple code using raycasting

The only issue that I’ve found is a BUG in this part.

I can tell how much I appreciate your efforts to make better improvement from any of yours, whoever it is.

Video - Bug Occured

https://dl.dropboxusercontent.com/u/19855857/CoronaCrush_Bug.m4v

Download - CoronaCrush

https://github.com/coronalabs/CoronaCrush

Hey Rob!

How do we solve this problem?

First, remember these are community forums. When you ask for just my help, you’re loosing out on the expertise of hundreds of developers.  Secondly we usually ask that you not bump posts for 24 hours. 

I’m not familiar with that code, so it’s going to take me some time to debug it. Just with a quick scan, like 412 seems suspect. It looks like it considers a match 2 or more instead of 3 or more. You might want to try changing both of those 1’s to 2’s and see how it affects things.

Rob

@Kim,

Hi. I wrote this game and maintain the code.  I’ve looked at your screenshots and video and don’t see an issue.

Please describe the bug by telling me these three things:

  1. What you saw.

  2. What you expected to see.

  3. Why you think this is a bug.

-Ed

PS - Rob is right.  This a community thing, so you gotta be patient.  I didn’t even see the post till just now.  Doing my job keeps me busy, so I only look once or twice a day.

PPS - Note: I think it is awesome that you included screenshots and a video.  I do however suggest you always write your evaluation of the issue using at least #1 and #2 above.

PPPS - (last one I promise) I will look into ‘matching on 2 instead of 3’ a little later and get back to you, but please confirm for me if that is the issue you’re reporting.

Hi.  I’ve looked at the original code and thus far not reproduced the issue, nor found any obvious coding errors.  

I think Rob was referring to this:

 if( lastMatches \>= 2 ) then achievementPopup() end

That code (above) is about when to pop up a ‘atta boy’ message and not about matching itself.

Questions:

  1. Is this happening in an unmodified version of the sample?

  2. If you made changes, were they timing changes?  This sample is timing sensitive. 

  3. Are you seeing this on-device or in the simulator?

Suggestion (not related to issue, but important):

  1.  Make all of the ray cast distances -5000.  Right now, most are -2000 with one at -500 I believe.  On high-resolution devices, this distance needs to be longer.  The sample is poorly written in this respect as it does not account for varied resolutions.

@Rob

Sorry for my misunderstanding and I thought you’ve made it  

(Don’t forget that I am always cheering you up)

@Roaminggamer

At first, I would like to give you many thanks for sharing wonderful code 

Answer:

  1. More than 3 Gems should be basically matched with this issue as I thought  

  2. Strangely enough, 2 Gems matched on the above screen shot & video as well as I realized it is “BUG”

P.S: Roaminggamer OP!! <3

Hey Rob!

How do we solve this problem?

First, remember these are community forums. When you ask for just my help, you’re loosing out on the expertise of hundreds of developers.  Secondly we usually ask that you not bump posts for 24 hours. 

I’m not familiar with that code, so it’s going to take me some time to debug it. Just with a quick scan, like 412 seems suspect. It looks like it considers a match 2 or more instead of 3 or more. You might want to try changing both of those 1’s to 2’s and see how it affects things.

Rob

@Kim,

Hi. I wrote this game and maintain the code.  I’ve looked at your screenshots and video and don’t see an issue.

Please describe the bug by telling me these three things:

  1. What you saw.

  2. What you expected to see.

  3. Why you think this is a bug.

-Ed

PS - Rob is right.  This a community thing, so you gotta be patient.  I didn’t even see the post till just now.  Doing my job keeps me busy, so I only look once or twice a day.

PPS - Note: I think it is awesome that you included screenshots and a video.  I do however suggest you always write your evaluation of the issue using at least #1 and #2 above.

PPPS - (last one I promise) I will look into ‘matching on 2 instead of 3’ a little later and get back to you, but please confirm for me if that is the issue you’re reporting.

Hi.  I’ve looked at the original code and thus far not reproduced the issue, nor found any obvious coding errors.  

I think Rob was referring to this:

 if( lastMatches \>= 2 ) then achievementPopup() end

That code (above) is about when to pop up a ‘atta boy’ message and not about matching itself.

Questions:

  1. Is this happening in an unmodified version of the sample?

  2. If you made changes, were they timing changes?  This sample is timing sensitive. 

  3. Are you seeing this on-device or in the simulator?

Suggestion (not related to issue, but important):

  1.  Make all of the ray cast distances -5000.  Right now, most are -2000 with one at -500 I believe.  On high-resolution devices, this distance needs to be longer.  The sample is poorly written in this respect as it does not account for varied resolutions.

@Rob

Sorry for my misunderstanding and I thought you’ve made it  

(Don’t forget that I am always cheering you up)

@Roaminggamer

At first, I would like to give you many thanks for sharing wonderful code 

Answer:

  1. More than 3 Gems should be basically matched with this issue as I thought  

  2. Strangely enough, 2 Gems matched on the above screen shot & video as well as I realized it is “BUG”

P.S: Roaminggamer OP!! <3