Moving object without physics and transitions?

Hi guys,

I started this game and it is working nice. Corona is very good api but when i spawn multiple objects with physics, game starts to lag. I read everything about optimisation and people say that spawning multiple objects with physics can be a problem . Do you know how to move object to moving target without using physics or transition? 

I hope you understand my english :slight_smile:

Thanks.

Your english is fine  :) 

Normally spawning multiple objects with physics shouldn’t be a problem.

How many objects are you talking about?

Thanks for quick reply.

I spawn between 50 - 100 . It works fine when i have 400 objects on stage but when i reach 500 it stars lagging. 

Yeesh, 500 is quite high. Are you using collision physics? If so, removing physics entirely might not be the best idea. If you aren’t using physics collisions, then maybe you can incorporate movement logic into your gameloop?

Also, are you seeing lag on the device or the simulator? If you’re seeing lag in the stimulator, you can be sure you’re game is going to crawl on a device.

Yikes!  500 physics objects? That’s a lot of physics calculations.

I can see that so many physics objects can slow things down. Like PaNc said if you don’t need physics on all objects I’d also recommend writing your own movement logic for the objects that don’t need physics.

If they *do* need physics then I’m not really sure what to recommend as I haven’t had to optimize physics in Corona yet…

Your english is fine  :) 

Normally spawning multiple objects with physics shouldn’t be a problem.

How many objects are you talking about?

Thanks for quick reply.

I spawn between 50 - 100 . It works fine when i have 400 objects on stage but when i reach 500 it stars lagging. 

Yeesh, 500 is quite high. Are you using collision physics? If so, removing physics entirely might not be the best idea. If you aren’t using physics collisions, then maybe you can incorporate movement logic into your gameloop?

Also, are you seeing lag on the device or the simulator? If you’re seeing lag in the stimulator, you can be sure you’re game is going to crawl on a device.

Yikes!  500 physics objects? That’s a lot of physics calculations.

I can see that so many physics objects can slow things down. Like PaNc said if you don’t need physics on all objects I’d also recommend writing your own movement logic for the objects that don’t need physics.

If they *do* need physics then I’m not really sure what to recommend as I haven’t had to optimize physics in Corona yet…