How to get a clash of lights?

Here is the moment that the player has been waiting for. The clash of lights!. You can see it as a light show of little lights fighting each other, or you can watch how they reach their objective and escape through an exit block. Little lights want to get out from where they are stuck and clash with others who want to do this.

To do this first you need to create an array of no more than 32 enemies on the stage. That’s all there is to it!. The number of enemies the player has access to will be also defined by how many “blocked” exits are in the level. Two exits, two enemies maximum on-screen at a time. Four exits, four enemies maximum.

clash of lights

The player can’t do anything to make more enemies appear on the screen. For example, the blue enemy in the image below is already ready to escape. You can check if an enemy is about to escape or not by checking its “blocked” property (very useful for timer-based levels). They come out to play randomly and make a beep sound when it happens.

The “Chance” value lets the player know how likely it is for this kind of event to take place on that specific position on the stage. 100 means it’s gonna happen every time. 0 means it’s not gonna happen at all during that level run. The lower this value, the less likely it is for an enemy to escape.

Note that enemies will try to escape even if another one has already escaped (they don’t care). If this happens, the following will happen:

  • 1- The first one reaches out and stays there until he is hit by a player
  • 2- A new random one tries to escape
  • 3- If there are no more exits to go, he stays there too

The blue enemy in the image below is already trying to escape. It’s blocked because another enemy is about to escape as well. This will be resolved with the next bullet point

Enemies that are not blocked When an enemy reaches out and finds that there is no exit to go, it goes back where he came from and blocks himself. Since this is a solid object, we can put it into the player’s way and make him die if he hits it (note that enemies won’t do anything if the player collides with them).

 

Leave a Comment