Tower Defense and Lime

Will Lime be useful to make a tower defense game? If so, are you able to make a simple tutorial to illustrate how this can be done?

It would certainly be possible, remember Lime is "just" a map loader. It then has some other nice features etc to make certain things easier.

You could simply use Lime to load up your games maps and position all the objects etc and then use regular Corona to do the rest of the game ( I'm sure there are tutorials for tower defences around ). In fact here is one for flash that could get you going in the right direction concept wise - http://www.emanueleferonato.com/2007/10/06/make-a-flash-game-like-flash-element-tower-defense-part-1/

You could easily use Lime/Tiled to define all your paths for the levels no problem, it would be up to you and your code to actually develop the logic on top of all this though.

Thanks for the reply. I am just wondering if the placement of the "towers" onto the right tile is something that Lime can help or I got to figure out how to do it myself?

Lime could help you there :-)

Within say a tap event from the user you could then use this function - http://justaddli.me/api.php?c=utils&m=screenToGridPosition - to convert that position to a grid position which then in turn you could convert back to a world position - http://justaddli.me/api.php?c=utils&m=gridToWorldPosition - giving you the real position of the centre of the nearest tile to where the user tapped. Then just place your new tower at that position.

You can also use Lime to get tiles at a certain position meaning you can detect which towers a user tapped on fr upgrades etc.

views:1690 update:2011/10/19 14:58:09
corona forums © 2003-2011