Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Hard Coding Value of Sprite's Position  (Read 2147 times)

0 Members and 1 Guest are viewing this topic.

Sparcsky

  • Newbie
  • *
  • Posts: 9
    • View Profile
Hard Coding Value of Sprite's Position
« on: June 21, 2017, 05:46:11 am »
If I hard code the value of Sprite's position, will the sprite's position change if the program is used in a different device?

I wonder if stays the same or the program will stretch the sprite depending on the size of the device.  Mostly in my code, I position all my sprite with absolute value. Is it okay to hard code the value of sprite position?
 

smilesprower

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • Email
Re: Hard Coding Value of Sprite's Position
« Reply #1 on: July 08, 2017, 02:01:22 pm »
If the sprites position and size are based on percentages of the screen size, they will be scaled/stretched accordingly on different devices.

Just be careful if the devices have different aspect ratios. 4:3 / 16:9 etc
This can cause a circle to turn into an oval.


 

anything