Click on the example then use arrows/wasd to crash into the enemy ship.
Fully understand the concept by watching the tutorial in full screen at high res.
Once you have watched the video, you can refer to the code below to help you make your own that fits your game. Make sure you type it yourself to help you learn.
In the update function in 'main', check for collisions. In my game, if there is a collision, I just reset the whole game by calling init().
I detect a collision if the center of the player and the center of the enemy are closer than 35 pixels. Play around with different distances until you find something that works for your game.
The 'distance' function is not built into microStudio, you will have to go here and click import source file .