Hey there,
We’re developing a game that deals with a lot of entities (enemies) and the killing of them. Something like a tower defense game. We’re having serious issues with concurrency. For instance, there’s a function “A” that iterates over a table of enemies for dealing damage to them, but at any time in the game, an enemy might be killed by any other source of damage and be removed from the enemies table. If this happens concurrently, function A will get to an enemy that doesn’t exist anymore and start spilling out ‘nil’ errors.
I’m not asking for a work around for this as I’m able to find one myself but the thing is that it will never really fix the problem, just make it less frequent.
I would like to know if there is any support for concurrency control in Lua/Corona, so I can actually make sure this doesn’t happen.
Thanks in advance,
Manuel Costa
CluelessIdeas [import]uid: 61899 topic_id: 11774 reply_id: 311774[/import]