Implementing support for widescreen resolutions

Started by kingstone, Mon 25/04/2011 13:17:27

Previous topic - Next topic

kingstone

Hi guys! My name is Mathias and I work with Theo at SLX Games. I'm new to these forums but have plenty of game programming experience and I've been playing around with AGS from time to time over the past couple of years.

There are a bunch of threads discussing new widescreen resolution features (for example here, here, here, here and here) and rather than reiterating the suggestions and proposals I'd like to present the problem, and a possible solution, from our point of view.

At SLX Games we're now busy working on the HD version of the first chapter of the Journey Down which is set for release in Q4 2011. In order to keep this commercially viable we need to target a wide range of platforms and resolutions. AGS has proven to be extremely powerful in placing creative control right at the fingertips of the main game designer (theo, that is) and thus cutting us coders out of the loop and freeing us up for other work. Hopefully, we can keep AGS at the center of the development process but in order to target more platforms and resolutions we have to consider other alternatives. Probably there's already a bunch of people and game studios on these forums who are stuck in the same dilemma when thinking about monetizing their AGS games. So how can we fix this?

Since AGS has freed some time for the programmers at SLX we have the capacity and expertise to extend AGS with new resolution modes and, in the long run, additional features that can open up for targeting more platforms. No matter what, we'll have to spend a lot of time and effort this year making the Journey Down run on different platforms but extending AGS is preferred since it allows us to keep our current production pipeline intact. In addition, if we contribute our work to the AGS community, it will also enable better ways for all AGS developers to capitalize on their work. This is only possible if the AGS source code (not just the editor) is released as open source, which has been discussed a lot recently. We're therefore hoping that CJ will decide to open source AGS so that we can join hands and implement further improvements that will benefit everyone. How has the development progressed since the 3.2 release, is there any new code in place for handling arbitrary resolutions? If possible, our company is willing to commit a great deal of 9-to-5 helping out and implementing new features.

Not a small request for a first post, I know :)

Wyz

