Skip to main content
Share Your Experience: Take the 2024 Developer Survey
11 votes
Accepted

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

For desktop games you can control the supported aspect ratios directly in Edit -> Project Settings -> Player -> Resolution and Presentation But for ...
DMGregory's user avatar
  • 135k
10 votes
Accepted

Start debug window on other monitor than the Godot editor

Look in the "Editor" menu, option "Editor Settings...", then Run > Window Placement > Screen.
jzq's user avatar
  • 116
8 votes

Why is OpenGL point (0,0) not in top-left corner of the screen?

Probably because that's how coordinate systems are traditionally set up when doing math. But to be honest, OpenGL can have its origin anywhere you want and its axes can point in any direction you want ...
user1118321's user avatar
  • 2,632
6 votes
Accepted

Screen split in different regions, each with a different scene

This is easy to achieve with viewports. Inside the Inspector settings on the Camera component, you'll find a section labelled "Viewport Rect" that defines the rectangle on screen that this ...
DMGregory's user avatar
  • 135k
6 votes

Why is OpenGL point (0,0) not in top-left corner of the screen?

Think back to the graphs you would draw in school. The (0,0) point is at bottom-left. Now, OpenGL is an old, old API and it's derived from an even older one. There were no gaming graphics then; 3D ...
Maximus Minimus's user avatar
4 votes
Accepted

The proper name for a state, view, screen, etc

What is the proper name for when you change views or screens? I have always called this a view / screen transition. This seems to be an accepted term across a variety of contexts, ranging from game ...
Gnemlock's user avatar
  • 5,263
4 votes
Accepted

LibGDX Stage and Viewport management for Actors?

I had take your code and change it a little bit. I hope this will solve your problem otherwise I do not know what exactly your problem is. I will recommend you to not use ...
Morchul's user avatar
  • 317
3 votes
Accepted

Does Screen.orientation not work in simulator?

This is not a problem with Screen.orientation - you just have a bug in your code. This if condition: ...
DMGregory's user avatar
  • 135k
3 votes
Accepted

How screen scaling works in Unity?

By default, Unity scales the camera view of your 3D world to fit the height of the window. That simple rule is the only thing happening in both of your examples: When you've fixed the aspect ratio of ...
DMGregory's user avatar
  • 135k
3 votes

How to make sure my UI remains the same across multiple screens?

There are a few concepts to address if you want to get the entire UI working smoothly. Black borders - The size of the screen ("game") in Godot is simply the size, in "units", of ...
Tanaki's user avatar
  • 252
3 votes
Accepted

Unity Screen.height / Screen.dpi is *not* equal to the screens height in real life

See here and here. The gist is that on Android devices specifically, the values returned from Screen.dpi are often off because Android doesn't have the same info available (or in the presumed format) ...
hatinacat2000's user avatar
3 votes
Accepted

LibGDX - FPS drops

You should avoid invoking new instances in your render and update methods. As these methods are called numerous times per second, this can be a pretty straining task, as the unreferenced instances ...
7z.'s user avatar
  • 101
3 votes

In platformer video games, what is the term for the size of the character on the screen?

While I agree that there's no consensus to define a character's size relative to the screen with a specific word, you can always relate two homogeneous quantities by defining a ratio between them. Now ...
liggiorgio's user avatar
  • 4,831
3 votes

How would I mask the player node out of a canvas shader?

You will setup a SubViewport (you would not need a container for it, since - I presume - it would not be shown), make sure its render mode and its clear mode are ...
Theraot's user avatar
  • 27k
2 votes

How to split a screen in half using LibGDX without scaling?

I would suggest having a look at this page and using a viewport to manage both cameras. Since you don't want scaling a ScreenViewport would be the way to go. https://github.com/libgdx/libgdx/wiki/...
Fooble's user avatar
  • 320
2 votes

Different Screen Sizes and Camera in Unity

When making games, I typically support resolutions between 5:4 to 16:9. The best way I found to ensure maximum object coverage on the screen is to optimize for 3:2 and then adjust the camera's view ...
Liam Lime's user avatar
  • 728
2 votes

The proper name for a state, view, screen, etc

'view' is typically related to what is seen by a camera. 'screen' is generally what's in your top level game state, e.g. main game screen, option screen, title screen, main menu screen. 'screen ...
Vaillancourt's user avatar
  • 16.3k
2 votes

Why is OpenGL point (0,0) not in top-left corner of the screen?

Perspective division performed on the Clip Coordinates produces Normalized Device Coordinates, ranging from -1 to 1 in all three axes. https://www.opengl.org/archives/resources/faq/technical/...
SpinyOwl's user avatar
  • 144
2 votes
Accepted

Last hole artifact in screen space refection with Hierarchical Z

After some refinements I have found the solution (see picture). The vertical holes were due to the line "return ColorOut" just after the refinemax loop. This line must be removed to let the ...
philB's user avatar
  • 139
2 votes
Accepted

What is surface locking and unlocking in Pygame?

Surface locking allows you to directly access the pixel data of accelerated surfaces. It's not so much about improving performance. Rather, an accelerated surface already has performance improvements, ...
Pikalek's user avatar
  • 12.4k
1 vote

How to dim the device backlight using libGDX?

You can do this by setting LayoutParams on your Android Window where you specifiy ...
bornander's user avatar
  • 4,491
1 vote

Box2d: High screen resolution / frequency causes high friction?

The problem is with high freequency 120Hz Solution is to set fixed deltaTime for update physics world instead of using graphic update time ...
David Tran's user avatar
1 vote
Accepted

Get all supported resolutions for a monitor

I've been receiving complaints from users that my game doesn't support the 16:10 aspect ratio. You should get a more specific description of the problem. It could be that the game allows the player ...
Theraot's user avatar
  • 27k
1 vote
Accepted

Unity difficulty placing text within the reference resolution of the canvas

Ah, the joy of creating resolution-responsive screen layouts in Unity. If I understand you correctly, your goal is to create an UI which always preserves its aspect ratio, but also fills as much of ...
Philipp's user avatar
  • 120k
1 vote

Not getting proper height in unity when android device has notch or navigation bar on screen

Screen.height returns the amount of pixels on the screen that are available to your app. In older versions of android the navigation bar would always remain static ...
Tom Tsagkatos's user avatar
1 vote
Accepted

Unity / How to access my screen pixels outside of unity?

Allright, so ive found this here: https://github.com/hecomi/uDesktopDuplication With that you can read pixels while running unity on background. :-) Just wanted to share this.
OC_RaizW's user avatar
  • 1,450
1 vote

Screen Capture rendered on a RenderTexture in Unity

I found one possible solution, but I haven't had time to try it. I will make a separate program that captures screenshots at around 30 FPS using DirectX (SharpDX) and these frames will be pumped into ...
Lázár Zsolt's user avatar
1 vote
Accepted

How to make the main menu screen fade out when the game starts in libGDX?

Using fadeOut is the way to go. You just need to make sure that everything that you want to fade out is part of your Stage. You ...
Charanor's user avatar
  • 7,870
1 vote
Accepted

Controlling screen and window size in Unity

Regarding the size your game is displayed in the editor window- have you customized the settings in the game preview window? If the game window of your editor is set to 'free aspect' or a resolution ...
David Greaves's user avatar

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