For any feature requests to either the Skyline Engine or the websites and forums please leave your suggestion here.

Need screen resolutions available

Need screen resolutions available

Postby SpiderMack » 03 Dec 2016, 11:59

You need all screen resolutions to adjust game resolution in game menu later, need function to switch resolution.
Screen Class need it.
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Need screen resolutions available

Postby epsilonion » 03 Dec 2016, 12:21

The function to get all possible resolutions is

posRender = render.getPossibleResolutions();


to set the resolution:
render.setResolution(resolution);

http://www.chi-ad.com/Skyline/API/Lua/html/classrender.html#ae922916c0c1add8afa62ad22fec2b585

hope this helps..
User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Need screen resolutions available

Postby SolarPortal » 03 Dec 2016, 12:39

yes, the lua api epsilonion posted is the correct library to use for adjusting game settings.

If you go into the installation and look at the Data/Scripts folder, you will find SceneScript_GUI.lua which contains the code to edit the render settings and is what is shown when pressing F1 in the player or end game on Gen1. Gen2 player and end game are yet to come. :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Need screen resolutions available

Postby SpiderMack » 03 Dec 2016, 13:38

Thank you :)
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Need screen resolutions available

Postby Shando » 01 Oct 2017, 00:06

Hi All,

I know this is an oldish topic, but it does have the *extremely* useful comment from SP:

If you go into the installation and look at the Data/Scripts folder, you will find SceneScript_GUI.lua which contains the code to edit the render settings


and my comment is regarding the resolutions obtained following the code in that file :)

When I print out the table of Resolutions (using resolutions = render.getPossibleResolutions ( ) ) I get this:

Code: Select all
table: 3039D258 {
  [16] => "800 x 600"
  [15] => "640 x 480"
  [14] => "1920 x 1080"
  [13] => "1680 x 1050"
  [12] => "1600 x 900"
  [08] => "1360 x 768"
  [09] => "1366 x 768"
  [11] => "1440 x 900"
  [10] => "1400 x 1050"
  [07] => "1280 x 960"
  [06] => "1280 x 800"
  [05] => "1280 x 768"
  [04] => "1280 x 720"
  [02] => "1280 x 1024"
  [03] => "1280 x 600"
  [00] => "1024 x 768"
  [01] => "1152 x 864"
}


The Resolutions themselves look fine, but the order is not the most intuitive. Even if re-ordered by the Key, they are still out of order:

Code: Select all
1024 x 768
1152 x 864
1280 x 1024
1280 x 600
1280 x 720
1280 x 768
1280 x 800
1280 x 960
1360 x 768
1366 x 768
1400 x 1050
1440 x 900
1600 x 900
1680 x 1050
1920 x 1080
640 x 480
800 x 600


As you can see, the lowest possible resolutions appear AFTER the highest possible.

This is really just an FYI in case you want to re-order them before the big launch ;) just to stop any possible complaints later.

Shando
Ryzen 7 4800H 16GB GTX1650 Win 11 64
Love, Hope, Strength http://www.lovehopestrength.co.uk
User avatar
Shando
Skyline Moderator
Skyline Moderator
 
Posts: 560
Joined: 06 Mar 2013, 22:35
Location: Moffat Beach, Queensland
Skill: Programmer
Skill: Scripter
Skill: Level Designer

Re: Need screen resolutions available

Postby SolarPortal » 01 Oct 2017, 11:10

Yes, i jhust noticed this yesterday myself, and may try to reorganise it to make a bit more sense. but i think for now while developing the pause menu/options screen, it is fine as when its fixed, it will automatically adapt :P
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest