More Porting Problems

Hey guys,

Sorry for all the posts (this is my second) about porting problems. So my new problem is that outlines don’t carry over to the android version of my game. For example, there is a boss that shoots fireballs. On the simulator the fire balls have an outline which allows for collisions to occur with it. For some reason, the fireball outline, and another outline for a ramp, don’t carry over to the android version. Any thoughts? Thanks everyone.

What do you mean, “don’t carry over”.  you mean they don’t render?  Are you getting any errors?  Check the file cases of all assets.  Make sure you use the right case when loading images because:

  • Wrong case will work fine on simulator, but 
  • Wrong case will fail on the device (Android and iOS).

If you want to catch these errors early, include my caseErrorDetect module in your project:

http://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2015/01/caseDetectError.zip

The link above includes the module and a sample usage.

Hey man thanks for all your help. As a newbie to corona I have no idea how to use your module but I will try and figure it out. By “don’t carry over” I mean they’re not there. There is not even the standard rectangle around it. There is no shape whatsoever to detect collision, so to me essentially, even though it was declared as a physics body, it’s just a moving picture (as of right now).

Are you talking about physics.setDrawMode(“hybrid”)?  You’re talking about the little green and brown boxes, circles and such around your objects?  

physics.setDrawMode( “normal” )

will cause the outlines to go away.

Rob

Hi again.

The link I included includes a sample showing how to use the module.  So that should be easy.

If the image isn’t even showing up, I’m going to guess the code is not being executed OR  you’ve made a case error (my original guess).

Hope you figure it out soon.

Just an update for everyone using this as reference.

So I made outlines of a fireball and a ramp in my game, using graphics.newOutline. I also made a bunch of other outlines on other things like a fire monster and a snake monster. So on the corona simulator all the outlines were there and the collision detection was perfect. On android, most of the outlines worked, but the fireball and the ramp had no collision detection what so ever, physics bodies would just go through them. So since these two weren’t very difficult shapes, I ended up just drawing a shape over them using the shape parameter when you create a physics body, which worked on the device. 

As far as errors go, I checked for case errors and there was nothing. I also changed the picture but kept the same name, and the same thing happened, worked on the simulator but not on the device.

So I guess if this is happening to you and you’re pressed for time, you may as well just take the time to draw a shape around your picture for collision detection.

Thanks everyone for your help.

What do you mean, “don’t carry over”.  you mean they don’t render?  Are you getting any errors?  Check the file cases of all assets.  Make sure you use the right case when loading images because:

  • Wrong case will work fine on simulator, but 
  • Wrong case will fail on the device (Android and iOS).

If you want to catch these errors early, include my caseErrorDetect module in your project:

http://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2015/01/caseDetectError.zip

The link above includes the module and a sample usage.

Hey man thanks for all your help. As a newbie to corona I have no idea how to use your module but I will try and figure it out. By “don’t carry over” I mean they’re not there. There is not even the standard rectangle around it. There is no shape whatsoever to detect collision, so to me essentially, even though it was declared as a physics body, it’s just a moving picture (as of right now).

Are you talking about physics.setDrawMode(“hybrid”)?  You’re talking about the little green and brown boxes, circles and such around your objects?  

physics.setDrawMode( “normal” )

will cause the outlines to go away.

Rob

Hi again.

The link I included includes a sample showing how to use the module.  So that should be easy.

If the image isn’t even showing up, I’m going to guess the code is not being executed OR  you’ve made a case error (my original guess).

Hope you figure it out soon.

Just an update for everyone using this as reference.

So I made outlines of a fireball and a ramp in my game, using graphics.newOutline. I also made a bunch of other outlines on other things like a fire monster and a snake monster. So on the corona simulator all the outlines were there and the collision detection was perfect. On android, most of the outlines worked, but the fireball and the ramp had no collision detection what so ever, physics bodies would just go through them. So since these two weren’t very difficult shapes, I ended up just drawing a shape over them using the shape parameter when you create a physics body, which worked on the device. 

As far as errors go, I checked for case errors and there was nothing. I also changed the picture but kept the same name, and the same thing happened, worked on the simulator but not on the device.

So I guess if this is happening to you and you’re pressed for time, you may as well just take the time to draw a shape around your picture for collision detection.

Thanks everyone for your help.