   OpenGL resolution problem
  HiI am running my game at a constant resolution of 1024x768. Now, this looks alright on screens with 4:3 aspect ratio, but on screens with 16:9 or even 16:10, it all looks extremely stretched horizontally.Is there any good way to fix this problem? I cannot alter the constant resolution, but I have been thinking of maybe setting OpenGL's viewport to 1024x1024 to make it squared. Would that be a good idea?   
Quote:I cannot alter the constant resolutionWhat do you mean by this?Do mean that the 'play area' has to have a resolution of 1024x768? If so, why are you locked to that resolution? (Are you going for pixel-perfect graphics?)   ;  It is a design choice because we have a small playing field with a limited size. There is no need for a bigger resolution.   ;  Well I think you only really have a few options:1) Horizontal Stretch2) Pillarbox (black bars on left and right)3) Zoom in and chop off the top and bottom (1024x576)4) Review your design constraint and work at multiple resolutions. I don't know what your game is like but I'd be annoyed if a game only used 1/3 of my screen's native resolution. Perhaps theres some way you can adapt to make it scalable?   ;Quote:It is a design choice because we have a small playing field with a limited size. There is no need for a bigger resolution.Hm, that doesn't make much sense to me (but perhaps I'm just not understanding what you mean).If someone has their monitor set to 1024x768, your game will take up the whole screen. If their resolution is set to double that though (just as an example), your game will only take up a quarter of the screen - in other words, the playing field will get smaller as the resolution increases.Shouldn't the apparent size of the playing field be independent of resolution? That is, shouldn't it take up some fixed percentage of the screen, rather than some fixed number of pixels?Unless you're going for pixel-perfect sprite-based graphics, I'm not sure why you'd want to fix the resolution at 1024x768...   ;  Please, do not question our design. I am not looking for answers on that, I am looking for answers on how to make it look less stretched horizontally.And no, it is still fullscreen, so it takes up all of the screen. It is just that it stretches everything to fit. But on a 4:3 screen running at high resolutions, it looks just fine, but on my 16:10 screen, it is stretched too much horizontally.   ;Quote:Please, do not question our design.Ok :-Quote:And no, it is still fullscreen, so it takes up all of the screen. It is just that it stretches everything to fit.Oh. In that case, it sounds like you're *not* using a fixed resolution (in which case my previous points are irrelevant anyway).Quote:But on a 4:3 screen running at high resolutions, it looks just fine, but on my 16:10 screen, it is stretched too much horizontally.See karwosts's post, more or less. Maybe there are other options, but if you want to avoid stretching, and if the aspect ratio is > 4:3, pillarboxing is probably your best bet. (If you don't want pure black pillarboxes, depending on the nature of the game, you might be able to put some sort of non-essential graphical element in their place. For example, for a top-down soccer game, you could have an audience at the periphery, and just show more of the audience for aspect ratios greater than 4:3.)   ;  I suggest you go read some documentation, glViewport etc.If you try to run 1024x768 on a widescreen monitor, most monitors will stretch it. It's that simple. You will have to alter the resolution, but the actual rendered area should be aspect ratio correct. Unless you want to tell everyone to alter their monitor settings to not stretch the image (many cheap monitors won't even let you do this).Bad design should always be questioned. Running a game at a steady 1024x768 _is bad design_. This is incredibly annoying on LCD monitors as it looks utter shit when stretched/scaled. Also, this is a discussion forum, people are free to question what they want. (Edit:) As long as it complies with the rules of said forum.   ;Quote:Bad design should always be questioned. Running a game at a steady 1024x768 _is bad design_.Agreed. For what it's worth though, I think maybe what the OP means is that the *simulation* takes place on a playing field with dimensions 1024x768, not that the game runs at a fixed resolution of 1024x768. (I initially interpreted the OP's statements as meaning the latter rather than the former, hence my 'questioning of the design'.)   