I’m completely new to Corona and I am considering using it. I just found out that GameSalad can’t handle a type of scene that I want to create. What is the limit to objects on screen in Corona? If I wanted to do a grid of 300 or more 4x4 pixel objects that change color when a single player actor overlaps them - so you could basically draw out a path. Is this possible? Or am I going to have to build my specific engine from the ground up in Cocos2d so that I can code that in and optimize it? [import]uid: 10622 topic_id: 3086 reply_id: 303086[/import]
Hmm, interesting question… I suppose the “limit” is whatever the target device can handle. iPad and iPhone4 would handle more scene objects than iPhone2/3. So it’s not about what Corona can handle, but how much the device can handle from Corona. 
But it would also be about smart design. It would probably be very very bad (memory-wise) to have every object of the 300+ listening (sensing) some kind of user interaction, constantly, repeatedly, as the game runs. Maybe a better way would be to sense the overall gesture of the user’s finger, then determine which of the objects were contained within that gesture region after the gesture motion is complete.
Sorry I don’t have a more specific answer… I think it’s definitely worth a test, by downloading the Corona trial version, versus jumping into Cocos2D… unless you’re already familiar with Obj-C and all of the heavy programming that Cocos2D requires.
Brent
[import]uid: 9747 topic_id: 3086 reply_id: 9050[/import]
Thanks Brent. I guess I could do overlap detection within the main actor - so that when the actor passes over one of the dots - it is a script within the actor that changes the color of the dot. That way the dot could just be a static lifeless object that has no sensing what so ever.
I’m not completely sure how that’s handled. If the command is passed on to the object - the parent might change all instances. If the main actor could just affect an instance without affecting the parent, then I think success.
Maybe it’s possible within an array:
if (main actor passes over x instance)
{
array[x index] = x, color=blue;
}
Sorry, I’m still a newbie with some programming. 
[import]uid: 10622 topic_id: 3086 reply_id: 9052[/import]
Yes, I should have thought of that! I think your idea is about perfect, at least in theory.
Corona, like most languages, can share information between colliding objects when the collision occurs (GameSalad seemed utterly clueless about this concept, which caused me endless frustration and finally made me give up on the entire product).
So in your case, the individual dots are not sensing/listening constantly for a collision, but rather, you have a Sensor attached to the “player” object or whatever you’re naming it. When the sensor crosses over a dot, it changes that dot color, as follows:
local function dotScan( self, event )
-- Change dot color!
--Note that "self" is the SENSOR object, not the player actor
--Note that "event.other" is the DOT that the sensor hit; use this to access its memory location and change its color
end
yourPlayer.dotSensor.collision = dotScan
yourPlayer.dotSensor:addEventListener( "collision", yourPlayer.dotSensor )
I’m using a similar routine in my current game. Alot of new users don’t seem to understand the concept of Sensors, but they’re invaluable and very powerful. Do some research on this, and also Collision Filters, to accomplish your goal.
http://developer.anscamobile.com/forum/2010/10/25/collision-filters-helper-chart
Brent
[import]uid: 9747 topic_id: 3086 reply_id: 9054[/import]
Hey Snow,
I just hacked together a quick simulation for you, partially to learn for myself whether it works (and it does!). Can you give me an e-mail address where I can send you the code file? This is the beauty of FAST Corona prototyping, 10-15 minutes in some cases…
Brent
[import]uid: 9747 topic_id: 3086 reply_id: 9057[/import]
Holy CRAP!!! Thank you Brent. My email: calgary_snow @ hotmail dot com. (Dunno if addresses are allowed to be posted).
I still haven’t decided if I’m going to use corona since I still have to learn Lua - but I do have an actionscript background.
I decided to do a stress test with GameSalad. I ran the test within a copy of GS on a vmware image of snow leopard on a business laptop with only 8mb shared vram. I had 300 32x32 pixel objects on a 2400x1800 background (6 800x900 images tiled together) and it actually ran - at about 12 fps. I touched all objects with my main actor and they all changed alpha. That is interesting for the buggy-ness that GS is known for.
None the less, I could probably do waaaaaaaaayyy better with Corona. At least I know that what I want to do works. And now here you are helping me out already before I even start with Corona. This is awesome. You will definitely be a first to get my game when it’s done.
[import]uid: 10622 topic_id: 3086 reply_id: 9065[/import]
Hey Brent, me too please! :> jtalspam (@) gmail
I’m interested to see how it worked out.
[import]uid: 9562 topic_id: 3086 reply_id: 9097[/import]