[TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)

Started by Crimson Wizard, Thu 19/09/2013 18:05:19

Previous topic - Next topic

Crimson Wizard

UPD: this was an experimental version. For more recent (and "more official") 3.4.0 version check this thread: http://www.adventuregamestudio.co.uk/forums/index.php?topic=51050.0
//---------------------------------------------------------------------------------



Since people keep asking about this , and I just happened to make a test build, here it is.
This is early work in progress. While I am generally optimistic about the feature itself, this build, in particular, is rather raw. That's why I do not publish source code. I will be rewriting it later anyway. In the end, I hope, custom resolution will make into one of the future "official" builds.

Version of 23 June 2014, updated to 3.3.0 update1.
http://www.mediafire.com/download/a1j4yu57gi46w2r/CustomRes_3_3_0_update1.7z
No-MP3 version of the engine:
http://www.mediafire.com/download/ntbvu97zaef0utv/CustomRes_3_3_0_update1_nomp3.7z
The complete source code contained in my personal branch here:
https://github.com/ivan-mogilko/ags-refactoring/tree/dirty_custom_resolutions


Preliminary version based on 3.3.1 alpha of 28 June 2014
(Warning: may be unstable)
(Includes Vertical Sync option for D3D9 driver in winsetup)
http://www.mediafire.com/download/i7bfqk5196azqhb/CustomRes_3_3_1_alpha1.7z
No-MP3 version of the engine:
http://www.mediafire.com/download/cac7brkaxz4f8dq/CustomRes_3_3_1_alpha1_nomp3.7z
The complete source code contained in my personal branch here:
https://github.com/ivan-mogilko/ags-refactoring/tree/dirty_custom_resolutions_331



Previous versions (some of them buggy):
Spoiler

Version of 6 February 2014, updated to 3.3.0 RC and added new winsetup:
http://www.mediafire.com/download/d4vz54sb4t33tma/CustomRes_3_3_0_RC.7z
No-MP3 version of the engine:
http://www.mediafire.com/download/aqda3dyndf8klht/CustomRes_3_3_0_RC_nomp3.7z

//---------------------------------------------------------------------------------------------

