I’m new here and I’ve been working like crazy this past week converting over one of my existing games to Corona. Once I have successfully ported it over (which should be well before my 30-day trial expires), I’ll be purchasing a year subscription… so thank you Ansca for Corona, it is by far the BEST iPhone development tool I’ve used.
First of all, I understand Game Edition is in Alpha state, so if any of the strange behaviors I describe aren’t fixable, then I guess this can be taken as a bug report.
Before I go into the details of my problem, here is some background information on my project…
First, it might help to know that I’m using the physics engine for only two purposes at the moment: spritesheets and collision detection. I read somewhere that the latest version of Box2D allows for collision detection among NON-physical objects and that Corona was going to implement that but I can’t find anything on it, and I can’t get anything to collide UNLESS I .addBody().
Since that’s very little to be using the physics engine for, I tried using a Box2Box collision function I found here on the forums for manual collision detection, but it slowed my game down so much it was unbelievable (the accelerometer wouldn’t even work, which is how the main player object is controlled).
I have my own movement code that worked well for me apart from the physics engine, so I decided to set gravity to (0, 0) so I can move X and Y attributes freely. All I need is very simple collision detection so I have all my objects density, friction, and bounce set to ZERO.
All of the game objects are continuously moving UP (y - gameSpeed) during the main–and only–enterEvent “loop” with the main player object staying at a fixed Y position to simulate downward movement.
The problem, or strange behavior, is that sometimes the objects that are moving up get “stuck” before they collide with the player and even the sensor. It’s like a big invisible box is drawn around the objects and sometimes they get stuck there until another object pushes it upward from the bottom and gives it a “boost” at which point the stuck object will continue on it’s original path.
It doesn’t do that all the time though, in fact, most of the time everything works fine. When objects collide with the main player object they removeSelf() and do what they’re supposed to do, but every now and then they get stuck probably about 10-15 pixels below the main player objects and just float there (and sometimes the sensor object which is placed above the screen in the negative Y space).
I tried playing around with all the density, friction, etc. and even tried changing up body types and no matter what combination I come up with, the same problem persists… so I’m thinking it might just be a bug.
It would make my life 1000X easier if I could just have NON-physical objects collide (just checking to see if the display objects touch). Once again I thought I read somewhere that this was going to be possible in Alpha 2 but I may be mistaken… any light Ansca could shed on that would be greatly appreciated.
Anyway, sorry for the long-winded post… I’m extremely happy with Corona and if I could get these minute little “annoyances” taken care of my game will be well on it’s way to be ready for completion.
Please help, thank you very much…
Jonathan Beebe [import]uid: 7849 topic_id: 1533 reply_id: 301533[/import]
[import]uid: 7849 topic_id: 1533 reply_id: 4356[/import]