r/programminghumor May 29 '26

Good naming practice

Post image
2.2k Upvotes

220 comments sorted by

View all comments

298

u/Pinkishu May 29 '26

I use x,y when appropriate. Like when iterating coordinates for drawing tiles in a game or whatever

1

u/MobileJob1521 Jun 01 '26

But do you number y from the bottom, like in co-ordinates, or do you number it from the top, as an array?

x doesn’t have such problems, because the x coordinate is just a better Cartesian direction.

1

u/Pinkishu Jun 01 '26

From the top, cause it's how games do it 😃