Tag Info

Hot answers tagged

15

I'm the developer of an extremely portable mobile game that runs on everything from PCs, to TVs, to even the Black & White Amazon Kindle (Smiles HD - http://smileshd.com - More devices and platforms than you see there). The best way I've found to support any device is to pick a base resolution, then scale up (or down) to the current screen. If you want ...


11

It depends, if your HUD is an integral part of the design you'd obviously want to scale it up (or rather down - mipmapping and multiple versions of the same resource will somewhat alleviate the quality loss problem). If it's merely to get information to the user I'd try to steal as little screenspace as the HUD allows while at the same time ensuring maximum ...


9

A good place to start is the Steam Hardware Survey which includes a list of the most popular display resolution among Steam users. Wikipedia has a list of common resolutions in computer graphics. You can also look at some commercial games and see what resolutions they allow the user to select from. If you're going to support any resolution and just want a ...


8

You may want to check out this question, which is related although I don't think it's strictly a duplicate since it asks for more general information than you are. The limitations you are quoting seem reasonable to me. This would work for sprites (characters, objects), but what about maps? Are they built entirely from 8x8 tiles? The SNES had ...


8

I use a reference screen size, and scale everything according to it, while keeping the ratio of everything the same. private static float CalcRatio(Vector2 Sizes) { return Sizes.y/Sizes.x; } public static Vector2 CalculateNewPos(Vector2 RefPos, Vector2 RefScreenSize, Vector2 CurrentScreenSize) { return ...


7

In addition to the resolution and pallet limitations a lot of what made the NES experience different from modern gaming is the old CRT screens NES games were displayed on. So if you really want to capture that retro feel, I suggest using a shader that mimics the inaccuracies of these old displays. ...


7

What you have described is entirely adequate and appropriate to provide resolution independence. Anything you draw will indeed always take up the same proportion of your window. However, if you do nothing more than this, you will have aspect ratio problems. For example, given the numbers you wrote, if you draw a circle, it will be squashed — wider than it ...


6

I'm pretty sure on Direct X platforms at least, you're expected to query the platform for a list of available modes (using EnumAdapterModes on the device). That way the platform will already exclude any unavailable resolutions (because the GFX card or OS doesn't support it). You can further sub-filter those modes to exclude any you don't support (for ...


6

Be aware of density independence (basically resolution) as described here: http://developer.android.com/guide/practices/screens_support.html And as related to aspect ratio, pick your minimal target aspect ratio and design within it as sort of a safe frame. When confrontend with wider aspect ratio, show more of the game which is not critical to gameplay. I ...


6

To answer the original question, Angry birds uses regular raster graphics (not vectors). Just unpack the .apk (it's a zip file) and have a look at the textures yourself. Angry Birds only happens to prevent you from setting a zoom factor over 1.x, thus avoiding upscaling(magnification) of the textures. It probably also uses OpenGL mip-mapping to avoid ...


6

Depends on the game, if the game is single-player, let the user select a resolution, if they are happy for small characters, they can have it, if they want to feel connected with the game, they can use a lower resolution. Games like Civilization opt for this method. However, if you're building a multiplayer game, you're going to need a fixed resolution, ...


6

A quick snapshot of the information on current android devices can be found here: http://developer.android.com/about/dashboards/index.html The site is kept up to date every 14-days based on devices which access the Google Play Store so its a pretty decent source for information.


5

I would worry just as much about the hardware configuration as software. You don't have to run each TV at its native resolution, and screen size is different from resolution. I'll assume the 60" TVs are each 1920x1080 though, so native resolution across all of them is either 9600x2160 if you meant 5 rows x 2 columns of TVs, or 3840x5400 if you meant 5 ...


5

The displays are the same. Meaning that you'll have 1024x768 pixels on both models. So you can use the same assets on both devices. The iPad2 has a better CPU, GPU and more memory, so you can technically build more complex applications and load more resources into memory. You can compare the exact specs on Wikipedia.


5

First keep in mind that with rasterization there technically is no such thing as true resolution independence. With high enough magnification individual texels will start to become visible. The only solution to this is to write a vector graphics system. That being said there are a few steps to creating a robust raster based resolution independent system: ...


5

The standard way of doing that is to set up a transform matrix to do the conversion during rendering. For 3D rendering it's the view transform matrix for the camera that does it. Most 2D APIs have a way of specifying a view transform too, as either a 2x3 matrix or as a separate scale, translation and rotation. A quick look at the pygame documentation ...


5

Math First calculate your ideal screen ratio: 480 / 800 = 0.6 Then calculate the ratio of your users screen. If the ratio is larger than 0.6 you know your game will have space to the left and right side of the game area. You would scale the game area by the users screen height/800. To calculate the horizontal position of the game area you'd do: (screen ...


5

Usually, when you're making something that will be ported to different systems (whether a game for multiple consoles, or an app for various mobile devices), it's common to wrap your code so that anything that is specific to one system (rendering, event handling, etc) can be completely replaced without touching the code for the logic. SDL (and SFML) are ...


5

I believe what you're asking is how to get rid of letterboxing, like this: By default, AndEngine assumes you want some fixed aspect ratio. It then uses letterboxing to handle devices with different display aspect ratios then what you're providing. The advantage is you have certainty about your layout. There's more than one approach to get rid of ...


4

Use vector graphics. Vectors are not defined by points in space (i.e. individual pixels), they are defined by mathematical relationships, and easily adapt to smaller or larger views. It's impossible to display the exact same image on a 4:3 ratio screen and a 16:9 ratio screen, for example, without compressing or stretching the image. Thus you will have to ...


4

If you're making a PC game you may want to consider giving the player control over UI scaling themselves. For instance most MMOs allow the user to add a UI scale to make everything bigger. This is because the dpi of a PC's display can differ heavily from person to person. Some players like everything to be tiny, but many other players will be physically ...


4

From a high-level perspective there's only a handful of options, depending on which is more important, maintaining a consistent aspect ratio, or ensuring that no one to see more than someone else just because they have a wider or taller screen. Your options are: Cropping the parts that don't fit. Stretching the screen to fit, which has the issue you're ...


4

Edit: You're looking for the SpriteBatch.Draw(Texture2D, Rectangle, Color) call. The Rectangle represents the scaled draw target on the screen. I'm assuming here that you're not using a grid layout - wasn't specified in the question so I'll go with assets being able to be drawn at any pixel rather than on a set grid. First decide on what should be ...


4

You have to cast the GameContainer object, that is passed in the update method into AppGameContainer, then you can access setDisplayMode... I tested it right now, and it works. AppGameContainer gc = (AppGameContainer) container; gc.setDisplayMode(800, 600, false); But I think you need to use the dev branch of slick, as the "official" version from their ...


4

The most simple answer is what you've already found: draw everything internally to a RenderTarget with a fixed resolution and after that use the RenderTarget as a texture and draw it as large as possible. You should be able to fill the entire screen if the aspect ratio is the same. Simply use the Spritebatch.Draw overload that uses a destination rectangle. ...


4

As congusbongus wrote, you have listed most of the options. The usual solutions we use in games (sorry I'll be repeating you a lot): You can keep the gap. If you'll do that, you definitely should center the play area so the gap is the same on all sides. Otherwise it looks strange visually. Then you can.. Fill the gap with some solid tiles, or even some ...


3

You are looking for something along the lines of Resolution Independant Rendering. There is a similar question in that link, as well as a great article on the subject. The article and question is using XNA, but the concept is sound. Essentially, you have a "Real" resolution and a "Virtual" resolution. The Real resolution is the one you are working with ...


3

Unless you plan to target one machine with one predefined set of resolutions, i'd recommend making your game so that it works on any resolution. If your game has a high range of resolutions it should support (meaning: from very low to very high) in that case it makes sense to leave out things on lower resolution and also to use different graphics sets (e.g. ...


3

A problem you'll run into with Android is that every different device has its own screen size, resolution, and pixel density. If you want your game to look identical on all devices, you're in for a lot of work and will probably never be pleased with the results. Either the game will appear stretched on widescreen displays or compressed on non-widescreen ...



Only top voted, non community-wiki answers of a minimum length are eligible