Hello I have my normal
Runtime:addEventListener(“collision”, onCollision) for my player which is working nicely,
I also have Runtime:addEventListener(“collision”, weaponCollision) for the weapons that the player are using.
An example of me checking like a single item/npc/monster/etc:
elseif (agro.type == "player" and hit.type == "randItem\_1") or (agro.type == "randItem\_1" and hit.type == "player") then
List goes down using only elseif so only 1 check per function…I would like them all to be if’s to check for multiple still…but that could eventually be checking down 3600 times in a function (see my math below for this)!
Both are working nicely, I’m making a more adventure style game and the amount I am checking for is increasing everyday. example for the player colliding/checking with NPCs, randomItemSpawns (10+), small monsters(10+), medium monsters(10+), monster hit types depending on the monsters(countless amounts), save touches, etc etc etc list goes on.
Also the weaponCollision I plan to even be higher with like 60 different weapons(would be nice) right now there are 6, and this is starting to become a very big list for the weaponCollision being (ex. boomerang checking against 10 different pots, and also sword checking for 10 different pots, boomerang checking against the 30 types of monsters and sword checking for different types of monsters, etc) so the weaponCollision will soon get huge depending on the increase of weapons.
My question is, how many checks can this handle and could I implement 60 weapons with possibly checking against 60 different things 60x60 = 3600 checks on the weaponCollision alone. Currently they both are checking for upwards of 40+ things on their own, but I’m thinking about the future. Also would have the animations for each weapon being (128x128 for 2 sides and x 2( for all 4 sides of player), can the phone even handle this amount of texture space? I’m assuming I would have to clean them out when not using them so only have 4 different weapons at least on use at once and call them in when being used. I also got the normal game (UI, weapons, npc’s, monsters, several maps, blah blah) which all seem to be running pretty close to constant 30 fps fine right now (hell of a work to get that to constant 30 fps).
Corona Dev would be greatly appreciated on this since they are the ones who made the engine :). Would like to give answers to my boss to let him know how far we can go with this weapon/item thing.
(If I was Apple I’d be petrified), and an old phone my daughter was delighted to get rid of because it was rubbish ; if it’ll run on these it’ll run on pretty much anything.