Version of 27 December 2013, which fixes sprite & font scaling:
http://www.mediafire.com/download/31qq2883hg6i5c5/AGS_CustomRes_Beta10_fix_27dec2013.7z
Also, source code in the form of patches (apply on top of "feature_display_resolution branch in ags repository):
http://www.mediafire.com/download/pdmzddcczl2afai/patch_temp_customres_beta10.7z

//---------------------------------------------------------------------------------------------

Version of 20th November 2013 (based on 3.3.0 beta 10, allows any custom game resolution):
http://www.mediafire.com/download/6yk5jmo1xlurfah/CustomRes_Beta10.7z
See info here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=49014.msg636473535#msg636473535

//---------------------------------------------------------------------------------------------

Version of 15th September 2013 (based on 3.3.0 beta 7, adds 1280x720 resolution):
http://www.mediafire.com/download/z52tkkuynk8z3sb/AGS_3_3_0_customres_test.zip
Adds only one new 1280x720 resolution.
Compatibility: this build can load game projects from 3.3.0 beta 7 and lower (e.g. 3.2.1).
1280x720 projects created with this build CANNOT be opened in 3.3.0 beta. Projects of other resolutions - may be.
WARNING! not thoroughly tested. Code-wise it potentially supports any resolution, but I did not have time to make a proper setup yet, so you can only set 1280x720 in the project settings. Also WinSetup displays incorrect information on resolution (this should not have any impact on gameplay).
[close]

Crimson Wizard

#1
Feedback made in other thread:
Quote from: Ali on Thu 19/09/2013 14:38:09
The biggest problem I encountered was the graphics failing to initialise when running in windowed mode with the resolution set to 1280x720 or less. Would I be right in thinking recent developments should make it possible to scale the window down to fit lower resolutions?
It should, and IIRC I tested 1280x720 games in windowed mode. To clarify, what is your game's resolution and how exactly are you changing display resolution?

Quote from: Ali on Thu 19/09/2013 14:38:09
Apart from that, the most notable problem was tearing in full screen. This was very, very distracting. I think VSync for D3D would be essential for decent looking high-res. Is that a realistic possibility? Weirdly, I didn't see any tearing in windowed mode (even at resolutions where the window virtually filled the screen).
Quote from: KNOX on Thu 19/09/2013 17:44:52
QuoteI think VSync for D3D would be essential for decent looking high-res. Is that a realistic possibility
If Im not mistaken the Draconian version had a lot D3D stuff fixed , vsync and character walking/scaling, right?

Yes, VSync seem to be implemented in Draconian. I started exploring Alan's code to see what may be taken to "official" build.

Quote from: Ali on Thu 19/09/2013 14:38:09
Apart from wanting to see this develop further, it would be useful to add an export option for walkable areas / regions and hotspots to make scaling up an existing game easier. I did this using CRM tools and Photoshop for scaling. But CRM tools doesn't work properly for higher resolutions and it takes a bit of fiddling.
Someone should do this, but not me, I am too busy to even think about that. (roll)

Quote from: Mehrdad on Thu 19/09/2013 15:33:44
on 1280x720:
I can't Quit game GUI center on screen.i seems doesn't fit.
Do you mean one of your guis don't fit, or you are calling standart QuitGame dialog?

I will look into this soon.

Mehrdad

Quote
Do you mean one of your guis don't fit, or you are calling standart QuitGame dialog?
I will look into this soon.
My mean is: gRestartYN.I can't center it on screen (1280x720)
My official site: http://www.pershaland.com/

Ali

Thanks for taking the time to look at this CW. I know you're busy and it's really appreciated.

Quote from: Crimson Wizard on Thu 19/09/2013 18:09:03
Feedback made in other thread:
Quote from: Ali on Thu 19/09/2013 14:38:09
The biggest problem I encountered was the graphics failing to initialise when running in windowed mode with the resolution set to 1280x720 or less. Would I be right in thinking recent developments should make it possible to scale the window down to fit lower resolutions?
It should, and IIRC I tested 1280x720 games in windowed mode. To clarify, what is your game's resolution and how exactly are you changing display resolution?

Sorry, I may not have been clear. The test game is 1280x720. It works fine in windowed mode when my desktop resolution is 1920x1080 or 1600x900. But if the desktop resolution is 1280x720 or below, the game won't run in windowed mode: Problem: 'Failed to create Direct3D Device: 0x8876086C'

Quote from: Mehrdad on Thu 19/09/2013 19:10:52
Quote
Do you mean one of your guis don't fit, or you are calling standart QuitGame dialog?
I will look into this soon.
My mean is: gRestartYN.I can't center it on screen (1280x720)

Mehrdad's right that the default dialogs (Save, Restore, Quit) don't display in the right place at 1280x720. But I don't have any problem getting a custom GUI to centre in the screen.

Crimson Wizard

Quote from: Ali on Thu 19/09/2013 20:38:20
Sorry, I may not have been clear. The test game is 1280x720. It works fine in windowed mode when my desktop resolution is 1920x1080 or 1600x900. But if the desktop resolution is 1280x720 or below, the game won't run in windowed mode: Problem: 'Failed to create Direct3D Device: 0x8876086C'

Ah, I see now.
I think that's because Windows does not let it create a window of that size (it should be slightly larger than 1280x720 to put borders and title bar). And the engine can't detect such problem yet.
With the build you're having you can scale game down by manually configuring it (this will be supported by WinSetup too, I was working on that recently).
Open acsetup.cfg in notepad (or whatever) and put this under "[misc]" section:
Code: text

[misc]
renderstyle=2
screenwidth=640
screenheight=360

(This is an example, you may use different screen size)

Quote from: Ali on Thu 19/09/2013 20:38:20
Mehrdad's right that the default dialogs (Save, Restore, Quit) don't display in the right place at 1280x720. But I don't have any problem getting a custom GUI to centre in the screen.
Yes, it looks like all built-in dialogs have hard-coded coordinates... I'll fix that.

monkey0506

Quote from: Ali on Thu 19/09/2013 20:38:20But if the desktop resolution is 1280x720 or below, the game won't run in windowed mode: Problem: 'Failed to create Direct3D Device: 0x8876086C'

When running in windowed mode, the graphics driver will attempt to create a window with an inner resolution matching the game resolution. If the game resolution matches the display resolution then the inside of the window (excluding the title bar and border) would take up the entire screen, and the resultant window would be larger than the screen itself. I could be wrong, but I don't think Windows (the OS itself) allows that.

Edit: CW beat me, but yeah.

Crimson Wizard

I wonder if Linux allows to create windows > desktop size. Or if there's a way to know if its graphic system permits this.
This matters if we add the preventive check before initializing graphics mode (which ports should care?).

Knox

Quote from: Crimson Wizard on Thu 19/09/2013 18:09:03
Yes, VSync seem to be implemented in Draconian. I started exploring Alan's code to see what may be taken to "official" build.

Aww yeah! I hope most if not all these can make it into the build:

• All D3D +Vsync stuff
• Windowed mode gamma support
• Added an optional acwin_perspective.exe that handles better characters direction when in perspective
• Improved walking at 60%-80% zoom when using AdjustSpeedWithScaling and MovementLinkedToAnimation
:=
--All that is necessary for evil to triumph is for good men to do nothing.

BigMc

Windows larger than the screen size should not be a problem on Linux.

Mehrdad

Crimson , Can you make an editable winsetup too?
My official site: http://www.pershaland.com/

Crimson Wizard

Quote from: Mehrdad on Fri 20/09/2013 07:07:32
Crimson , Can you make an editable winsetup too?

No, sorry.
I mean, I probably could (in theory), but it will be unrealistic for me to find time for this anytime soon (to do this properly).

If you need a unique-looking setup program, it is not really difficult to make for anyone, who can program GUI applications ( = almost anyone, who can program ). Also this does not require knowledge of AGS, at all. One should only know the configuration format and commands you can write there (which is pretty simple).

There was a discussion... (heh, there seem to be a discussion for everything):
http://www.adventuregamestudio.co.uk/forums/index.php?topic=48097.0

Mehrdad

Ok
I'm not good programmer but i'll try it.Thanks anyway.

I tested 1280x720 for big GUI and a simple alpha channel rain and character on D3D.
Unfortunately i found stutter and slow show in fade GUI and move player.Of course i know it's depend to engine.I change cash ram size in winsetup too.but don't change anything.
What ways do you recommend for achieve to more speed?
My official site: http://www.pershaland.com/

DazJ

Quote from: Mehrdad on Fri 20/09/2013 15:23:16
Ok
I'm not good programmer but i'll try it.Thanks anyway.

I tested 1280x720 for big GUI and a simple alpha channel rain and character on D3D.
Unfortunately i found stutter and slow show in fade GUI and move player.Of course i know it's depend to engine.I change cash ram size in winsetup too.but don't change anything.
What ways do you recommend for achieve to more speed?

This could be simply down to your computer specs. What specs have you got?

Crimson Wizard

#13
Regarding speed issues: I must apologize, but I don't think I will be able to do something quick with this anyway. Rendering speed problem must be analyzed to see which operations cause slowdowns. That may be AGS drawing engine, but at the same time it may be a non-optimized script.
Right now I am just trying to focus on limited number of things, to be able to finish something...

PS. Sprite cash size only affects faster work with large animations, not the drawing itself.
PPS. Mehrdad, regarding new setup, I did not mean you must program that yourself, you may as well try people on programming forums, and AGS forum too; maybe someone will find a way to make a simple customizable setup program for AGS.

Ali

Quote from: Mehrdad on Fri 20/09/2013 15:23:16
I tested 1280x720 for big GUI and a simple alpha channel rain and character on D3D.
Unfortunately i found stutter and slow show in fade GUI and move player.Of course i know it's depend to engine.I change cash ram size in winsetup too.but don't change anything.
What ways do you recommend for achieve to more speed?

Mehrdad could you upload a test game with these performance problems? That might help establish whether it's related to custom resolutions, or the rain effect, or your system.

Mehrdad

Quote
This could be simply down to your computer specs. What specs have you got?

My machine is :  CPU: AMD phenom II X4 925 2.8ghz - Ram:4 Gig - GFX: nVidia GT 220

Quote from: Crimson Wizard on Sat 21/09/2013 15:24:35
Regarding speed issues: I must apologize, but I don't think I will be able to do something quick with this anyway. Rendering speed problem must be analyzed to see which operations cause slowdowns. That may be AGS drawing engine, but at the same time it may be a non-optimized script.
Right now I am just trying to focus on limited number of things, to be able to finish something...

PS. Sprite cash size only affects faster work with large animations, not the drawing itself.
PPS. Mehrdad, regarding new setup, I did not mean you must program that yourself, you may as well try people on programming forums, and AGS forum too; maybe someone will find a way to make a simple customizable setup program for AGS.

I think AGS can't handle large size screens and don't optimized for higher resolution.
Ok.I'll get help for new winsetup but before that i must get confident from engine for this resolution.doesn't it?

Quote from: Ali on Sat 21/09/2013 15:40:04
Mehrdad could you upload a test game with these performance problems? That might help establish whether it's related to custom resolutions, or the rain effect, or your system.

Sorry not now.maybe later.It's very simple.you can make 30 frame for falling snow with alpha channel at 1280x720 size and test it with move character to path way and see fps result.
My official site: http://www.pershaland.com/

Ali

If you have a screen-sized object (or GUI?) with 30 frames of animation, it's probably that which is causing the slow-down rather than anything specific to this build.

There are more efficient ways of achieving a rain effect. I'll PM you to save clogging up this thread.

Mehrdad

I used screen-size object.of course this problem appear for GUI too.My problem is not about rain or snow.I have a black size screen GUI for make some animate fade transparency too with same problem.
Ali,you have a smooth scrolling parallax module and that was very nice and works on 800x600 too.I think you can help for make something for smoothing this works with module or etc.
My official site: http://www.pershaland.com/

Igor Hardy

#18
Thanks very much for this, CW. Very excited about the scaling feature too.

I'm using Skygoblin's build at the moment and must finish some other stuff first, but as soon as I'm done I'll try to move my project here.

EDIT: Works like crazy! My 720p game is now on track to return to the official branches of the editor/engine. And with the bonus of scaling. Really - huge thanks Crimson! :)

Igor Hardy

Would it be complicated to separate the font rendering from the rest of the image? So that we can e.g. have specific font sizes preloaded for specific screen resolutions.

SMF spam blocked by CleanTalk