Jump to content
  • Advertisement
Sign in to follow this  
SleepySamurai

Preferred Mapping Mode

This topic is 2142 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!