How do I make my game scale by adapting to each screen and resolution? The problem is that in my game there are objects that when they touch a barrier that is hidden beyond the layout, are destroyed, and a life is lost. But I have the barrier outside the layout so it takes about 3 seconds from leaving the screen until it collides and the life is discounted. Is there any way to make it as soon as it leaves the frame of the screen you lose a life and destroy the object?
I also have problems with the loss of lives, I have brought the barrier in the window of sight to see when it crashed and destroyed the object but not lose a life. My event sheet is: sprite / on collision with "green" / subtract 1 from "life". And also I have a global variable "life: 3" assigned to a text box represented on the screen but what I say, no life is discounted ...
In the behaviors you can set any sprite to be destroyed off the layout.Then you don't need your boundaries.
You can also do that in an event by checking if a sprite is outside the layout and destroying it.
You need to set your life text to the variable you use for life without quotation marks to see the lives number.