Questions tagged [aspect-ratio]

The ratio of the dimensions of a screen resolution. Always listed as the longer dimension first.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

Fit entire screeen whn Aspect Ratio Change Unity

i'll try to explain what i have... my "field" camera with this script (used to keep the aspetct) using UnityEngine; [RequireComponent(typeof(Camera))] ...
0
votes
1answer
20 views

Game view and mobile screen have the same aspect ratio but the game doesn't look the same in the two windows (Unity)

This is my first time paying attention to UI layout. I'm trying to make a mobile game using a Motorola G7 Power as my developing device. According to Motorola's website, the G7 Power has an aspect ...
1
vote
1answer
26 views

The rightmost part of the game screen is truncated in HTML

I created a game that, when I play it in Unity, looks like this: But when I build it in WebGL, the rightmost part of the screen (with the red player character in it) is truncated: Play it in-browser ...
0
votes
0answers
23 views

Clamping after forcing aspect ratio

I'm using the following script to force aspect ratio of 16:9: https://forum.unity.com/threads/force-camera-aspect-ratio-16-9-in-viewport.385541/ It works perfectly. However now my game objects are ...
0
votes
0answers
39 views

Maintain UI position with Aspect Ratio Fitter and anchor preset is set to stretch

So i have a text UI using Aspect Ratio Fitter with Aspect Mode Height Control Width and i set anchor preset to stretch upward . To make it easier to understand , i want my text to stretch upward ...
1
vote
1answer
25 views

Unity difficulty placing text within the reference resolution of the canvas

I have a TextMeshPro GameObject, which I placed within the Canvas. The canvas is set to Scale with Screen Size and has a reference resolution of 1440x1080. The ...
0
votes
0answers
40 views

libgdx images go out of proportion on some devices

I'm trying to develop a simple game using libgdx. The game works perfectly on emulator ( Nexus 5x API 26 x86 ). But when I generated its apk and tested on my phone(Samsung J7), the images somehow seem ...
0
votes
0answers
9 views

World coordinates on vertical grid game for different aspect ratios (Unity) [duplicate]

new to game development and unity so hopefully someone can help. I want to make a 2D portrait mobile game that will have a grid of constant size where units can move on in Unity. This should support ...
0
votes
0answers
129 views

How to adapt my mobile game for different aspect ratios?

Before I start, I'd like to note that I work in the Unity Engine, but the basic theoretical stuff should be similar just about anywhere. It's not really hard to get the game's camera/World view or UI ...
0
votes
0answers
73 views

Unity game layout problem for high-aspect Android screens

I'm trying to port over a card game I wrote some years ago into Unity (2D, Orthographic). The game objects are placed correctly when I build and run in Windows, Linux, and Mac, for all the different ...
0
votes
1answer
100 views

Handling different aspect ratios on a 2D dodging game

I've been making a game where the player is on the ground and has to dodge objects falling to the ground. Since I'm using libGDX (But the question still applies to any other language/framework), The ...
1
vote
0answers
338 views

The most popular Resolutions and Aspect Ratios in Android OS 2019

I develop the game with Libgdx framework. When I tried to deal with support multiple screen resolutions it turns out that Libgdx is not following Android approach how to deal with Screen sizes and ...
2
votes
1answer
247 views

Creating a letterbox screen for Android devices

I want that the screen looks the same on every Android device without distorting the sprites. One player should not see more of the map than another player just because they have a bigger screen or ...
1
vote
1answer
607 views

Unity, understading Layout element - Min size and preferible size

I have been some time working with unity, and I am trying to get a better understand of the UI system. I am a mobile developer and I am redesigning the UI but I am unable to achieve what I want. My ...
2
votes
2answers
1k views

Objects' coordinates and scale adjustment according to different devices resolution and aspect ration in Unity

E.g I have a bunch of objects which are generated in specific coordinates. Let's say in a range of - 5 to + 5 on X axis. I came app with these numbers because of camera size I have in Unity editor. ...
1
vote
1answer
415 views

3D camera - window resolution relation

I'm having a bit of an issue when it comes to 3D- and 2D camera(s), in relation to a game's window resolution. I want to let the player choose from different window resolutions, either from a menu or ...
4
votes
1answer
5k views

