Adventure Game Studio | Forums

AGS Development => Editor Development => Topic started by: Crimson Wizard on Thu 19/09/2013 18:05:19

Title: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Crimson Wizard on Thu 19/09/2013 18:05:19
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]
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: 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 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=47344.msg636462609#msg636462609) 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 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=44543.0) 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.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: 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)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ali on Thu 19/09/2013 20:38:20
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 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=47344.msg636462609#msg636462609) 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.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 19/09/2013 20:54:36
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) Select

[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.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: monkey0506 on Thu 19/09/2013 21:02:03
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.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 19/09/2013 21:09:06
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?).
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Knox on Thu 19/09/2013 23:24:53
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
:=
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: BigMc on Thu 19/09/2013 23:27:09
Windows larger than the screen size should not be a problem on Linux.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Mehrdad on Fri 20/09/2013 07:07:32
Crimson , Can you make an editable winsetup too?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Fri 20/09/2013 08:20:20
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
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: 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?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: DazJ on Sat 21/09/2013 13:15:42
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?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: 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.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ali on Sat 21/09/2013 15:40:04
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.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Mehrdad on Sat 21/09/2013 16:18:15
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.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ali on Sat 21/09/2013 17:07:46
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.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Mehrdad on Sat 21/09/2013 17:34:48
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.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Igor Hardy on Sun 29/09/2013 11:20:36
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! :)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Igor Hardy on Mon 07/10/2013 17:36:25
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.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ali on Mon 07/10/2013 17:38:51
Quote from: Ascovel on Mon 07/10/2013 17:36:25
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.

Out of interest, why would that be useful? Surely the font size would usually be relative to screen size?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Mon 07/10/2013 17:46:04
Well, I am glad this one at least works :).
I'll be merging latest 3.3.0 fixes and additions here some time later.

Quote from: Ascovel on Mon 07/10/2013 17:36:25
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.
You mean different fonts, depending on scaling? Hmm, there's nothing like that in AGS right now. But, hypothetically, I think, it is possible to make one fonts substitute others in font array after resolution has been established. Question is, what would be a better approach to this, from editor's perspective. Should we define "font aliases", that are not real fonts, but just a placeholders, filled in at runtime? Or should there be a property per each font, like "substitute by"/"override which font"? This idea may seem trivial at first, but really, there's much to think about.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Snarky on Mon 07/10/2013 17:48:50
... and Wadjet Eye might be able to get high-res text in 320x200 games and avoid ugly scaling artifacts! (nod)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Mon 07/10/2013 17:53:42
You know, it is actually possible to substitute game font by placing a font file with identical name in the game folder ;)?
I think I mentioned that somewhere already, but AGS first seeks for its files on disk, and then in the game package.
That's not very convenient, but may be used as a workaround.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Igor Hardy on Mon 07/10/2013 18:18:36
Quote from: Ali on Mon 07/10/2013 17:38:51
Quote from: Ascovel on Mon 07/10/2013 17:36:25
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.

Out of interest, why would that be useful? Surely the font size would usually be relative to screen size?

The fonts don't always scale down very well. What I meant is, if it would be possible to have a non-scaled font over a scaled image of everything else.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Radiant on Mon 07/10/2013 18:31:05
I would be interested in using a custom resolution for future projects, e.g. 800x500 (which is the 10:9 variation on 800x600, really).
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Mon 07/10/2013 18:33:08
Quote from: Ascovel on Mon 07/10/2013 18:18:36
What I meant is, if it would be possible to have a non-scaled font over a scaled image of everything else.
No, definitely not. (Unless using hacks so terrible  that I refuse to even imagine them :tongue:).

Text is usually not a separate image, but integrated with something else, like gui surface, overlay, even room background. It may have several additional post-effects applied (like something being drawn over). It may be printed on an object/character view frames, which, in turn could get tinted or drawn with partial transparency, etc, etc.