In my opinion this is the top priority for AGS improvement at this moment. For one of my projects (that isn't even conceptualized ;D) I was thinking about releasing a low resolution version as free-ware but offer a HD version that can be bought. I know more developers are playing with this idea, and it would be awesome if AGS would support this, and vital if it want to stand the time.

There is however might be a problem: what ever resolution you make available, there will always new resolutions out there, en some screens simply refuse certain resolutions. Also the net-book/smart-phone generation gives us yet another spree of awkward resolutions.

My solution for this problem: enable any resolution, simply let the developer pick the width and height of the screen they want to us. The problem that screens refuse to show it full screen can be solved by a system that detects the closest matching available resolution and fills the rest of the screen with a letterbox. Another possibility would be: allow the developer to access the dimensions of the closest matching resolution in scripts so it might change the GUI or use other means to fill up the black areas. I don't know how feasible it is, but since AGS already scrolls background that as bigger then the screen it would be a really elegant method.
Life is like an adventure without the pixel hunts.

GarageGothic

I realize it could be a problem for pixel-artists (though could perhaps be solved with a non-blurry scaler), but as I see it the only thing that would really make sense would be to let the developer choose an aspect ratio and develop the game using a virtual resolution for screen coordinates. Then let the end-user choose the resolution based on whatever his hardware supports and have the game render the graphics scaling them whichever way and adding black bars if the aspect ratio is unsupported.

I'm also willing to put a huge effort into improving AGS since I plan to use it for a whole bunch of games in the future. Though my coding skills are kinda rusty I've been looking into replacing AGS' renderer for a while now, so the moment the source is opened up I'll be testing out my ideas. (Original plan was a plugin, but when I realized there was no way to override the viewport initialization it didn't seem worth the while).

Ali

I support this wholeheartedly!

To make it easier to adapt to older games to new resolutions, could I suggest that the editor allow users to change the size of a backdrop without losing all of the regions and walkable areas? Ideally, the editor would allow you to scale rooms and then replace the backdrop with one at a different resolution.

There is probably a workaround by displaying walkable areas in the editor, print screening, scaling up the walkable area image and importing it into AGS again, but that would take an age...

subspark

Wow. I haven't posted in a while.  :P

I too am in firm agreement with the compelling desire to improve on many of AGS's rendering capabilities. Several commercial opportunities have arisen for us with AGS prominently in mind but after just one initial test, we faced no alternative but to move on.
I think AGS really needs that facelift we began discussing two years ago, now more than ever.

Calin Leafshade

oh blah blah blah.

This has been discussed *repeatedly*.

We just need to wait for CJ to release the source.

And even if he did so tomorrow it would still be a very long time before anyone actually bothered to implement any of these new features.

The audio stuttering had been a problem for literally *years* and no one bothered to fix it even though it was perfectly possible to do so via the plugin system. Ditto the alpha blending problem.

Patience.

Dualnames

And while we're on the ranting side, THOSE BLOODY +'s CAN I SERIOUSLY TAKE THOSE OFF!!?? First those buggers took the highlight and now they make selecting lines a real bitch, so please allow turning on and off of those.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

DoorKnobHandle

Hmm, I have thought about the situation for a bit and here is my proposition regarding AGS's resolution capabilities:

- we need reliable 'blocky' scaling in all graphic modes, ie. an algorithm (shader) that doesn't AA or blur pixels when stretching up or down.
- the developers need to stay in charge of all settings
- this new proposed system would overwrite the current system, this could go hand in hand with an updated setup application (maybe one you can rename and have look better)

In a nutshell, the developer, in AGS's general settings pane, can set an original 'development resolution', any aspect ratio, any dimensions, any numbers - that is the resolution that all one screen rooms are and so on. Coordinates would no longer make a difference between 320x200 and 640x400 double pixels as some (older?) functions did, pixels are actual on-screen pixels. Also, the developer can decide whether or not to force the game to always run at this resolution (and give a fatal error when the hardware doesn't support), set boundaries or possible scalar values or even allow any scale (aspect ratio always, under any circumstance stays the same as the development resolution but letterboxing to any higher resolution - and maybe cropping to lower ones - can, if the dev allowed this in AGS, brought in). Again, if the end-user hardware doesn't support any possible resolution, a fatal error is reported. By itself, all games would by default try to run in the development resolution.

Basically, the developer can set a number of rules... Allow players to change resolution away from the original at all? Allow them to choose any new scale or limit it? Allow them to add vertical, horizontal or both kinds of black bars? Allow them to crop the resolution down? What scaling algorithms are allowed?

This means, with all that control, some game makers might screw up and, for example, make a 320x200 game and disallow people to change the resolution but people will, in those cases, complain very quickly and let them know to re-release their title with re-sizing enabled.


Are there any big problems (in theory) with this approach?

subspark

Quoteoh blah blah blah.

Yup! I'm definitely back on the AGS forums! :D
Did everybody have a lovely Easter? Or did someone miss out completely on a love producing substance called 'Chocholate'? ;D

Here, I bring you a small Easter Fortune, Mr Leafshade!

Love and shnuggles,
Sparky.  ;)

kingstone

Glad to see all the response in this thread :)

I think we have rather similar thoughts on how we want resolutions to work (i.e. fixed aspect ratio with dynamic customizable resampling and letterboxing) though we'll probably want to define a roadmap of some sort to coordinate future releases.

Calin & Dualnames: I understand your frustration but I believe you're viewing this from the wrong point of view. I did not start this thread to repeat feature requests but to offer help in implementing them. Try to see it from our point of view. We make our living making games and that means we work on tight schedules to meet our deadlines. Therefore we don't have the time to focus on things that will not profit our business, but we gladly share our work if it can benefit others. That said we'll probably not address your audio-stutter issue because afaik it does not affect our game.

Widescreen resolution support, on the other hand, is a deal breaker which affects our choice of development environment. We need to start working with this shortly in order to finish the game by the set release date and that is why we need to know if AGS will be open sourced soon. If we get hold of the source code then better screen resolution support will be implemented asap because it is necessary for all JD development. If not, we'll develop JD using other tools.

In other words we can't promise to implement anything except for what we need for our game. In case we want to reuse the rooms from the JD prototype version we'll probably implement automatic resizing of walkable areas and regions like Ali suggested, but if we decide to recreate the rooms we probably wont bother. But that's the beauty of open source. You just have to contribute the bits that you require yourself because the magic happens when we all fit our pieces together ;D

GarageGothic

#10
Quote from: kingstone on Tue 26/04/2011 17:10:20You just have to contribute the bits that you require yourself because the magic happens when we all fit our pieces together ;D

I'm gonna use that as a pick-up line sometime!  :=

Edit: Have you looked into any solutions yet? As far as I understand, one of the main issues with making AGS cross-platform is its dependence on Allegro. Perhaps it's time for a more modern and platform-agnostic graphics library? I remember checking SFML out, but I can't recall if I came across any negative points to it - but I have a list somewhere with the observations I made about each of the 2D and 3D renderers I researched.

tzachs

Quote from: kingstone on Mon 25/04/2011 13:17:27
We're therefore hoping that CJ will decide to open source AGS so that we can join hands and implement further improvements that will benefit everyone.
According to my understanding, you don't have to worry. CJ has already decided to open source the engine, it's just that unlike the editor, the code for the engine is a mess, and he needs to clean it up first (and it's better that way).
As to when it will happen, you're guess is as good as mine, but my guess is that it could take some time.
So yeah, as Calin already pointed out in his endearing way (;)), patience here is needed.

Quote
If possible, our company is willing to commit a great deal of 9-to-5 helping out and implementing new features.
That's great news, after I've seen what you're capable of, I'm sure you'll make some great additions.
And welcome to the forums!

subspark

QuoteAs to when it will happen, you're guess is as good as mine, but my guess is that it could take some time.
Not as long as you thought. The engine source was made available yesterday at 11:55 AM GMT+1:00)
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=43383.0

Enjoy the wondrous freedom of a completely open source engine! ;)
Sparky.

Sslaxx

Quote from: GarageGothic on Tue 26/04/2011 17:28:56
Quote from: kingstone on Tue 26/04/2011 17:10:20You just have to contribute the bits that you require yourself because the magic happens when we all fit our pieces together ;D

I'm gonna use that as a pick-up line sometime!  :=

Edit: Have you looked into any solutions yet? As far as I understand, one of the main issues with making AGS cross-platform is its dependence on Allegro. Perhaps it's time for a more modern and platform-agnostic graphics library? I remember checking SFML out, but I can't recall if I came across any negative points to it - but I have a list somewhere with the observations I made about each of the 2D and 3D renderers I researched.
Allegro 5 is plenty modern enough. I suggest the first thing to do is get the code working with that maybe?
Stuart "Sslaxx" Moore.

Calin Leafshade

Agreed. Allegro 5 is perfectly adequate for the job.

theo

Quote from: subspark on Wed 27/04/2011 14:44:06Enjoy the wondrous freedom of a completely open source engine! ;)

Sweeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeet

tzachs

Quote from: subspark on Wed 27/04/2011 14:44:06
QuoteAs to when it will happen, you're guess is as good as mine, but my guess is that it could take some time.
Not as long as you thought. The engine source was made available yesterday at 11:55 AM GMT+1:00)
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=43383.0
Boy, I'm more wrong than right these days... though happy to be wrong in this case.  :D

Knox

Im guessing an "engine feature request" thread will pop-up/resurface soon?

:)

Awesome news for the community!! Yes!!
--All that is necessary for evil to triumph is for good men to do nothing.

kingstone

Wow that was a quick turn of events  :)

Quote from: GarageGothic on Tue 26/04/2011 17:28:56
Edit: Have you looked into any solutions yet? As far as I understand, one of the main issues with making AGS cross-platform is its dependence on Allegro. Perhaps it's time for a more modern and platform-agnostic graphics library? I remember checking SFML out, but I can't recall if I came across any negative points to it - but I have a list somewhere with the observations I made about each of the 2D and 3D renderers I researched.

Quote from: Sslaxx on Wed 27/04/2011 16:25:52Allegro 5 is plenty modern enough. I suggest the first thing to do is get the code working with that maybe?

Agreed, I think we should stick to Allegro while improving resolution support. Let's dig into the code and see how complex this will be.

By the way, where will the development of the AGS engine and editor be discussed? Perhaps we should have another forum board to separate the technical discussions about using AGS from the ones about developing AGS?

GarageGothic

#19
Quote from: Sslaxx on Wed 27/04/2011 16:25:52Allegro 5 is plenty modern enough. I suggest the first thing to do is get the code working with that maybe?

Ah, that could be very true. When I researched code libraries last year Allegro 5  didn't yet have a stable release so I didn't even look into. But as far as I understand it's a vast improvement so indeed, Allegro 5 should be fine. Kind of a shame it doesn't have unified cross-platform 3D functionality though, but I know that's not a concern to most people.

SMF spam blocked by CleanTalk