O'Reilly logo

Learn Corona SDK Game Development by Frank W. Zammetti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter     8

The Game, Part 4: Collision Events

In most action-oriented games, the notion of collision detection plays a primary role. Whether it’s detecting when Mario lands on a Koopa Troopa, or when Pac-Man gobbles a power pellet, or when Master Chief mêlées with a Covenant grunt, being able to detect when two objects come into contact is part and parcel of many types of games.

Astro Rescue is no exception. The gameCoreCollisionEvents.lua source file contains the event handler function (along with some related “stuff”) that is responsible for handling such events. In a very real sense, this code, although rather small in volume, is responsible for making the game work. I know, you could say that about the main game loop (and I think I may ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required