Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (781)
Games in Android Showcase (233)
games submitted by our members
Games in WIP (857)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  What is resolution option in settings?  (Read 355 times)
0 Members and 1 Guest are viewing this topic.
Offline SugarBlood

Senior Devvie


Medals: 7
Projects: 4



« Posted 2019-01-31 17:56:16 »

What is resolution option in settings? As I can understand it's not just scaling, if it affects performance that much. Some persecutioncomplex how i can't find something about it on the Internet, just found this here - http://www.java-gaming.org/topics/how-does-resolution-work/33523/view.html Would be great if there some article about it, especially LibGDX.
Offline VaTTeRGeR
« Reply #1 - Posted 2019-01-31 19:36:16 »

Resolution refers to the number of pixels that an image consists of, nothing more. If you use a higher resolution the graphics card has to do more work in the fragment shader stage, thus reducing performance.


In LibGDX the relation between pixels (resolution) and world units is handled by the Viewport: https://github.com/libgdx/libgdx/wiki/Viewports
(The Camera ONLY defines the resolution, not how the world is mapped to the resolution of your game)

It's confusing at first, but very simple once you understand what it's all about: You're defining how units in your game, for example meters or inches, translate to pixels on your screen.
The end goal of this could be being able to define the sprite "player" as 1.80m high and 0.40m wide instead of defining the sprite size as 21x93 pixels or so.

This enables you to calculate physics with real units like meters, kilograms, inches, etc. and automatically translate this to the right amount of pixels on your screen.


You do not have to use real units though, you could also make one pixel map to one world unit so that you can express sprite sizes and movement in pixels, which could maybe be useful in 8bit-retro-pixel-esque games.

Here's another good explanation: https://gamedev.stackexchange.com/questions/120722/screensize-vs-worldsize
Offline SugarBlood

Senior Devvie


Medals: 7
Projects: 4



« Reply #2 - Posted 2019-02-01 07:27:33 »

Very comprehensive, thank you very much. Feels like I want to try some experiments now. Cranky
This information shows where to focus.  Cheesy
Pages: [1]
  ignore  |  Print  
 
 

 
hadezbladez (1177 views)
2018-11-16 13:46:03

hadezbladez (531 views)
2018-11-16 13:41:33

hadezbladez (1190 views)
2018-11-16 13:35:35

hadezbladez (274 views)
2018-11-16 13:32:03

EgonOlsen (2571 views)
2018-06-10 19:43:48

EgonOlsen (2790 views)
2018-06-10 19:43:44

EgonOlsen (1566 views)
2018-06-10 19:43:20

DesertCoockie (2271 views)
2018-05-13 18:23:11

nelsongames (2123 views)
2018-04-24 18:15:36

nelsongames (2817 views)
2018-04-24 18:14:32
Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!