How can I get Unity to do letterbox/pillarbox to maintain aspect ratio?

I'd like my game to have the same aspect ratio at all cost, including keeping all UI elements fixed in the same place. I'm totally ok with losing screen space in the interest of fixing the aspect ...
0
votes
1answer
86 views

Scale VBO magnitudes based on aspect ratio

On my screen I have drawn a box. When I adjust my screen size (to a non 1:1 aspect ratio) I get a rectangle. This is obviously something wrong with my projection matrix. I am attempting to keep ...
0
votes
1answer
55 views

Quality deterioration on a device

I am using Unity. When I try the game out in the IDE everything looks pretty good: But when I am trying to play the same game on a device the quality becomes a great deal worse and you can see it for ...
3
votes
2answers
16k views

How to force keep the aspect ratio and specific resolution without stretching the output screen view?

I'm using Screen.SetResolution() But when I run in Android device, it shows the output image is stretched to fill up the full screen which I don't want. I want it to keep the aspect ratio properly. ...
1
vote
0answers
2k views

Best base resolution for a pixelart project for bigger audience [closed]

I've been working on Top-down 2D pixel art project for quite some time. When I first started my project, I actually set application surface, display and game window to match 1:1 - with that said, the ...
2
votes
1answer
271 views

Make virtual joystick preserve aspect ratio Android in Unity

When I start my game on Android my virtual joysticks stops being round. Here you can see it: Here is the project on PC at the same time: Here are my UI settings for the Joystick: Please, help me ...
1
vote
1answer
735 views

Unity - how to switch between ratios in a Scene View?

I'm complately new to Unity, but I know what's going on, I've made some games with LibGDX earlier. In GDX, to handle all ...
0
votes
1answer
180 views

Unity2D - Horizontal Scaling to Support Various Aspect Ratios?

I am trying to work out how to support various resolutions for my Android game. I have come up with a solution, but do not know how to implement it. Automatically, I am told that Unity vertically ...
1
vote
1answer
1k views

How to create and choose sprite sheet for different mobile screen resolution in Unity

Background We’re working on a 2D mobile game. We want to publish the game on all apple devices which at least support iOS 7 and to all android devices which at least support Android 4 OS. These ...
1
vote
2answers
338 views

If I want to create game for mobile and tablet on android and ios, which aspect ratio or screen resolution should I use?

