Skip to main content
Known Participant
December 9, 2013
Question

How to change enemy size, speed, etc depending on mobile screen size?

  • December 9, 2013
  • 1 reply
  • 599 views

I have a game where enemies are spawned from a library at random. Their size and speed are set to work on specific dimensions. However, these specific standards won't work well on phones with small screens. Is there a way to change speed, size depending on a phone's dimensions?

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
December 9, 2013

sure.  you can assign those parameters based on the capabilities class screenResolutionX etc.

razer65Author
Known Participant
December 11, 2013

Could you please explain more about these capabilities?

kglad
Community Expert
Community Expert
December 11, 2013

there's nothing to explain.  again, you can use:

if(Capabilities.screenResolutionX<whatever && Capabilitites.screenResolutionY<whateverelse){

// do whatever to deal with this screen size

} else if( etc ){

} etc