Jump to content

  • Log In with Google      Sign In   
  • Create Account


Screen size conundrum


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
1 reply to this topic

#1 DarkRonin   Members   -  Reputation: 604

Like
0Likes
Like

Posted 09 August 2012 - 03:27 AM

Hi guys,

I am currently writing a simple 2D plaformer with sprites in DirectX9.

At the moment I have the sprites positioned in 'screen space'. So, there is an obvious problem of having the render window look the same on different screen resolution. My dev rig is displaying at 1600 x 900 so I have been working around that at the moment.

So, when I run the app from a TV screen the sprites appear smaller than my dev rig (as expected).

I thought of using a normal 3D camera system and set the FOV and position the camera a fixed distance from the scene. But, I dont want the 'warping' of the sprites that the 3D perspective will be (i.e. a perfect square will be rectangular from the edge of the scene).

I then looked into the Ortho camera system, but it seems to require window sizes in pixels. So, I think that uning ortho will give me the same issue I allready have.

Any idea how I might tackle this issue? So, I am after standard size sprites that are sized relative to screen size.

Thanks in advance!

Sponsor:

#2 Seabolt   Members   -  Reputation: 633

Like
0Likes
Like

Posted 09 August 2012 - 10:00 AM

I would still use an orthographic camera to show your sprites, but figure out a target resolution you'd like to display at. Use that as your dimensions, and then you can scale the sprites by the difference between the target resolution and the physical resolution.
Perception is when one imagination clashes with another




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