Now my game is currently use 3:4 aspect ratio ,which is 480*640 , so my game has the letterbox (I don't like stretch) on my android mobile and my friend mobile. I don't like letterbox, so I have just ...
1
vote
0answers
33 views

What will happen at a different aspect ratio and what is the most efficient and easy way of dealing it? [duplicate]

Let's say I have built a game for Android at the size of 480x854. If I test this on my device that has this resolution I suppose it will work and look property. But at a different aspect ratio will ...
0
votes
5answers
711 views

How do you create images that work for multiple resolutions?

I'm currently doing some game development and I've been curious about this situation for many years. Let's say your game has two resolutions: 640x480 and 800x600 (using small numbers just for ...
0
votes
1answer
200 views

Displaying whole screen image on multiple devices without stretching

In my(Android) game, all of my sprites are scaled against to a particular ratio (this 'guide' ratio stays the same regardless of the actual ratio of the screen on which they are to be displayed) - ...
1
vote
1answer
496 views

Error in projecting coordinates from FitViewport to screen in LibGDX

i'm using a FitViewport to render my "game world". Viewport virtual dimensions are fixed 400x240. I use viewport.unproject method to scale input touches from screen ...
0
votes
3answers
737 views

Adjust bitmaps according to screen ratios on android

I always thought that pixels were square... it turns out i'm wrong, and I am quite worried by this. This means that if I draw a circle, it will be round on my screen but it could be an ellipse on ...
15
votes
1answer
14k views

How can I prevent the viewport from stretching/distorting?

Basically, I want to know how I can remove distortion or stretching of the rendered image when the viewport/window size changes. The following images exemplify the distortion/stretching I'm talking ...
69
votes
13answers
83k views

How do you handle aspect ratio differences with Unity 2D?

I've gotten a lot of answers to this question, but they are all generic and generally not very useful. None of the tutorials talk about aspect ratio and dealing with mobile devices and there are a ...
10
votes
2answers
15k views

Problem to match font size to the screen resolution in libgdx

I'm having problems to show text on my game at same size on different screens, and I did a simple test. This test consists to show a text fitting at the screen, I want the text has the same size ...
0
votes
0answers
749 views

Scaling issues with Open GL viewport / scissor box (Trying to draw outside of viewport)

In my game I am currently scaling the viewport so it retains the ratio of my development device like so: ...
10
votes
3answers
18k views

Confusion over GLViewport

I'm hoping someone can help me understand the GLViewport and what happens when we resize it This will illustrate my confusion.... So, here I have a quad stuck in the middle of the screen. If I have ...
1
vote
2answers
1k views

Keeping ratio the same across devices on fixed screen game

My game is an Android game using OpenGL ES 2.0 (But this question could apply to any platform). I have read many questions on here regarding ratio management, and also read many tutorials outside of ...
12
votes
1answer
15k views

How to match font size with screen resolution?

So I'm working on a game using LibGDX, and I have a problem. To make my game fit most resolutions, I created a base asset for each aspect ratio, for example, a main menu background image, I made it ...
0
votes
1answer
82 views

Why doesn't my game start in landscape mode?

I want my game to run on all Android devices in LANDSCAPE_FIXED mode, but this mode works only for some screen resolutions. ...
2
votes
1answer
1k views

Aspect ratio in LibGdx

I'm learning LibGdx and I need some help with the camera. Let's see, I'm making a Chu Chu Rocket! clon to start. I've loaded a TiledMap (10x10), and I've created an OrthographicCamera to show the map....
0
votes
1answer
193 views

How can I support both multiple resolutions and multiple orientations in a game?

I am writing a mobile Android and iOS game. This game is similar to Doodle Jump, but without scrolling. In my game I display a background image that should cover the entire screen. On top of that I ...
0
votes
2answers
316 views

How do I make objects' speeds appear the same despite screen resolution?

I'm working on my HTML5 game with Intel XDK. I'm stuck on making all devices display the same number of frames per second. The first generation iPad has a screen resolution of 1024 pixels ...
2
votes
2answers
101 views

Would seam carving/liquid rescale make changing aspect ratios easier?

Seam carving is an algorithm which allows for resizing images without major distortions. I think it might help to make games which would adapt to different aspect ratios/resolutions much easier. But ...
-1
votes
1answer
362 views

Recommended aspect ratio for android / smartphones? [duplicate]

I'm making a game for android and would do it in 720p, but the phones got all different aspect ratios. Also thinking about a ios and windows phone port later. When the aspect ratio does not match, ...
0
votes
0answers
507 views

Handling 3D perspective for different aspect ratio

I have problem for supporting different aspect ratio in developing Mobile Game. I was developing on 2:3 screen which is iPhone 4 (Retina). When I use width and height for screen size and use fixed ...
2
votes
1answer
401 views

Repositioning and resizing when i change the size of my window

I am trying to write a game. When someone resizes the window of my game, I need all the graphics i have drawn on the screen to reposition correctly so that the ratio of the graphics' width and height ...
1
vote
1answer
175 views

How to handle scaled aspect ratio multiplayer player coordinates

I'm building a cross platform multiplayer game. I'm using pixel graphics and starting at a small 256x144 16:9 aspect ratio That ...
3
votes
2answers
478 views

Formula for converting ratio of current device to target device

I am designing my (Android/OpenGL ES 2.0) app on one device and want it to run all all other devices while keeping the screen ratio of the development device (so the image doesn't stretch / squash), ...
1
vote
1answer
1k views

Centering GLViewport position within physical screen

I'm developing my app on one device and want it to display at the same ratio on all other devices. Currently what I have is 'image 1' in my image below - the game fits perfectly onto my development ...
2
votes
2answers
1k views

Clipping a windows draw area - Direct x 9 and c++ - 2D using D3D

DirectX 9, C++... Let me set the scene: I have a 16:9 image. I have a 16:10 screen. I want the 16:9 image to be drawn so that it is vertically centred within my 16:10 screen. My 16:9 image is 1920 x ...