I’m designing a game with multiple levels with a variety of obstacle elements displayed across the screen from level to level. How do I avoid hard coding the coordinates of the obstacle elements such that the game looks consistent across an array of device resolutions?
Well your designing your app in corona so Auto Sizing of an app and images are taken care of for you. You just need to include the proper Images and sizes and naming conventions @2.png @4.png etc…
But if i were trying to do what your talking about you could use a json or lua table to store the image name /size / screen size / and positions based on screen size in a file. Read the file and process it based on Screen size.
Some things may need to be calculated but what I have laid out here is your best bet.
Good Luck Larry
Well your designing your app in corona so Auto Sizing of an app and images are taken care of for you. You just need to include the proper Images and sizes and naming conventions @2.png @4.png etc…
But if i were trying to do what your talking about you could use a json or lua table to store the image name /size / screen size / and positions based on screen size in a file. Read the file and process it based on Screen size.
Some things may need to be calculated but what I have laid out here is your best bet.
Good Luck Larry