Besides, scaling inconsistency may (will) break proportions and constraints.
It will be hard (if not impossible) to properly calculate the size of text windows, and other objects, which usually depend on text size.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ali on Mon 07/10/2013 18:41:35
I see Ascovel's point about downscaling fonts. If it's not possible to avoid downscaling, perhaps addressing the current weaknesses of anti-aliasing for TTF (http://www.adventuregamestudio.co.uk/forums/index.php?topic=43117.0) would be a good compromise. If a heavier, softer AA was available for fonts, it might look less nasty when shrunk?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Igor Hardy on Mon 07/10/2013 18:49:51
Quote from: Crimson Wizard on Mon 07/10/2013 18:33:08
Quote from: Ascovel on Mon 07/10/2013 18:18:36
What I meant is, if it would be possible to have a non-scaled font over a scaled image of everything else.
No, definitely not. (Unless using hacks so terrible  that I refuse to even imagine them :tongue:).

Text is usually not a separate image, but integrated with something else, like gui surface, overlay, even room background. It may have several additional post-effects applied (like something being drawn over). It may be printed on an object/character view frames, which, in turn could get tinted or drawn with partial transparency, etc, etc.

Besides, scaling inconsistency may (will) break proportions and constraints.
It will be hard (if not impossible) to properly calculate the size of text windows, and other objects, which usually depend on text size.

Oh, I see. I was afraid that might be too problematic for AGS, but I thought some other software does that. Apparently not - it only generates trouble.

Quote from: Ali on Mon 07/10/2013 18:41:35
I see Ascovel's point about downscaling fonts. If it's not possible to avoid downscaling, perhaps addressing the current weaknesses of anti-aliasing for TTF (http://www.adventuregamestudio.co.uk/forums/index.php?topic=43117.0) would be a good compromise. If a heavier, softer AA was available for fonts, it might look less nasty when shrunk?

Ali, what about this plugin by Calin?

http://www.adventuregamestudio.co.uk/forums/index.php?topic=44359.0

Could that be the better alternative?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Mon 07/10/2013 19:13:21
Quote from: Ascovel on Mon 07/10/2013 18:49:51
Oh, I see. I was afraid that might be too problematic for AGS, but I thought some other software does that. Apparently not.
Well, maybe some do... at least some may use different scaling levels for different layers. Like game world rendered with one scale, but guis rendered with another scale as a separate process. I don't know. This all depends on how game image is constructed.


Quote from: Ascovel on Mon 07/10/2013 18:49:51
Ali, what about this plugin by Calin?

http://www.adventuregamestudio.co.uk/forums/index.php?topic=44359.0

Could that be the better alternative?
BTW, I was considering to implement sprite fonts as a native capability of AGS. Maybe we will at some point. WFN fonts are, essentially, sprite fonts, just with limited functionality.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: dbuske on Fri 18/10/2013 17:20:56
Works wonderfully at 1280x720.  I've had no crashes at all.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Igor Hardy on Mon 04/11/2013 21:15:48
I tested the build with Calin's FontSprite plugin (scaled from 720p to 540p) and it looks much better while still the scaling produces slightly messed up edges for some letters. Nothing more can be done I guess since the native resolution isn't much higher than the target.

Alas, supposedly 720p is low res for indie adventure games in 2013 :~(

http://www.rockpapershotgun.com/2013/11/04/wot-i-think-lilly-looking-through/
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Knox on Tue 05/11/2013 03:45:43
Quote from: Ascovel on Mon 04/11/2013 21:15:48
Alas, supposedly 720p is low res for indie adventure games in 2013 :~(

Man that's a downer! :cry:
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: monkey0506 on Tue 05/11/2013 10:44:43
Quote from: Ascovel on Mon 04/11/2013 21:15:48Alas, supposedly 720p is low res for indie adventure games in 2013 :~(

http://www.rockpapershotgun.com/2013/11/04/wot-i-think-lilly-looking-through/

The fact that he referred to 720p as an "incredibly low resolution", and even went to great lengths to assert how inconceivably small this is ("in 2013"!!!!), filled me with unfathomable rage.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Tue 05/11/2013 10:53:49
Quote from: Ascovel on Mon 04/11/2013 21:15:48
Alas, supposedly 720p is low res for indie adventure games in 2013 :~(

http://www.rockpapershotgun.com/2013/11/04/wot-i-think-lilly-looking-through/

Quote from: Knox on Tue 05/11/2013 03:45:43
Man that's a downer! :cry:

Erm... you guys can't be serious. This is irony, right?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Snarky on Tue 05/11/2013 12:04:35
Given that 1080p has become the de facto default PC screen resolution (which is why I'm still using my 1600x1200 monitor from 2004), calling 1280x720 "incredibly low resolution" seems a bit over the top. But by the same token, it's fair enough to question why they went with that resolution, when the art style clearly calls for the best resolution possible, when they apparently produced the background art in higher resolution, and when the game in fact runs in a higher resolution (as seen by the animations). Mixed resolutions is never a pretty sight, and the way the object graphics degrade as soon as they go from moving to fixed calls more attention to the issue than if they'd just used 1280x720 throughout.

Should we split this off to somewhere else?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Knox on Tue 05/11/2013 16:58:30
Quote from: Crimson Wizard on Tue 05/11/2013 10:53:49
Erm... you guys can't be serious. This is irony, right?

Ha! Well if that guy thinks 720p is low-rez and the majority of gamers today think the same thing, well yea I have to admit that does suck (for me anyways).
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: LameNick on Sat 09/11/2013 23:28:14
Hi, i thought it might help with the progress if i mentioned the issues i had with this build so far:

if i use other resolution than one of the those available in the editor it rescales the background and sprites in the view

renderstyle=0 doesn't work, it crashes in directdraw, in direct x it either shows blank view or it stretches the view.

renderstyle=2 at 1280x720 fullscreen mode stretches the view in both dimensions not keeping the proportions. (my monitor's res.-1920x1200), otherwise it seems to work.

when i use the 320x200 resolution preset for some reason it downscales my character-sprite


is it only me or anyone else experiencing these issues?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Sun 10/11/2013 00:12:18
Quote from: LameNick on Sat 09/11/2013 23:28:14
if i use other resolution than one of the those available in the editor it rescales the background and sprites in the view
Well, it should do that, except when renderstyle is 0 and no scaling filter selected.

Quote from: LameNick on Sat 09/11/2013 23:28:14
renderstyle=2 at 1280x720 fullscreen mode stretches the view in both dimensions not keeping the proportions. (my monitor's res.-1920x1200)
1280x720 and 1920x1200 have different aspect ratios; if you run 1280x720 fullscreen on 1920x1200 monitor, it will become distorted.
Try setting your native desktop resolution in setup:
Code (text) Select

renderstyle=2
screenwidth=1920
screenheight=1200

Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: LameNick on Sun 10/11/2013 09:04:13
Quote from: Crimson Wizard on Sun 10/11/2013 00:12:18
Quote from: LameNick on Sat 09/11/2013 23:28:14
if i use other resolution than one of the those available in the editor it rescales the background and sprites in the view
Well, it should do that, except when renderstyle is 0 and no scaling filter selected.

what i meant is if i use a background of the same resolution as i set in "acsetup.cfg", but its not the resolution that is set in the general settings, the background and sprites got distorted (e.g.: even in window mode it did show just a part of the background and upscaled version of sprite). However i tried it now again with 1600x800 resolution and in window mode it worked fine but with fullscreen renderstyle=2 it stretched the width of the view beyond my display while the height was shorter then height of my display, it worked as a scrollable background.

Quote from: Crimson Wizard on Sun 10/11/2013 00:12:18
Quote from: LameNick on Sat 09/11/2013 23:28:14
renderstyle=2 at 1280x720 fullscreen mode stretches the view in both dimensions not keeping the proportions. (my monitor's res.-1920x1200)
1280x720 and 1920x1200 have different aspect ratios; if you run 1280x720 fullscreen on 1920x1200 monitor, it will become distorted.
Try setting your native desktop resolution in setup:
Code (text) Select

renderstyle=2
screenwidth=1920
screenheight=1200

well, the problem was that at renderstyle set to 2 it didn't maintain the right proportions, it showed the same results as if renderstyle was set to 1.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Sun 10/11/2013 13:50:09
Quote from: LameNick on Sun 10/11/2013 09:04:13
what i meant is if i use a background of the same resolution as i set in "acsetup.cfg", but its not the resolution that is set in the general settings, the background and sprites got distorted (e.g.: even in window mode it did show just a part of the background and upscaled version of sprite). However i tried it now again with 1600x800 resolution and in window mode it worked fine but with fullscreen renderstyle=2 it stretched the width of the view beyond my display while the height was shorter then height of my display, it worked as a scrollable background.

Wait...umm, I am not sure I understand this right.
If you mean that in general settings you have one resolution, like 800x600, and in "acsetup.cfg" you set higher resolution, like 1280x720, and have a room background 1280x720, then that room will indeed become a scrolling room, and only 800x600 part should be displayed at all times.
The resolution you type in "acsetup.cfg" does not change anything to game or room size, it is simply a size of the window. The viewport size (the visible piece of the game) should always stay the same - equal to game size as set in general settings.

In case I am mistaken, can you give more details, like which resolutions do you set everywhere? Also screenshots may really help.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: LameNick on Sun 10/11/2013 20:07:34
aah, so all the screenwidth/height feature does, it stretches the window in window mode to that particular resolution while the viewport stays at the resolution set in general settings? then in this particular case it was doing what it was supposed to do except that renderstyle=0 doesn't work. I'm sorry, my brain is slow sometime :( although i don't understand very much now what is it good for if it just changes the window size while the game view has its own setting..
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Sun 10/11/2013 20:31:22
Quote from: LameNick on Sun 10/11/2013 20:07:34although i don't understand very much now what is it good for if it just changes the window size while the game view has its own setting..
There are three settings:
1. Game size, which determines the base size of the game view.
2. Window size.
2. Final game view size inside the window, which determines how game view is positioned in the window. This one cannot be set directly, but calculated from number of parameters, like scaling filter, "renderstyle" option, etc.

Imagine there's a 320x200 game, and you have a 1920x1200 desktop. If you will run the game in the window using its base resolution then the window will be too small on your large monitor. Here is where scaling comes, to scale the game up to certain degree. For example, you can scale game x6, and the result will be exactly your desktop resolution, thus game will cover the whole screen.
Now, if the game is not 320x200, but 320x240, scaling to maximal size will make game appear stretched horizontally, because its size has different ratio than your desktop size. Here is where "renderstyle" comes: instead of stretching the game view to maximal possible, "renderstyle=2" stretches it proportinally, possibly leaving black borders around.

In this case the "rectangle" (4:3) game on the widescreen monitor will look like this:
Spoiler
(http://imageshack.us/a/img62/1601/vs1q.png)
[close]

And the "wide" (16:10 or 16:9) game on the 4:3 monitor will look like this:
Spoiler
(http://imageshack.us/a/img163/8074/x9lw.png)
[close]
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 14/11/2013 14:44:32
I decided to make up a summary of the plans for the custom resolutions build in regards of the display modes. Many of the following is already featured, other things are yet to be implemented.
It would be nice to know opinions - does this all sounds proper?

The display mode is specified by the combination of the following parameters:

1. Original game resolution, or Viewport size.
2. Window size or fullscreen resolution ("window size" for simplicity).
3. Viewport position and scaling. I am calling the resulting rectangle a "Render Frame", or "Drawing Frame", internally.

Here's basic illustration to how it works:
Spoiler
(http://imageshack.us/a/img822/6092/44cd.png)
[close]
When the window is created, the game view is positioned/scaled inside according to some rules, making a "render frame".

Window.
The window is defined by size (width * height).
Window may be:
- fullscreen;
- plain window with border and caption (classic windowed mode);
- desktop-sized borderless window; although covering all screen, this is not an exclusive fullscreen mode and it may be generally easier for graphics card to handle one (although the rendering may be sometimes slower relative to fullscreen).

Window size can be determined either by directly setting width & height, or by following scaling filter settings.
In the latter case the window size will be recalculated as a (game size * scaling level), so the window is trying to match the supposed game view size.
Separately there's an option to Keep desktop ratio: as an alternative this mode will recalculate window size, but then correct it to make it match your desktop resolution's aspect ratio. This option have meaning only for fullscreen.
The desktop-sized borderless window is always the same resolution as the desktop.

Game viewport position.
Render frame is defined by scaling and positioning inside the window.
The scaling is a combination of selected graphics filter and a final stretching (applied only when necessary) done in a way specific for every driver (e.g. nearest-neighbor for software driver).

The render frame may be positioned in three different ways:
- Center: the scaling filter is applied (if any), then the result is centered inside the window. If no filter was selected, the game will appear unscaled*. This may cause black borders appear around the game view.
* "Unscaled" game will look larger or smaller depending on desktop resolution, also if a fullscreen mode is used, you will receive different visuals depending on fullscreen resolution. But technically it is the graphics card and/or monitor that scale the picture on their own.
- Stretch: the scaling filter is applied (if any) and then the result is stretched or squeezed to fill precisely the window. This may cause visuals to degrade, if the window size have different aspect ratio than the game size (the game may appear stretched horizontally or vertically).
- Proportional stretch (aka "Best fit"): the scaling filter is applied (if any) and then the result is stretched or squeezed to fill the maximal available space inside the window, while maintaining the original game's aspect ratio. This may cause either horizontal or vertical black borders appear (but not both).

Following are illustrations to these three options:
Spoiler

(http://imageshack.us/a/img5/1341/0vyp.png)
(http://imageshack.us/a/img843/1069/q9n7.png)
(http://imageshack.us/a/img600/8606/ax2s.png)
[close]

WinSetup usability.
The average user usually won't care about how these things work internally, he will want a simple dialog to set up visuals he wants. The question is how to present him all these options.
This is what I came up with so far (WARNING: this is a dirty mockup):
Spoiler
(http://imageshack.us/a/img443/298/izrc.png)
[close]

First the user choses the window mode: fullscreen / windowed / fullscreen window (better name anyone?).
Then user decides to either set precise window resolution or game scaling.

A. If user wants to set window resolution, a resolution list activates.
The "Keep game ratio" check serves as a switch between "stretch" and "proportional stretch" modes.
Filter selection is active, but the scaling level is not enabled for filters that support free scaling level (like nearest-neighbor and anti-aliased-nearest-neighbor), because the stretching will be done to max allowed by window size anyway.
Setting filter to "None" will basically make game appear centered in the window, if it fits, or scaled down proportionally if it does not.

B. If user wants to set scaling filter, a resolution list is replaced by a read-only label, that will display the calculated window resolution.
The "Match desktop ratio" check is self-explanatory.
Filter selection is active and a scaling level can be set either to one of the predefined values, or to custom level (if filter supports this).



The configuration file may still be edited by hand, or by custom setup program, to set more exotic combination of options.
The options are following:

Spoiler

Quote
gfx_driver - defines driver id

gfx_mode - defines the base mode
  gfx_mode=fullscreen
  gfx_mode=windowed
  gfx_mode=fullscreen_windowed

window_def - defines how window is determined
  window_def=resolution
  window_def=scaling

window_width - set window width
window_height - set window height

gfx_filter - defines the filter name

gfx_scaling_both - custom scaling multiplier
gfx_scaling_hor - separate horizontal scaling
gfx_scaling_ver - separate vertical scaling

match_desktop_ratio - defines whether window's aspect ratio must match desktop ratio

game_frame - defines the positioning of the render frame inside window:
  game_frame=center
  game_frame=stretch
  game_frame=proportional
[close]
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: AGD2 on Fri 15/11/2013 09:12:36
This all sounds pretty good to me! Out of curiosity, would the following things be rolled into the same release?

-Rename winsetup to something else
-Ability to change all of the aforementioned options from within the game itself at run-time (so the end user doesn't need to tinker with an external setup program)
-Ability to drag the corner of the window so that the game window size can be scaled in real-time

Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Fri 15/11/2013 09:26:51
Quote from: AGD2 on Fri 15/11/2013 09:12:36
-Ability to drag the corner of the window so that the game window size can be scaled in real-time
I just got a email from BigMC, who has information about one guy introducing this feature for Allegro library.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: LameNick on Sat 16/11/2013 22:58:31
cannot wait till its released :P
i'd like to ask the highest game viewport resolution will be 1280x720?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Tue 19/11/2013 11:47:37
By Ali's request, here's an updated version of the build:
(Fixed version reuploaded 20 november)
http://www.mediafire.com/download/6yk5jmo1xlurfah/CustomRes_Beta10.7z

Copy this over 3.3.0 beta 10 (can be found here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.0)

Not thouroghly tested yet, but I will fix any critical bugs found.

Please, take into consideration that custom game resolutions are still experimental. Some things are made for the sake of speed and will be redone in future. (That is also the reason I do not publish the source code for this feature).
Aside from that, the build is based on 3.3.0 Beta 10 and custom display resolution feature (which should probably work).

@LameNick: I found few mistakes in the previous version, which could cause weird effects, but only if the combination of parameters in config file was invalid. I could not reproduce the crash you reported (with "renderstyle=0"). Please tell, if this version works better for you.

//--------------------------------------------------------
What has changed:

In the Editor:
The Resolution option in General Settings now works differently: you do not select the size from drop-down list, but click on the "..." button to the right. This will open a dialog window, where you do your selection.
Why: at first I was considering doing this similar to SkyGoblin's build: he made new "custom size" property that would appear under "Resolution" if you select "Custom" in the list. Problem is, however, that if you type Width and Height separately, the editor will try to update rooms & guis in between those changes, which is very annoying.


In the Engine's config file:
"renderstyle" is now a string parameter, valid values are:
- "center",
- "stretch",
- "proportional",
- "resizewindow"
Added "match_desktop_ratio" parameter to substitute "letterbox" and "sideborders" from original config. It works only for fullscreen.

Examples of manual display mode setting:
Code (text) Select

gfxDriver=D3D9
windowed=0
screenwidth=1920
screenheight=1080
renderstyle=proportional

This will create 1920x1080 fullscreen and scale the game to max fitting size proportionally (keeping its aspect ratio).

Code (text) Select

[misc]
gfxDriver=D3D9
windowed=0
gfxFilter=StdScale4
renderstyle=resize
match_desktop_ratio=1

This will scale the game x4 using nearest-neighbour filter. The fullscreen mode will try to take resolution that both contains scaled game size and matches your desktop aspect ratio.


//-----------------------------------------------
UPDATE: reuploaded the build with couple editor bugs fixed (related to the property editing).

UPDATE 2: reuploaded again, this time fixed a bug in the engine which occured if using low resolutions.



Just for lulz, the 200x800 game:
Spoiler
(http://img607.imageshack.us/img607/7669/528s.png)
[close]
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ali on Thu 21/11/2013 11:50:14
This looks fantastic! I'll be playing around with it in the next couple of weeks.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: miguel on Thu 21/11/2013 12:32:24
It does look great!
Thank you Crimson and everybody else who's working on it!
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Daniel Eakins on Thu 21/11/2013 12:33:25
Thank you ;-D
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: LameNick on Thu 21/11/2013 19:49:43
Awesome! Works nicely so far, one more stupid question though: is there no way for it to recognize the monitor's resolution? does screenwidth/height in the acsetup.cfg always need to be edited when the game is played on different monitor setup?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 21/11/2013 23:52:17
Quote from: LameNick on Thu 21/11/2013 19:49:43
Awesome! Works nicely so far, one more stupid question though: is there no way for it to recognize the monitor's resolution? does screenwidth/height in the acsetup.cfg always need to be edited when the game is played on different monitor setup?
I am supposed to rewrite the setup program when I get time, in plans it should display a list of resolutions supported by your gfx card.

At the moment you can type in some ridiculously large number (like 5000x5000) and the engine will likely lower that down to the nearest supported, as it does when it cannot apply the given one.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: David Ostman on Fri 22/11/2013 07:05:43
EDIT: Actually I just tested it and it seems to be doing what I'm asking about :-D

This is a huge step in the right direction, thanks for working on it CW!

I was thinking.. With custom resolution would I be able to enter some arbitrary resolution that "doesn't exist", like 320x180 which is 16:9? So when I scale up I'd end up at 640x360, 1280x720, 1920x1080. The two latter are well known and used resolutions, but the three other aren't ever used natively on normal consumer displays, are they?

So for example in the case of someone still running a 1024x768 resolution would it just take that 320x180, set the game's resolution natively at 1024x760, and scale up the content as much as possible without going above 1024x768 in any one or both direction, like so:

(http://i.imgur.com/C0RRznH.png)

Right now I'm developing for 640x400 which is 16:10 ratio, but I'd rather use 640x360 and a 16:9 ratio so I always get a case of horizontal bars.

(http://i.imgur.com/FSwI6No.png)

... and never, ever end up with a (to me) unacceptable case of vertical bars.

(http://i.imgur.com/BTD3bSV.png)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Fri 22/11/2013 08:04:23
Quote from: David Ostman on Fri 22/11/2013 07:05:43
I was thinking.. With custom resolution would I be able to enter some arbitrary resolution that "doesn't exist"

Yes.

I posted a 200x800 example few posts above:
http://img607.imageshack.us/img607/7669/528s.png

This still needs testing though, there are many hacks in AGS, I have a slight fear they may screw things on some cases.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: David Ostman on Fri 22/11/2013 10:04:15
I started a little side project a week ago (that's just meant to be a tiny palate cleanser as I'm so sick of my main project at this point) so I'll take the chance with it and perhaps I'll be able to ferret out a few issues with it in the process. Of all the improvements and features I've read about lately this one is of most interest to me so I don't mind messing around with it quite a bit.

EDIT: Oh, I realize now I was sloppy reading through your posts above which made my previous post redundant, so sorry about cluttering up the thread.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ali on Fri 22/11/2013 10:25:07
I've done a little experimenting, and have spotted a few issues and made some observations. Many of them are probably things your aware of:

Room Editor
With a large room/character, but game resolution still set to 320x200, the selection box for a character is half the size it should be.
Needs zoom out option for comfortable working.
Import BG automatically zooms in. Not appropriate for high res

GUI Editor
Needs scrolling/zoom out option for large GUIs.

Aesthetics
Character scaling is not at all smooth with large sprites. You can see the jumps very badly. Would it be possible for scaling to work with floats rather than integers, if you see what I mean?
As I'm sure you know, down/upscaling would look much better with sampling.
Working Vsync would really improve things.

View:
Create Subfolder option collapses the tree - possiblty a 3.30 issue?

Misc
This might just be me, but the mouse sensitivity seems very high when full screened - this is scaling 1920x1080 down to 1600x900, so still pretty large.
The option "Fonts designed for 640x..." - is no longer really meaningful and should be changed to something that new users could understand.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Fri 22/11/2013 10:42:13
Quite a few things should be redesigned. For example, "Fonts designed for XX" could be replaced by more clear "scale factor". Same for sprites, probably.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Knox on Fri 06/12/2013 20:35:53
Hey Crimson, any idea when the newest changes to 3.3.0 beta10 can be applied to this Custom Resolution Build? :=
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Fri 06/12/2013 22:46:19
Quote from: Knox on Fri 06/12/2013 20:35:53
Hey Crimson, any idea when the newest changes to 3.3.0 beta10 can be applied to this Custom Resolution Build? :=
There were not much changes recently, mostly updates for safer play on Linux and minor bug fixes, I do not think there's any urgency in this. What do you have in mind?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Knox on Sat 07/12/2013 22:23:44
Quote from: Crimson Wizard on Fri 06/12/2013 22:46:19
There were not much changes recently, mostly updates for safer play on Linux and minor bug fixes, I do not think there's any urgency in this. What do you have in mind?
Oh, wait...sorry I meant to post this in the AGS 3.4.0 Early Alpha [many limits removed] thread!
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ali on Tue 10/12/2013 00:32:08
A little post-AdventureX update...

I built a small choose-your own adventure using this build, and aside from the issues in my previous post (http://www.adventuregamestudio.co.uk/forums/index.php?topic=49014.msg636473843#msg636473843) it worked pretty much perfectly. Rescaling from full HD to suit the projector resolution was just a matter of typing in the right numbers. It also ran pretty well, only slowing down when there were a lot of large 32-bit sprites. I did note that the slowdown was stronger when the sprite appeared as a GUI background, rather than a character or a room object...

Of the issues I've mentioned, I think the ones which affect the player's experience are the most significant
    - Un-smooth scaling makes lots of fonts difficult to read. Bitmap fonts was suggested as a possible solution?
    - Character scaling needs more gradations to produce an acceptable effect - it's far too jerky when working on a large scale.
    - The lack of V-sync means tearing is very distracting when full-screen.

And I picked up a couple of minor points, which may be to do with the beta:

    - In view create Subfolder option collapses the tree only when the selected folder is not called New Folder.
    - When the Output panel fills a whole window (instead of being clipped to the bottom) it is not possible to double-click on an error and jump to the script. In fact, it isn't possible to select the script from the tree either. I have to click onto another panel and click back.

Anyway, thanks to CW for bundling this together in time for me to use it at AdventureX. Really appreciated!
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Tue 10/12/2013 20:42:16
Quote from: Ali on Tue 10/12/2013 00:32:08
Anyway, thanks to CW for bundling this together in time for me to use it at AdventureX. Really appreciated!

I am very curious to see what have you done with this build, is this project available somewhere? :)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ali on Tue 10/12/2013 21:38:31
I'm not going to release it publicly, because it's still a WIP and it's not really designed for a single player. But I'd be happy to send the project via wetransfer if you could PM me an email address?

I haven't used character scaling in this project, but I would add it in to illustrate the issue I'm talking about.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Tue 10/12/2013 22:38:08
I wasn't sure what do you mean when said that you "used it at AdventureX". Did you displayed it there? I have a pretty vague idea about the event itself, sorry ;).
Well, I won't insist, just being curious. Email is ikm_spb at yahoo.com.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ali on Tue 10/12/2013 22:41:10
Most of the stuff at AdventureX is playable games, bit my but was more of a show/presentation. So it's kind of like powerpoint, but an adventure game. Will send it over and hopefully you'll see what I mean!

EDIT: It's on it's way. Hopefully it will be informative!
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Calin Leafshade on Tue 24/12/2013 12:38:45
I get the following crash with this build every time I close it.


---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x77753770 ; program pointer is +9904, ACI version , gtags (0,0)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and post the details on the AGS Technical Forum.



Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------


I am using the Lua plugin so I suspect it may be a plugin issue.


EDIT:

Also it would appear that AGS assumes that a custom res is a high res. I'm using 320x180 and it messes up some of the GUI sizes and the sprite import settings.. nothing major but annoying.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Tue 24/12/2013 13:24:34
Quote from: Calin Leafshade on Tue 24/12/2013 12:38:45
Also it would appear that AGS assumes that a custom res is a high res. I'm using 320x180 and it messes up some of the GUI sizes and the sprite import settings.. nothing major but annoying.
There was such error, but I think I fixed it after second release (unless I actually forgot to reupload the fixed version, or correct the dl link :-X). Which archive did you download?


I think I'll work on this feature properly as soon as 3.3.0 is out.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Calin Leafshade on Tue 24/12/2013 13:32:32
I used this one: http://www.mediafire.com/download/119ya58148yv6vu/CustomRes_Beta10.7z
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Tue 24/12/2013 13:34:53
Quote from: Calin Leafshade on Tue 24/12/2013 13:32:32
I used this one: http://www.mediafire.com/download/119ya58148yv6vu/CustomRes_Beta10.7z
Heh, I have two different links on 1st page and on 3rd. And I don't remember which is correct.
Try this one: http://www.mediafire.com/download/6yk5jmo1xlurfah/CustomRes_Beta10.7z


EDIT: Hmm, this one seem to be the last one; but I quickly tried it with one low-res game and it definitely scales the fonts although it should not...
Sorry, I'll check this soon.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Calin Leafshade on Tue 24/12/2013 15:15:55
Sprites still import at tyhe wrong res too. (I've no idea what that means. A pixel isnt a pixel?)

EDIT: Also in the room editor:

(http://i.imgur.com/y25ke1T.png)

EDIT AGAIN: This also seems to affect GetTextWidth and other similar functions

Also affects the SpriteFont plugin. Scratch that, might be the DrawString method fucking me up.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 26/12/2013 08:35:59
I fixed couple of condition bugs in the engine, but I cannot find what's wrong in the editor yet.
http://www.mediafire.com/download/mdm2dlt21g6mcz8/AGS_CustomRes_Beta10_fix_26dec2013.7z

The effect as on your screenshot takes place when the sprite is tagged as "hires" in lowres game (same occurs in 3.2.1 I think).

EDIT: Ohh, I seem to have fixed both engine & editor error (text size and sprite resolutions) with this fix (it was in the shared code).
Please tell if this works.


UPD:
Releasing source code for this build in the form of patches. Patches has to be applied on top of certain commit (https://github.com/adventuregamestudio/ags/commit/314535ca42bdc3ab0685390f121dc99dbc4d743d) of "feature_display_resolution" branch in our repository (this info included in the archive).
http://www.mediafire.com/download/769hg8p3995xbic/patch_temp_customres_beta10.7z
I remind that the code is temporary, and may be tad "dirty".
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: David Ostman on Thu 26/12/2013 14:44:37
I never had the issue with importing sprites that Calin had (they've always been imported fine) and now with the latest fix all the sprites are coming up as half size. Fonts are all right, though.

Before fix: http://imgur.com/wJotwrJ (http://imgur.com/wJotwrJ)

After fix:  http://imgur.com/rsqxlBk (http://imgur.com/rsqxlBk)

Re-importing the sprites doesn't help, but maybe there's something really obvious I've missed?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 26/12/2013 15:12:39
Quote from: David Ostman on Thu 26/12/2013 14:44:37
I never had the issue with importing sprites that Calin had (they've always been imported fine) and now with the latest fix all the sprites are coming up as half size.
Can you tell which game resolution you have?
The sprite has a "resolution" property, which may be confusing. Do you have it set to 320x200 or higher?
Does this error affect editor or engine, or both?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: David Ostman on Thu 26/12/2013 15:31:04
Quote from: Crimson Wizard on Thu 26/12/2013 15:12:39
Can you tell which game resolution you have?
I'm using a custom resolution of 640x360.
Quote from: Crimson Wizard on Thu 26/12/2013 15:12:39
The sprite has a "resolution" property, which may be confusing. Do you have it set to 320x200 or higher?
Ah yeah, that might just be it then. They are all at 640x400, 640x480, 800x600. Setting them to 320x200, 320x240 seems to make them the right size in game.

However importing new sprites they always come in tagged as 640x400, 640x480, 800x600.
Quote from: Crimson Wizard on Thu 26/12/2013 15:12:39
Does this error affect editor or engine, or both?
When the sprites have the "resolution" property of...
640x400, 640x480, 800x600 they appear half size in engine, but normal in editor.
320x200, 320x240 they appear normal size in engine, but twice as big in editor.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 26/12/2013 17:00:01
Quote from: David Ostman on Thu 26/12/2013 15:31:04
Quote from: Crimson Wizard on Thu 26/12/2013 15:12:39
The sprite has a "resolution" property, which may be confusing. Do you have it set to 320x200 or higher?
Ah yeah, that might just be it then. They are all at 640x400, 640x480, 800x600. Setting them to 320x200, 320x240 seems to make them the right size in game.
I forgot to ask, what is the size of sprite (average)?
I was thinking that if the sprite is designed for low-res (320x200/240) then it will be scaled up for hi-res (which is what seem to happen).
However I do not think they should be scaled down in any case... but I can be mistaken here, I need to look more into this.
This will be more clear if I know the original size of sprite image.

Quote from: David Ostman on Thu 26/12/2013 15:31:04
However importing new sprites they always come in tagged as 640x400, 640x480, 800x600.
This is becase your game is hi-res (640x360 counts as one, because lo-res is only 320x2** in AGS logic).


Quote from: David Ostman on Thu 26/12/2013 15:31:04
When the sprites have the "resolution" property of...
640x400, 640x480, 800x600 they appear half size in engine, but normal in editor.
320x200, 320x240 they appear normal size in engine, but twice as big in editor.
This blew my mind :(.
I need to make a test game in 3.2.1 and compare with custom resolutions build.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Fri 27/12/2013 08:40:10
Duh! Revising my code made me wonder what I was thinking.
Fixed again. Now your sprites should look correctly.
http://www.mediafire.com/download/31qq2883hg6i5c5/AGS_CustomRes_Beta10_fix_27dec2013.7z

There's a problem with sprites of different resolutions in wide-screen games: for example if you tag sprite as made for 320x200 and your game is 640x360, then the sprite will appear stretched horizontally. I guess AGS logic just never truly supported such resolution combinations. This should be revised in future. At the moment try to keep your sprites tagged with "hires" option for hires games.

Reupload source patches too: http://www.mediafire.com/download/pdmzddcczl2afai/patch_temp_customres_beta10.7z
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Calin Leafshade on Fri 27/12/2013 18:53:50
What distinction does ags make between sprites for different game resolutions?

Surely a pixel is a pixel, regardless of res. That stuff should be removed.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Fri 27/12/2013 19:00:37
Quote from: Calin Leafshade on Fri 27/12/2013 18:53:50
What distinction does ags make between sprites for different game resolutions?
I can only guess this was made for easier changing resolution of your WIP project, or importing graphics to projects with different resolution (so that you won't have to rescale graphics manually).
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: David Ostman on Sun 29/12/2013 11:08:58
Quote from: Crimson Wizard on Fri 27/12/2013 08:40:10
Duh! Revising my code made me wonder what I was thinking.
Fixed again. Now your sprites should look correctly.
http://www.mediafire.com/download/31qq2883hg6i5c5/AGS_CustomRes_Beta10_fix_27dec2013.7z
This sorted my issue perfectly. Thank you for looking into it! :) Sorry for not getting back to you earlier with answers, but these Holidays have kept me away from forums until now.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Wed 05/02/2014 11:50:44
After some thinking, here's new (already almost working*) winsetup for this build:

(http://imageshack.com/a/img32/2425/h93n.png)

*Needs polishing, also controls layout may change slightly.

Mode combo box and scaling slider are mutually linked, changing one should update another. I think slider should be disabled for fullscreen, because it makes less sense for it. For windowed mode some people will like to set scaling rather than calculate wanted resolution.
Slider tics mark integer multipliers (x1, x2, x3 etc). Scaling range is calculated for uniform (proportional) scaling only (so that both width and height fit).
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Radiant on Wed 05/02/2014 12:13:37
Looks nice, but you should maybe remove the "game resolution: 320x240" line because it seems to contradict the "1280x720".
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: DoorKnobHandle on Wed 05/02/2014 12:47:45
I would not remove the line because it's pretty nice to be able to find out what the game's native resolution is. Instead I would relabel it to make the difference between the game's native resolution and the display resolution more clear.

EDIT: Also, nice work Crimson. Not the approach I was having in mind for AGS and resolutions but nice work nonetheless!
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Snarky on Wed 05/02/2014 12:54:55
Hmmm... I like the idea of decoupling the filter from the scaling. But if the graphics mode and scale now literally control the same thing, wouldn't it be simpler to combine it into one drop-down, with entries like "x2 (640 x 480)"?

(I'm also confused about seeing 1280x720 rather than 960x720 in that box. So you're running the game with sideborders in a window? Confusing...)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Daniel Eakins on Wed 05/02/2014 13:21:58
Quote from: DoorKnobHandle on Wed 05/02/2014 12:47:45
I would not remove the line because it's pretty nice to be able to find out what the game's native resolution is.
That could be put in the game's description (on the AGS site, game site and/or readme file) along with the other technical information like color depth and stuff.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Wed 05/02/2014 13:27:15
Quote from: DoorKnobHandle on Wed 05/02/2014 12:47:45
Not the approach I was having in mind for AGS and resolutions but nice work nonetheless!
And what was your idea? Maybe yours better.

Quote from: Snarky on Wed 05/02/2014 12:54:55
But if the graphics mode and scale now literally control the same thing, wouldn't it be simpler to combine it into one drop-down, with entries like "x2 (640 x 480)"?

(I'm also confused about seeing 1280x720 rather than 960x720 in that box. So you're running the game with sideborders in a window? Confusing...)
The list has only the modes returned by graphics driver. These are basically fullscreen modes it supports. But in window mode you can usually have any random resolution, hence the slider.
I was considering to hide the list for windowed mode and display a label with resolution based on slider position.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: DoorKnobHandle on Wed 05/02/2014 13:32:56
Quote from: Crimson Wizard on Wed 05/02/2014 13:27:15
Quote from: DoorKnobHandle on Wed 05/02/2014 12:47:45
Not the approach I was having in mind for AGS and resolutions but nice work nonetheless!
And what was your idea? Maybe yours better.

I summarized it a while ago here (http://www.adventuregamestudio.co.uk/forums/index.php?topic=49149.msg636470584#msg636470584). I realize that it's not as simple to do as a (custom) winsetup program though and will take fiddling with the engine code. So, in the meantime, it's nice to have a better winsetup! :)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Wed 05/02/2014 13:40:23
Quote from: DoorKnobHandle on Wed 05/02/2014 13:32:56
I summarized it a while ago here (http://www.adventuregamestudio.co.uk/forums/index.php?topic=49149.msg636470584#msg636470584). I realize that it's not as simple to do as a (custom) winsetup program though and will take fiddling with the engine code. So, in the meantime, it's nice to have a better winsetup! :)
Oh, I see. Well, I am making this winsetup for this test build only, so that people could use GUI instead of typing options in text file.

Regarding the code, I am coming to a thought that the feature should be redone from scratch (for 3.4), keeping the WIP branch as a reference: it has a lot of redundant changes history now, because I wasn't sure about where to go at first.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 06/02/2014 13:13:04
Updated version:
http://www.mediafire.com/download/daidduo2hdn8z1k/CustomRed_RC.7z

This is built on top of 3.3.0 RC, added new winsetup.
Be careful and make a backup of your game before using this new build!

I made up my mind regarding how to organize the code, and now everything is in my personal repository, rather than central AGS one:
https://github.com/ivan-mogilko/ags-refactoring/tree/dirty_custom_resolutions
(Branch is called "dirty_custom_resolutions").
Later I plan to remake custom resolutions in 3.4.0, using this branch as a reference (unless better implementation proposed).
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Snarky on Thu 06/02/2014 15:40:06
I've been thinking about how to best present the setup options for the graphics (and looking at how other comparable applications do it, including ScummVM, Snes9x, and DOSBox/D-Fend Reloaded), particularly looking forward to being able to change these setting dynamically. And I wonder if the best thing isn't to separate out the settings for Windowed mode and Full-screen mode, since certain options only make sense for one or the other. So here's my idea:

Common settings/info:

Windowed mode:

Full-screen mode:

Potentially, the settings Graphics driver (?), Graphics filter (normal: nearest neighbor), Preserve aspect ratio (true), Window stretch (disabled), Scaling factor (for full-screen: Maximum fit) and Stretch to fit full-screen (true/false?) could all be hidden behind an "Advanced" mode, with sensible defaults as indicated. That way, a user would only need to select Scaling factor (for window), Resolution (for full-screen), and whether to run full-screen/windowed.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 06/02/2014 18:07:16
Reuploaded with fixes to WinSetup, also added "Keep aspect ratio" checkbox (under "Advanced").
http://www.mediafire.com/download/d4vz54sb4t33tma/CustomRes_3_3_0_RC.7z

@Snarky: I strongly disagree with using lists for scaling factor. Remember, we can have high resolutions, like 1280x720, which may only be scaled up to x1.5 on 1920x1080 monitor.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Snarky on Thu 06/02/2014 19:01:32
Just set it to "Scale factor:Maximum fit, Stretch to fit full-screen" (or leave it at these settings, as they should probably be the default).

IMO when you're getting into fractional scaling, you're in the realm of interpolated stretching, which is not the same thing as the basic upscaling filters. For example, if you have a 320x240 game and you scale it with hq3x to 960x720, you might still want to stretch that by x1.5 (=1440x1080) to fit a 1920x1080 monitor. But that's a separate operation from the hq3x filter: you're not scaling by "hq4.5x".

Therefore, I'm not convinced there's any need to provide fractional scaling factors as an option, and I think they confuse the issue. The only real use for them is to stretch the image to fill the screen, and that's provided by the "stretch to fit full-screen" checkbox. Or if you're running in a window, you could use "Window stretch: Interpolate" to resize the window to whatever size you like without worrying about whether it's 1.5 or 1.6 (this is how Snes9x works, for example).
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 06/02/2014 19:26:03
I feel like we talk about different things?
The scaling I was talking about was not the filter parameter, but the relation between window size and original game size. In the dialog I made I completely abandoned the filter scaling parameter.
Nearest-neighbour and linear (D3D9) filters are not restricted to integer scaling factor, they can use any factor, so they do not need anything set up for them (except for destination size, which is calculated from combination of window size and stretching mode). Hq2x and 3x have fixed 2x and 3x scaling factor, so they don't need any user parameter as well.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Snarky on Thu 06/02/2014 19:44:09
I think the simplest thing might be to refer back to this (http://www.adventuregamestudio.co.uk/forums/index.php?topic=47344.msg636461454#msg636461454) previous discussion.

The point still remains that there's no real need for setting non-integer scaling sizes in the setup.

-If you're playing in a window, you don't need it to take up the whole screen, and if you do want to set it to a non-integer scaling size, it's probably better to do that by just resizing the window yourself.
-If you're playing full-screen, the only non-integer scaling you care about is almost certainly stretching it to full-screen, no matter whether that's x1.5 or x1.667 (or x0.8, in case you need to shrink it).
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 06/02/2014 19:56:07
Uhhh... but AGS cannot resize window at runtime... so this all is about some future implementation?
Sorry, my brain is working slowly lately.
I added free scaling option specifically to address the problem of non-resizable window.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Snarky on Thu 06/02/2014 20:35:58
I see it as a forward-looking proposal. While it works fine with current AGS limitations, the real benefits would be realized once the graphics settings become more dynamic at run-time. And I took this comment to mean that you think that's a near-term improvement:

Quote from: Crimson Wizard on Wed 15/01/2014 21:53:02
Quote from: Snarky on Wed 15/01/2014 21:36:38
As for moving the settings into the script domain (as Calin suggests (http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636477863#msg636477863)), which I assumes means providing an engine API instead of winsetup, first: it requires the ability to change the settings "live" while the game is running, which AFAIK AGS can't currently do
Regarding what Snarky sais, my thoughts exactly, except for point 1; I think this problem may be solved.

I only know your current version from the screenshot in this thread, but to me it would seem that it has the following drawbacks:

-The Resolution and Scale settings (if I understand it correctly) affect each other in confusing ways.
-Setting "Graphics mode" based on detected screen resolutions doesn't really make sense in windowed mode (whether or not my screen supports 960x720, that's a perfectly valid graphics mode for a 320x240 game). In windowed mode, you're primarily interested in multiples of the native game resolution.
-If you switch between windowed and full-screen, you have to keep changing the scaling each time. (So it would need to be redesigned once it's possible to change this at runtime.)
-The "max scaling" doesn't really make sense for windowed mode. The max possible client area will be a bit smaller than the screen (by an amount that depends on many factors, including things like your Windows font size), will often be just below some nice integer value... and you don't want a window that big anyway.
-In fullscreen, you don't really care about non-integer multiples of the game resolution, apart from stretching to fullscreen (but for that, you probably don't care about the numerical value)
-There's no way to use e.g. hq3x and then stretch it further to fullscreen.
-There's no way to stretch to fullscreen without preserving aspect ratio (for people who really want to do that).

To be honest, I'm not convinced it's an improvement from the old version.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 06/02/2014 20:55:11
Quote from: Snarky on Thu 06/02/2014 20:35:58
I see it as a forward-looking proposal. While it works fine with current AGS limitations, the real benefits would be realized once the graphics settings become more dynamic at run-time. And I took this comment to mean that you think that's a near-term improvement:
I just mean that's possible to do :). But it will require rewriting the way drivers are created in AGS. Something I did not want to do right away.

Quote from: Snarky on Thu 06/02/2014 20:35:58
I only know your current version from the screenshot in this thread,
I changed how it works after your first comment. Now it looks like this:
(http://imageshack.com/a/img607/9707/puxy.png)(http://imageshack.com/a/img197/6853/cydx.png)

In fullscreen you set graphics mode. In windowed to drag slider and can see both scaling value and resulting window size.
The "scaling" is game size scaling factor, i.e. how much the game will be stretched to fill the chosen window size.
Switching from fullscreen to windowed and back corrects scaling/resolution automatically to match nearest supported value. This may be bit annoying, but currently I don't see other way to solve this.

Quote from: Snarky on Thu 06/02/2014 20:35:58
-The "max scaling" doesn't really make sense for windowed mode. The max possible client area will be a bit smaller than the screen (by an amount that depends on many factors, including things like your Windows font size), will often be just below some nice integer value... and you don't want a window that big anyway.
There's no "max scaling" option anymore. Also in windowed mode the maximal scaling factor is calculated taking (desktop size - some value) as a reference.

Quote from: Snarky on Thu 06/02/2014 20:35:58
-There's no way to use e.g. hq3x and then stretch it further to fullscreen.
I think there's a misunderstanding. The filter you select will be applied no matter what, then the image is stretched to the chosen resolution.

Quote from: Snarky on Thu 06/02/2014 20:35:58
-There's no way to stretch to fullscreen without preserving aspect ratio (for people who really want to do that).
There's a "Keep aspect ratio" checkbox in "Advanced" section,
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Snarky on Thu 06/02/2014 21:39:27
Mmmyes, that makes a bit more sense to me (and comes a little closer to what I proposed).

What does "320 x 200 x 8" mean? The scale isn't set to x8 on either of the images.

I'm not entirely clear on how the "Graphics mode" is meant to work, I guess. Let's say I have a 1920x1080 screen, and a game that's 320x200. At x5 (the highest possible integer fit), that's 1600x1000, which is not a supported resolution. For maximal sharpness, I'd like to play it in full-screen at my native desktop resolution, windowboxed. How (if at all) is that possible?

If you select a Graphics mode that has a different aspect ratio to your game, what is the scale set to?

And what are the other options under the Graphics filter menu?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 06/02/2014 21:46:09
Ok, I see, I did not add a way to make separate frame scaling inside the window. I just did not know how to do that easy to user.
I've been told over and over that users are confused by difficult settings. I am out of ideas how to do that properly.

I need to remake this version. Add scaling factors to config file, then make some kind of control to choose scaling amount for the filter.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Radiant on Thu 06/02/2014 22:24:14
Just to throw in some ideas, what I think would be easiest for the user is this:

On the setup screen, remove the line "game resolution: 320x200x8" and the line "scale: x2.0"; take the pulldown "graphics mode", rename it to "resolution" and fill it with the possible values (320x200, 640x400, 760x600 and so on). This is because a user presumably knows what his desktop resolution is, so he can pick the value that works best for him. Then have the pulldown for "graphics filter" pick between filters (NN, HQX, etc) but not magnifications (and this pulldown would be grayed out if the user picks 320x200 for a game that is 320x200, since that doesn't need any filters); it is to be expected that toggling the "fullscreen" checkbox may change the content of the pulldown menus. This avoids having multiple controls that do the same thing, as well as one control that does multiple things.

Even nicer would be the ability to resize the game window at runtime, but I can imagine that may be hard to code. Windows has a standard resize code that allows you to specify a minimum size; for a 320x200 game the window should not be smaller than that. Then, whenever the user resizes the window (including the maximize button) find the highest multiple that will fit, and center that in the window on a black background. For example, if the user drags the window corner to make it 700x700, then the game will pick 2x scaling and become a 640x400 game (with a 30-pixel border at the sides, and 150-pixel at top and bottom).

$.02
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 06/02/2014 22:37:13
Allegro windows cannot resize, library does not support that.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Radiant on Thu 06/02/2014 23:11:19
Ok, scratch that part then, I got a bit carried away :)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Snarky on Thu 06/02/2014 23:44:17
Quote from: Crimson Wizard on Thu 06/02/2014 21:46:09
Ok, I see, I did not add a way to make separate frame scaling inside the window. I just did not know how to do that easy to user.
I've been told over and over that users are confused by difficult settings. I am out of ideas how to do that properly.

“Everything should be made as simple as possible, but no simpler.”

I think offering the ability to set up the display options for all the possible conditions and preferences is inherently a complex problem. None of the apps I looked at for comparison (I also included video players like VLC and Media Player Classic) are "simple" in the sense of only having a few controls or settings. In fact, pretty much all of them have more settings to play with than AGS. (Of course, it's not given that these UIs are actually any good, but they'll at least be familiar to people who have had to do similar tasks before.)

In this situation, I think the most important thing is to make the controls logical and "task conformant" (the necessary steps should match the users' way of thinking about their goal), and to make the most common tasks quick and easy. This probably involves putting some settings on the "Advanced" screen, but shouldn't lead us to completely remove options that actually serve a useful purpose just because we think some users might find them confusing.

I guess the other thing I should mention is that I don't see big changes to winsetup as a high priority for AGS 3.3.x, and so I'm not so concerned with a stopgap solution as with a more longterm redesign.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Fri 07/02/2014 07:48:37
I need to make a winsetup for this build, because otherwise it is barely usable: users have to type display parameters into the config file.

So, from what other said:
1. The filter scaling should be integer, because fractional scaling may look bad. Stretching for max fit in fullscreen is optional.
2. There should be a way to play game having (possibly scaled) game frame in the center of a larger black fullscreen.
3. "Maintain aspect ratio" and "Stretch to fit full-screen" should only be available in fullscreen, because windowed mode is resized to correspond to selected filter scaling (is it?).
4. "Stretch to fit full-screen" only available if filter scaling does not support "max fit".

So, something like this:
(http://imageshack.com/a/img844/3274/vj2w.png)

With "Graphics mode" field removed for windowed mode, and scaling filter moved up on its place.
E: or maybe "Graphics mode" list replaced with label that shows window size, for the reference.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Gurok on Sun 09/02/2014 14:44:34
Hey CW, if you're going to redo winsetup, here are some ideas:

(http://i.imgur.com/w7yRlmv.png)

(http://i.imgur.com/BhWPqaQ.png)

This is only quick and there are a few options missing, but it's where I feel we should be heading. Feel free to ignore if this is too hard.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Sun 09/02/2014 16:03:55
Uhhhh... maybe. I don't know.
I did not want to spend too much time on this, because I am trying to get to other things... damn, I am completely confused without a strict plan. Again. I am not sure what I should be doing. I want to end with this temporary branch, and move to 3.4.0 and redo everything there in a more clean way.

Besides, the idea was to completely abandon built-in winsetup. In such case there's no sense spending too much time remaking existing one.
If you want, you may make a new setup program right away.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Sun 09/02/2014 16:28:32
Snarky, can you please explain, what's the relation between "Scaling factor - Maximum fit" and "Stretch to fit full-screen checkbox" in your concept? Are they mutually exclusive?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Sun 09/02/2014 16:48:01
No, sorry, I made up my mind and I won't do this, at all. I am going to leave this branch as it is now.

It can be used already, you can set any size of the window in both fullscreen and windowed. What you can't do is to have a boxed view in fullscreen, you can only have stretched to max version (either keeping aspect ratio or not).

My problem is that my mind got completely messed up when there are a lot of things coming at once, and I do not know what to choose and what to attend to, and just loose time wondering and remaining in uncertainty.
I need to focus on a single task.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Snarky on Sun 09/02/2014 21:50:13
That's fine. I actually assumed that this was already locked for v3.3 (as I said, I don't think messing with winsetup is really a high priority at this stage, precisely because so many of these things are stuff we have been talking about changing anyway). As for ditching winsetup completely, I thought you agreed that it would be better to have it around as an option, even if game makers are given APIs to set the configuration from within the game.

Quote from: Crimson Wizard on Sun 09/02/2014 16:28:32
Snarky, can you please explain, what's the relation between "Scaling factor - Maximum fit" and "Stretch to fit full-screen checkbox" in your concept? Are they mutually exclusive?

No, remember that in my concept, the scaling factor would only be integers, so by choosing that option and turning off Stretch to fit, you could have the (maximum fit) boxed view in fullscreen mentioned. Of course, if you have Stretch to fit turned on, it doesn't really matter which scaling factor you choose. It's possible that that's a weakness of the proposal.

Personally I like some aspects of Gurok's proposal, specifically having a visual indicator of what the settings mean. I'm not sold on the specific controls, but I suppose at this point I should make a mockup myself if I want to convince anyone.

Hope you don't mind us continuing the discussion, which isn't meant as a demand for you to go implement any of these designs.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: RickJ on Sun 09/02/2014 22:46:06
Quote
... game makers are given APIs to set the configuration from within the game.
This would make for max flexibility, move the problem from engine/editor developers into the realm of module makers.  Given that there are already modules that can read/write ini files what else in the way of API is required?  Wouldn't it be a sort of restart with the current game state preserved and the new ini settings?

I suppose it is easier said than done are most things. 
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Knox on Mon 17/02/2014 18:07:36
Congrats on releasing 3.3! Just wondering if you have any plans to get a newer custom resolution build released with all the 3.3 changes, etc? :grin:
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Mon 17/02/2014 18:22:40
Quote from: Knox on Mon 17/02/2014 18:07:36
Congrats on releasing 3.3! Just wondering if you have any plans to get a newer custom resolution build released with all the 3.3 changes, etc? :grin:

It is currently updated to 3.3.0 RC (new link in the first post), the only difference from 3.3.0 final is a 2.72 import bug; and I will update with 3.3.1 when it comes to that.

I am going to start remaking custom res in 3.4.0 branch soon, doing some pre-planning now. Hopefully that won't take too long, I will use this version as a reference and try to avoid mistakes I did here at first.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: hedgefield on Tue 18/02/2014 14:39:13
Hi Crimson, I tried to import a game I made with the old Skygoblin custom resolution build based on 3.2.1 and I get this error (well, first I got the custom res order so I changed it to 1024x768 temporarily but now I get this):

Quote
An error occurred whilst trying to load your game. The error was:

Input string was not in a correct format.

If you cannot resolve the error, please post on the AGS Technical Forum for assistance.

Error details: System.FormatException: Input string was not in a correct format.

   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)

   at AGS.Types.SerializeUtils.StringToResolution(String s)

   at AGS.Types.SerializeUtils.DeserializeFromXML(Object obj, XmlNode node)

   at AGS.Types.Settings.FromXml(XmlNode node)

   at AGS.Types.Game.FromXml(XmlNode node)

   at AGS.Editor.AGSEditor.LoadGameFile(String fileName)

   at AGS.Editor.Tasks.LoadGameFromDisk(String gameToLoad, Boolean interactive)

   at AGS.Editor.InteractiveTasks.LoadGameFromDisk(String gameToLoad)

Is it anything that looks familiar to you? Any advice for changing settings so that it would import, or is this a lost cause and should I stick to my old AGS build?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Tue 18/02/2014 14:54:38
I believed it may be theoretically possible to make import from 1280x720 Skygoblin's game automatic, but I never actually got to explore this path. It was a while since I saw Skygoblin's code, I need to check it again and see how that could be done.
Unlike engine, which reads binary data, and that may make things more difficult, Editor reads XML, and there are ways to override parsing, if you know how to detect the "non-standard" version.
(Unfortunately it seems no one who was making "custom" builds paid respect to setting the unique version id :-\, so we'll have to look for other opportunities).


BTW, in the worst case you may try manually edit "resolution" field in Game.agf (which is a plain XML). I wonder if that will work :); the rest of data formats should be just the same.


UPD: This does not look difficult actually. Interesting thing is that Skygoblin could not alter AGS.Native library, because it was not opensourced at that time (I think), so he did not change game format at all, instead his build reads game resolution from config file.

Meanwhile, hedgefield, here's what you can do.
0. Make a backup of your original project :)
1. Open Game.agf with any plain text editor (e.g. Notepad).
2. Search for those lines (should be at the top of file somewhere) and replace this:
Code (text) Select

<Resolution>CustomResolution</Resolution>
<CustomResolution>{Width=1280, Height=720}</CustomResolution>

with this:
Code (text) Select

<CustomResolution>1280, 720</CustomResolution>

(yes, first line should be erased)
That should work.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: hedgefield on Tue 18/02/2014 19:03:03
Crazy, that totally worked! The game loads up fine now and runs normally. It sounded like a more complicated problem, but yeah I guess it was lucky AGS wasn't opensourced back then. Thanks!

When I first imported the game, the editor made note of a SpeechCenter not being installed so its data would be removed; I'm not sure if that was an editor component? It doesn't seem like it screwed anything up yet.

And I have to say I like this implementation of custom resolutions a lot more than the skygoblin style. It makes more sense. The way it throws an error when the resolution of a room is smaller than the game's resolution is cool too, instead of awkwardly blackboxing it. It seems pretty stable so far but I'll report back if I find anything. Otherwise I can recommend absorbing it into the stable branch.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Tue 18/02/2014 19:30:23
Quote from: hedgefield on Tue 18/02/2014 19:03:03
When I first imported the game, the editor made note of a SpeechCenter not being installed so its data would be removed; I'm not sure if that was an editor component? It doesn't seem like it screwed anything up yet.
SpeechCenter is an editor plugin: http://www.adventuregamestudio.co.uk/forums/index.php?topic=45622.0
It should not change anything in game itself.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Knox on Thu 20/02/2014 01:48:12
Quote from: Crimson Wizard on Mon 17/02/2014 18:22:40
I am going to start remaking custom res in 3.4.0 branch soon, doing some pre-planning now. Hopefully that won't take too long, I will use this version as a reference and try to avoid mistakes I did here at first.

Awesome news! So basically if I've been using this custom resolution build for my game up until now, I can eventually switch to 3.4 when a version is ready?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Thu 20/02/2014 07:24:46
Quote from: Knox on Thu 20/02/2014 01:48:12
Awesome news! So basically if I've been using this custom resolution build for my game up until now, I can eventually switch to 3.4 when a version is ready?
It is in plan to keep them compatible, yes.

In the worst case scenario there may be a simple conversion tool (e.g. in a form of editor plugin) to import a project from alternate version. BTW, I am now considering this as a possible solution for importing from Skygoblin's version.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ali on Mon 24/02/2014 17:23:14
I'm afraid the current winsetup options work very poorly for a large game (1920 x 1080) that needs to be scaled down.

In windowed mode, instead of offering regular 16:9 resolutions (like 1600x900 and 1280x720) it offers weird fractions like 1536x864. Most of these seem not to be 16:9 and some run very slowly. In full screen mode, it also doesn't offer any of the common 16:9 resolutions (apart from 1920x1080).
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Mon 24/02/2014 17:52:49
Quote from: Ali on Mon 24/02/2014 17:23:14
I'm afraid the current winsetup options work very poorly for a large game (1920 x 1080) that needs to be scaled down.

In windowed mode, instead of offering regular 16:9 resolutions (like 1600x900 and 1280x720) it offers weird fractions like 1536x864. Most of these seem not to be 16:9 and some run very slowly. In full screen mode, it also doesn't offer any of the common 16:9 resolutions (apart from 1920x1080).
In fullscreen mode it supposed to offer the resolutions returned by DirectX or Direct3D driver. If you look into your display settings, will any more resolutions be present? Also, will that work if you set up wanted resolution manually (in config file)?

The windowed mode is not made well for downscaling, it seems...
Looks like I'll have to remake this after all. Just need to find time.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ali on Mon 24/02/2014 18:13:43
Yes, 1600x900 and 1280x720 are offered in Display > Screen Resolution. In fact they are highlighted. Weirdly, winsetup only shows the in-betweem resolutions which are not suited to a 16:9 display.

It works fine if I enter the values into the .cfg manually. Hope that helps!
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Knox on Sat 08/03/2014 15:43:49
Hi guys,

I hope its Ok to ask this, but I have to admit since learning the news that Crimson is leaving (btw thanks A LOT for all that you did!)...is this custom resolution build going to "stop" where it is? If so, it makes we a bit sad since Im not too sure now how I will continue my project (was hoping for limit removals too).

Does anyone know what will happen with this?:embarrassed:
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Sun 09/03/2014 16:22:38
I am thinking about this...
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Stacy Davidson on Tue 11/03/2014 04:24:33
I've been following this thread closely and I have actually begun to port Jack Houston and the Necronauts into the CustomRes branch. So far everything is working beautifully. The only issue I really have with it right now is the vsync. The scaling looks much better in D3D, but I really need to get rid of that screen tearing from the lack of vsync.

I'm really hoping this branch can be merged into the 3.4.0 and its features remain a part of AGS, as the 1080 resolution is critical for Jack Houston. Definitely waiting with bated breath to hear more. Thanks Crimson Wizard, this build is an AGS dream come true so far.

-s
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Problem on Mon 17/03/2014 10:13:58
I second this. We're currently developing a high resolution game with this build, and we couldn't be happier with it. It works like charm. :)
It would be awesome if the official version had this feature, and if games that were created with this build would be compatible.
Fantastic work here, this is definitely a step forward for AGS.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Mon 17/03/2014 10:39:46
It's good to hear that it's working...
I was preparing to merge this feature to 3.3.1 before I, um, decided to stop. Now I see that it wasn't good timing :(.
I think I can finish this one at least. Just need some time.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Problem on Mon 17/03/2014 11:03:43
No need to feel guilty Crimson Wizard, you've done so much for AGS, it's invaluable.
But yes, we'd be very grateful if this could be finished at some point. For now we're happily working with the custom build. Being able to design the game in any resolution, and even more important, being able to play it at any given resolution is just great.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Stacy Davidson on Thu 10/04/2014 17:27:05
Just wondering, how many of you are currently testing this branch? Has anyone had any issues with it? I'm getting great results so far. Other than minor annoyances like not being able to zoom out in the room editor for these huge screens, it's working like a charm for me.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Problem on Thu 10/04/2014 18:24:17
We're still using it, and haven't had any problems whatsoever. It just works. :)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Stacy Davidson on Thu 10/04/2014 21:11:02
Here's a screenshot from the new 1920x1080 AGS build of Jack Houston. Pretty amazing to see AGS looking this crisp!

(http://www.warbirdgames.com/Jack_Houston_CustomRes.jpg)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Dropped Monocle Games on Fri 11/04/2014 11:22:36
Quote from: Stacy Davidson on Thu 10/04/2014 21:11:02
Here's a screenshot from the new 1920x1080 AGS build of Jack Houston. Pretty amazing to see AGS looking this crisp!
wow, this looks beautiful!


I have had a play around with the custom res build everything seems to work fine apart from maybe being able to zoom out more on the rooms in the editor would be nice (but I can live without that :D )
I really want to use it for our next game, widescreen and HD!! it looks amazing, but I agree about the v-sync!
its great work Crimson, thank you :)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ralain on Fri 11/04/2014 20:20:53
Hello fellow adventurers,

I started using the custom resolution build and i encountered an issue i can't get around.
My game is now in 1280x720 resolution.
I use Direct3d in 32bit color.
I have this Gui "gPocketPC" that's 210x350

Before I passed to the Custom Resolution Build this line of code was working to center my Gui:

Code (ags) Select

//Center Gui
gPocketPC.SetPosition ((System.ViewportWidth/2-gpocket.Width/2), (System.ViewportHeight/2-gpocket.Height/2));


Now Ags can't start the game showing the message "GUI.X: co-ordinates specified are out of range"

It seems that above x coordinate 319 the problem appears..

I also have some problems understanding the native resolution for sprites, in the appearance properties.
I use the 640x400.. option for or else the Gui is too big.

I'm kind of a newb to Ags & scripting, maybe i missed something totally obvious?

P.S. Big thanks to Crimson & other developpers for their contribution to this excellent community


Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Fri 11/04/2014 21:13:37
Can you put those lines before that one and see what numbers will be displayed?
Code (ags) Select

Display("x = %d, y = %d", System.ViewportWidth/2-gpocket.Width/2, System.ViewportHeight/2-gpocket.Height/2);
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ralain on Fri 11/04/2014 21:27:54
Good evening Maester Crimson :)
Thank you for your reply.

After inserting your line the numbers displayed are x=535 and y=195

So the x should be right? 1280/2=640  210/2=105  > 640-105=  535
But as I mentioned, setting the x position of the Gui above value 319 is what gives the "out of range" message



Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Fri 11/04/2014 22:21:49
I made some research. It appears that before the first room is loaded, at the time of "game_start" call, the room size is considered to always be 320x200. All checks to room size made at that point check against that size.
This behavior is reprodicible in previous versions of AGS.

I guess there should not be such restriction for gui position at all (there's already an issue for this: http://www.adventuregamestudio.co.uk/forums/index.php?issue=444.0).

As a temporary workaround, reposition GUI only after first room is loaded.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ralain on Fri 11/04/2014 23:06:46
Thanks a lot, that did the trick.

I suppose i will have to put the code in every room then

edit:

I checked in my previous version (in build 3.2.1) , the code line was also in game start but there was no "out of range" issue > But that was because my game was 320x200
Now I understand why i thought it was related to the custom resolution build. Thanks again




Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ralain on Fri 11/04/2014 23:14:13
Here's a little pic of the culprit.


(http://i59.tinypic.com/2hs7qf6.jpg)




Your Ags magic is mezmerising, your impressively quick answers & help even more ;-D

Cheers!



Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: monkey0506 on Sat 12/04/2014 05:28:04
Quote from: Ralain on Fri 11/04/2014 23:06:46I suppose i will have to put the code in every room then

Since player.PreviousRoom returns -1 for the first room the player enters, you can just use on_event for this.

Code (ags) Select
// GlobalScript.asc

function on_event(EventType event, int data)
{
  if (event == eEventEnterRoomBeforeFadein)
  {
    if (player.PreviousRoom == -1)
    {
      // player entering the very first room upon loading the game
      // do stuff here
    }
  }
}
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ralain on Sat 12/04/2014 22:32:50
Thanks Monkey_05_06,

I'll look into that soon enough :)

For now, I have to sort an issue with GUI double clicks...(a friend of mine, Fitbo, posted our issue ->   Topic: Double Click on Button)

After that I'll study and use your advice.

Much appreciated!





Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Calin Leafshade on Sat 19/04/2014 19:41:55
EDIT: Nevermind, found the error.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Problem on Sat 19/04/2014 22:20:16
I just tested our game (1280x800, big alpha blended sprites) on an 8 years old office PC with onboard graphics and a 4:3 monitor. As expected, it worked, but it was too slow. However, scaled down to 800x600 (with sideborders) it was running smoothly and was perfectly playable.
So yeah, I just wanted to say how nice it is that the custom resolution build can run a game at lower resolutions than it was designed for. And how nice it is that this actually works as intended. ;-D
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Stacy Davidson on Tue 22/04/2014 00:46:21
So, is it still looking like this branch will be able to merge at some point? I'm getting pretty far developing with it and I thought I should probably ask to make sure that the intent at least is that taking my 3.3.0 RC project into a later merged branch will still be feasible.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Tue 22/04/2014 10:04:55
Quote from: Stacy Davidson on Tue 22/04/2014 00:46:21
So, is it still looking like this branch will be able to merge at some point? I'm getting pretty far developing with it and I thought I should probably ask to make sure that the intent at least is that taking my 3.3.0 RC project into a later merged branch will still be feasible.
I will copy latest 3.3.0 and 3.3.1 changes into this branch soon.
But I still want to remake this for "official" 3.3.1 in a slightly different way.
(it should still remain compatible)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: frenzykitty on Tue 22/04/2014 10:48:02
I'm so excited to see how this all comes together!
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Tue 22/04/2014 12:13:07
I didn't have much free time lately, but I will try to get back to this after a short while.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Stacy Davidson on Tue 22/04/2014 13:12:21
Awesome! Just making sure I was on the same page. You're doing great CW, thanks for all your hard work. We all owe you much gratitude!
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: frenzykitty on Tue 22/04/2014 16:54:41
Agree with Stacy! You are breathing new life into AGS and we are all incredibly grateful to you for that!
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Knox on Wed 23/04/2014 16:29:28
Quote from: Crimson Wizard on Tue 22/04/2014 10:04:55
But I still want to remake this for "official" 3.3.1 in a slightly different way.
(it should still remain compatible)

Ok so eventually this branch will no longer exist because it will be merged completely into 3.3.1? If so...very cool! :smiley:
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: frenzykitty on Thu 24/04/2014 09:10:58
Quote from: Knox on Wed 23/04/2014 16:29:28
Quote from: Crimson Wizard on Tue 22/04/2014 10:04:55
But I still want to remake this for "official" 3.3.1 in a slightly different way.
(it should still remain compatible)

Ok so eventually this branch will no longer exist because it will be merged completely into 3.3.1? If so...very cool! :smiley:

That would be paradise.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: frenzykitty on Thu 24/04/2014 12:29:07
Has anyone successfully built completed projects using this build? Want to investigate how safe it is before starting a project :)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Stacy Davidson on Mon 28/04/2014 23:52:55
I've ported most of Jack Houston over to it with no problems at all.  Also verified it on Linux and it runs fine.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Ali on Tue 29/04/2014 00:08:15
I've built a side project from scratch using it, with only a few editor-based glitches (which I've mentioned earlier in the thread). There are some performance issues, but I've experienced no stability problems.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: frenzykitty on Tue 29/04/2014 10:35:43
Do you think the vSync issue will be a realtively straightforward fix? :=
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Tue 29/04/2014 13:09:37
Quote from: frenzykitty on Tue 29/04/2014 10:35:43
Do you think the vSync issue will be a realtively straightforward fix? :=
Already fixed in 3.3.1 branch.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: frenzykitty on Tue 29/04/2014 13:52:52
That's great, but does that branch have your delicious custom resolutions? :D
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Tue 29/04/2014 18:14:44
Quote from: Crimson Wizard on Tue 29/04/2014 13:09:37
Quote from: frenzykitty on Tue 29/04/2014 10:35:43
Do you think the vSync issue will be a realtively straightforward fix? :=
Already fixed in 3.3.1 branch.
Quote from: frenzykitty on Tue 29/04/2014 13:52:52
That's great, but does that branch have your delicious custom resolutions? :D

I was saying that it is already known how to fix this.

Also, I said earlier that I plan to copy latest 3.3.0 and 3.3.1 changes into this version.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: frenzykitty on Tue 29/04/2014 19:31:59
Thanks for the clarification :)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Sat 17/05/2014 20:08:55
Just a small notification; I was rather busy lately, I tried to combine latest 3.3.0 and 3.3.1 branches with custom resolutions, but there were certain points that required attention (because some parts of code are conflicting). Unfortunately I am leaving the city for the couple of weeks and do not have time to test results.

I should be back around the beginning of June, then I'll make those updates.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Mehrdad on Sun 18/05/2014 08:19:21
Thanks a lot CW. We are waiting for this great update :) 
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: frenzykitty on Sun 18/05/2014 08:22:50
Thanks CW! Have a great trip! And thanks again for all the amazing time and energy you are putting in to AGS! Looking forward to the update
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: declerfayt on Wed 28/05/2014 00:36:42
Thanks so much for this addon Crimson Wizard. I used for about 2 months now, and it's stable. No single crach or any problem using it. 1080p graphics rocks! :-D
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: declerfayt on Wed 28/05/2014 00:46:45
One observation though: to make my game's trailer (http://www.youtube.com/watch?v=_KDSpLLOvV0), I've video captured the game with Camatasia while I was playing it. Full-screen capture leads to a black video, although windowed capture worked perfectly. Do you think is it because of the Custom Resolution Build or would it happen also with the canonical 3.3.0? Or maybe the problem came from Camatasia and my PC?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Sun 22/06/2014 22:20:43
Merged custom resolutions build with 3.3.0 update1 (of 1st May 2014):
http://www.mediafire.com/download/a1j4yu57gi46w2r/CustomRes_3_3_0_update1.7z
Also updated links in the first post.

I'll try to make a version merged with early-3.3.1 in following days (I don't think there will be any problems).


Quote from: declerfayt on Wed 28/05/2014 00:46:45
One observation though: to make my game's trailer (http://www.youtube.com/watch?v=_KDSpLLOvV0), I've video captured the game with Camatasia while I was playing it. Full-screen capture leads to a black video, although windowed capture worked perfectly. Do you think is it because of the Custom Resolution Build or would it happen also with the canonical 3.3.0? Or maybe the problem came from Camatasia and my PC?
I have no idea, sorry.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Calin Leafshade on Sun 22/06/2014 23:05:43
When will this be merged with master so the ports can take advantage of it?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Crimson Wizard on Sun 22/06/2014 23:36:38
Quote from: Calin Leafshade on Sun 22/06/2014 23:05:43
When will this be merged with master so the ports can take advantage of it?
This is already merged with master (technically), just not in the "official" repository:
https://github.com/ivan-mogilko/ags-refactoring/tree/dirty_custom_resolutions

Regarding "official" version, some time ago I decided to rewrite the code to make things bit cleaner and slightly different way; I am in the process of doing so.
Also, mobile ports require updating OpenGL renderer, which is still incomplete. (OTOH, they may still work if no scaling filter used)

Title: Re: [TEST] Custom Resolution build (based on 3.3.0)
Post by: Mehrdad on Mon 23/06/2014 16:07:59
Thanks a lot CW.This version is a big revolution in AGS.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Crimson Wizard on Sat 28/06/2014 17:50:53
Preliminary version based on 3.3.1 alpha (http://www.adventuregamestudio.co.uk/forums/index.php?topic=50162.0).
Warning: 3.3.1 contains new features and had not yet underwent much public testing.
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

(Links also added to the first post).
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Problem on Sun 29/06/2014 21:00:51
Thanks, Crimson Wizard! I just gave it a go, and so far everything seems to work. :)
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Knox on Mon 30/06/2014 01:01:06
Quote from: declerfayt on Wed 28/05/2014 00:46:45
One observation though: to make my game's trailer (http://www.youtube.com/watch?v=_KDSpLLOvV0), I've video captured the game with Camatasia while I was playing it. Full-screen capture leads to a black video, although windowed capture worked perfectly. Do you think is it because of the Custom Resolution Build or would it happen also with the canonical 3.3.0? Or maybe the problem came from Camatasia and my PC?

I have the same problem currently as well. Windowed mode the video plays fine, but in fullscreen the screen remains black. My game is 1600x900, the video is 1024x768 wmv.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: David Ostman on Mon 30/06/2014 13:07:19
I don't think it's an issue with AGS. As far as I know, Camtasia was never meant to record games, so it won't record them unless you use the mentioned workaround of Windowed mode.

There's dedicated software to record games, such as Fraps, Bandicam, and dxtory. These should all work fine in full screen.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: orient on Sun 27/07/2014 03:32:01
I downloaded the '3.3.0 Update 1' build but I'm struggling to completely understand it. I've read this whole thread but to no avail. Am I correct in thinking that this build does not increase the native game resolution options located in General Settings?
(http://gamescrawl.com/images/ags-res.gif)

So you can now set your window to HD resolutions in winsetup, but the game itself is still limited to a max of 1024x768? Sorry for the noob question, but I've been trying all sorts -- importing 720p backgrounds, messing around with winsetup and getting all kinds of weird results / crashes.

Thanks a lot.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Crimson Wizard on Sun 27/07/2014 12:29:55
Quote from: orient on Sun 27/07/2014 03:32:01
I downloaded the '3.3.0 Update 1' build but I'm struggling to completely understand it. I've read this whole thread but to no avail. Am I correct in thinking that this build does not increase the native game resolution options located in General Settings?
"Custom Resolutions" and "3.3.0 Update 1" builds are not the same. "Custom resolutions" version allows to select any native resolution. That's why they are distributed separately. You can download CR using links in the first post of this very thread.
Currently there are two alternatives: a CR version based on "3.3.0 update 1" and CR version based on "3.3.1 alpha".

Quote from: orient on Sun 27/07/2014 03:32:01
Sorry for the noob question, but I've been trying all sorts -- importing 720p backgrounds, messing around with winsetup and getting all kinds of weird results / crashes.
If you have any crashes, please report them, there might be a bug.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: orient on Mon 28/07/2014 11:24:00
Thanks CW, now I understand :) I got 720p working straight away, but I'm getting some very strange behaviour when I open winsetup. The window closes by itself after about 10 seconds, then reopens, sometimes a couple of times, then I get the error "This program might not have installed correctly. If this program didn't install correctly, try reinstalling using settings that are compatible with this version of Windows". I'm using Windows 7. I've never had this problem before with AGS, although I have just installed a new anti-virus program, Avast. I might have to disable it and see if that makes a difference because it has been causing some other problems.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Crimson Wizard on Mon 28/07/2014 12:27:25
Quote from: orient on Mon 28/07/2014 11:24:00I'm getting some very strange behaviour when I open winsetup. The window closes by itself after about 10 seconds, then reopens, sometimes a couple of times, then I get the error "This program might not have installed correctly. If this program didn't install correctly, try reinstalling using settings that are compatible with this version of Windows".
I am getting those messages for every AGS game I download in zip file (without installer)... answering "It's installed correctly" solves this.
I think this is simply a part of Windows protection against potentially dangerous downloads.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Gurok on Mon 28/07/2014 12:39:19
It's the Program Compatibility Assistant. It's possible to turn it off (http://www.sevenforums.com/tutorials/70829-program-compatibility-assistant-enable-disable.html), but the real question is why AGS games are being detected as installers.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: DoorKnobHandle on Mon 28/07/2014 14:00:30
It's not the games for me usually, it's winsetup.exe so my guess is because it has the word setup in the name?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Crimson Wizard on Mon 28/07/2014 14:16:00
Quote from: DoorKnobHandle on Mon 28/07/2014 14:00:30
It's not the games for me usually, it's winsetup.exe so my guess is because it has the word setup in the name?
Yes :)
I took a random program and renamed executable to "setup.exe". Upon exiting, Windows displayed the message :).

I wonder, if Windows expects particular return value or something?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Radiant on Mon 28/07/2014 16:54:49
Quote from: DoorKnobHandle on Mon 28/07/2014 14:00:30
It's not the games for me usually, it's winsetup.exe so my guess is because it has the word setup in the name?

Seriously?

Come on microsoft, that is completely silly.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Knox on Thu 07/08/2014 17:23:47
I'm not sure if this was mentioned before, but is it a normal editor behavior when an error happens while testing the game and the call stack pops up but closes the output window? It seems then that informative error messages don't get displayed at all making it hard to know what went wrong other than getting the line that causes the error (via the stack window).
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Crimson Wizard on Thu 07/08/2014 18:29:28
Quote from: Knox on Thu 07/08/2014 17:23:47
I'm not sure if this was mentioned before, but is it a normal editor behavior when an error happens while testing the game and the call stack pops up but closes the output window? It seems then that informative error messages don't get displayed at all making it hard to know what went wrong other than getting the line that causes the error (via the stack window).
Hmm, can it be that the stack window simply overlays message window? When this happens try unpinning the Stack window and moving it around. Also, check "Window" menu and try turning "Output" on & off.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Knox on Fri 08/08/2014 15:30:23
Ok so I did a few tests, and if I unpin the stack window and place it at the bottom, and have the output window pinned as well, I can finally see the message window when there are errors...however (for me anyways), the output window and call stack tabs then disappear and I have to go back and reselect then in Window>Output/Call Stack.

Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Crimson Wizard on Sun 10/08/2014 21:20:10
Quote from: Knox on Fri 08/08/2014 15:30:23
Ok so I did a few tests, and if I unpin the stack window and place it at the bottom, and have the output window pinned as well, I can finally see the message window when there are errors...however (for me anyways), the output window and call stack tabs then disappear and I have to go back and reselect then in Window>Output/Call Stack.
I think it is better to report this to tzachs. Panels are his work, and I doubt this is specific to Custom Resolutions build.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: UnusualCadence on Sun 17/08/2014 00:30:02
I've been playing with the new resolutions - very impressed with it indeed! AGS looks quite beautiful in 1080p :) It seems to be very flexible and robust scaling upwards and downwards, so you have my full thanks for making headway on one of the biggest things holding AGS back!

Are there any major bottlenecks I should be aware of in terms of rendering at higher resolutions? I'm assuming that the D3D9 mode is hardware accelerated, and graphics cards these days shouldn't have any issues... but all the same, there might be something I'm unaware of.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Calin Leafshade on Sun 17/08/2014 02:22:47
The main issue is the size of the sprite cache. Large sprites take up a lot of memory and this can thrash the cache.

The other major issue that all user drawing (i.e on custom surfaces) is not hardware accelerated and is thus really slow.

Another minor issue is the lack of sub-pixel rendering so you cant move things very smoothly.
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: UnusualCadence on Sun 17/08/2014 15:26:50
Does setting the Sprite Cache option in winsetup to it's highest setting help with the thrashing? 100mb of memory doesn't seem so unfair to reserve these days.
Playing around with some walking animations and jerky movement is apparent with MovementLinkedToAnimations set to True (and looks weird if set to false!). Not the end of the world or anything, might even be diminished with adjusting the delay per frame. Either way, big improvement!
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Knox on Sun 17/08/2014 16:09:00
QuoteI think it is better to report this to tzachs. Panels are his work, and I doubt this is specific to Custom Resolutions build.
Ok, I'll check it with tzachs. Thanks!

@Calin: We can increase the sprite cache by setting the cachemax in the acsetup.cfg file to something larger, right? Or is it more complicated than that?
Title: Re: [TEST] Custom Resolution build (based on 3.3.0 / 3.3.1)
Post by: Crimson Wizard on Sun 17/08/2014 18:21:06
Quote from: Knox on Sun 17/08/2014 16:09:00
@Calin: We can increase the sprite cache by setting the cachemax in the acsetup.cfg file to something larger, right? Or is it more complicated than that?
The bigger problem is that AGS does not provide normal means to precache animations. This may slow game down when the specific animation starts to play for the first time if animation is long and sprites have high resolution. That's happening because AGS actually loading sprites on fly from the file.

The workaround is to force AGS load sprites before they are actually used in game. I never experimented with this myself, but I think that this may require doing some dummy operation over sprite, like reading a random pixel from it, or something.
If you look at "Anna's Quest" (http://www.adventuregamestudio.co.uk/site/games/game/1622/) game, it does sprite precaching before the game start, although it seems that alot of sprites are processed at once, and it's taking inconveniently long time. I believe it is possible to do more optimal precaching by processing only those sprites that may be needed in current room or a sequence of rooms.