Jump to content

  • Log In with Google      Sign In   
  • Create Account

Preferred Mapping Mode


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 SleepySamurai   Members   -  Reputation: 125

Like
0Likes
Like

Posted 10 December 2013 - 12:28 PM

I'm wondering if anyone can comment on what I should set my Mapping Mode to in regards to game programming.

Is it better to have the origin on the top left, or bottom left?

While the mathematics seem to be more intuitive from the bottom left, I imagine there's a reason the default is top left.

 

Can anyone tell me if there's an (unofficial) standard for Mapping Modes when it comes to game programming?



Sponsor:

#2 Monkan   Members   -  Reputation: 595

Like
0Likes
Like

Posted 10 December 2013 - 04:32 PM

I don't know the term Mapping Mode but if you just mean where the origin is then I would go for in the centre for my world and bottom left for my UI as I find it a bit easier to lay out. It's all down to your own preference though. I presume people started using the top right as the origin because that is where pixels were drawn from on monitors.


"To know the road ahead, ask those coming back."

#3 mark ds   Members   -  Reputation: 1267

Like
1Likes
Like

Posted 10 December 2013 - 05:05 PM

Bear in mind that your mouse coordinates are given relative to the top left, I *personally* think it's easier to use that for GUI's - especially if you have 'hit boxes' to detect if the mouse is in a control etc. Also, many image formats have a top left origin for their pixels which makes 2D mapping quite simple.

 

For the game proper (I'm assuming you're talking 2D here) it really doesn't matter. Use whatever you're most comfortable with.



#4 Hodgman   Moderators   -  Reputation: 30386

Like
0Likes
Like

Posted 10 December 2013 - 06:38 PM

There's no standard.

 

Sometimes even the middle of the screen is the origin!



#5 Icebone1000   Members   -  Reputation: 1086

Like
0Likes
Like

Posted 11 December 2013 - 01:16 PM

I prefer in the middle. No need to set positions for centralized stuff, backgrounds dont need position adjustment, on my experience its way more intuitive.



#6 SleepySamurai   Members   -  Reputation: 125

Like
0Likes
Like

Posted 11 December 2013 - 01:21 PM

Thanks for the replies everyone.

I think I'll put the time into learning how to use origins if so many people find it convenient.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS