• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
OmarShehata

Handling multiple resolutions?

7 posts in this topic

This is more of a general question, but I thought I'd point out that I'm using Lua.

My question is what's the best way to handle multiple resolutions while keeping my aspect ratio?

I used to think that by keeping the window sizes at 16:9 (my game's aspect ratio) , and going into fullscreen that the game would just add black borders without stretching and everything would be fine. This doesn't seem to be the case however as I'm getting mostly erratic behavior with that.

I did manage to get it working perfectly when setting the window size to the screen size before going into full screen. And while that works and keeps the aspect ratio, I feel that defeats some of the purpose of setting resolutions.

Don't older games have it so that, you could set to a lower resolution in the same aspect ratio, and you'd still see the same amount of stuff in the same screen area but since you made the graphics at a lower resolution they would be blurred but it would in turn be better for performance?

Is this worth pursuing or do most modern games now just set the window to the monitor size before going into full screen? That mean we'd only support one resolution in full screen, and that'd be whatever resolution your monitor is at, and add black borders where there is no game.

Any info/tips would be greatly appreciated! Thanks! Edited by OmarShehata
0

Share this post


Link to post
Share on other sites
Unless there is a specific reason, I wouldn't force an aspect ration - there are people using 16:10 native resolutions, and even older 4:3 CRTs, that would prefer to use all the pixels at their disposal.

However, the resolutions available are a function of what's supported by the monitor. Functions that are useful include EnumDisplayDevices, EnumDisplaySettings, and ChangeDisplaySettings/ChangeDisplaySettingsEx.
1

Share this post


Link to post
Share on other sites
[quote name='mark ds' timestamp='1340014506' post='4950195']
Unless there is a specific reason, I wouldn't force an aspect ration - there are people using 16:10 native resolutions, and even older 4:3 CRTs, that would prefer to use all the pixels at their disposal.

[/quote]

I can't support more than 1 aspect ratio because then the graphics would be stretched in some way or another and that would look horrible. I'm trying to make it exactly like how when you watch a movie in full screen, there's always black bars on the top and bottom.
0

Share this post


Link to post
Share on other sites
[quote name='OmarShehata' timestamp='1340023325' post='4950224']
I can't support more than 1 aspect ratio because then the graphics would be stretched in some way or another and that would look horrible
[/quote]
You should, it is quite easy. You just need to separate the gui (more fix) from the game. When it is a 3d game, you just need to the the ratio according to your game resolution, if you have a 2d game, just display more. Problems occurred only if you have fix background images (i.e. an adventure game), in this case I would choose a minimum aspect ration and fill the rest with either placeholder art or with a larger background image.
When it comes to gui, try to use dockable gui elements, that is, instead of setting the healthbar at an absolute position, use a system like this: 3 pixels from the bottom and 5 pixel from the left, this way it is screen independent.

Here are two comparision shots, one at 1280x720(16:9) and one at 1680x1050(16:10), the 3d world is adjusted, the gui elements are fix (no scaling):
[img]http://www.gnoblins.net/wp-content/gallery/screenshots_alpha_1/screenshot_05_2012_01.jpg[/img]

[img]http://www.gnoblins.net/wp-content/gallery/screenshots_alpha_1/screenshot_04_2012_09.jpg[/img]
2

Share this post


Link to post
Share on other sites
I can see where he's coming from with the whole aspect ratio thing though, for some kind of games having a different aspect ratio can be considered an advantage/disadvantage because the player can see more/less. If this gets really serious then forcing the aspect ratio (and adding padding as needed) could be considered a good idea.

And regarding the first post: yes, supporting multiple resolutions is always good. First because on weaker systems the user may want to reduce the resolution, and then because some users hate having to use any resolution that isn't the native one of the monitor because the stretching can make everything look horrible. Some people can tolerate that, some can't.

Also, if you do support multiple aspect ratios, don't get limited to 4:3, 16:10 and 16:9, make the game support [i]any[/i] ratio it stumbles with, because you never know what you may end up with. 1280×1024 comes to mind, which has a ratio of 5:4 (even more square than 4:3!).
1

Share this post


Link to post
Share on other sites
[quote name='Sik_the_hedgehog' timestamp='1340119218' post='4950599']
I can see where he's coming from with the whole aspect ratio thing though, for some kind of games having a different aspect ratio can be considered an advantage/disadvantage because the player can see more/less. If this gets really serious then forcing the aspect ratio (and adding padding as needed) could be considered a good idea.
[/quote]

Yeah, that's what I was thinking of.

Interesting post Ashaman! It's a 2D game by the way.

I guess the only reason I was having doubts is that, no matter what language I used, the only resolution on which fullscreen worked perfectly was the monitor's native resolution, which makes sense.

I think it's cleared up now but if anyone wants to post any more info, feel free to do so!
0

Share this post


Link to post
Share on other sites
[quote name='OmarShehata' timestamp='1340125345' post='4950634']I think it's cleared up now but if anyone wants to post any more info, feel free to do so![/quote]
Well, if it's feasible, instead of using black borders you could use extra artwork (probably designed to tile or to blend against a single color or something) so it looks nicer. But that's really just a matter of polishing, and if you already have code for adding black borders then it shouldn't be too hard to add that. The artwork would have to change depending on what's going on at the moment though (e.g. in-game, menu, etc.).

Not really something critical, I would consider it low priority.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0