DispResEx for Adventure Maker

This forum is meant for announcing new plugins, downloading other people's plugins, posting questions, etc.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

DispResEx for Adventure Maker

Postby time-killer-games » Tue Dec 05, 2017 5:55 am

ChangeDisplayResolutionEx Plugin v1 by Samuel Venable

This plugin allows you to change your screen resolution to a custom value.
It only works if the inputted width / height is supported by your monitor.
You may optionally adapt the window to frame's background picture size.
Adapting the window allows you to resize it relative to the current picture.

100% free, open source, and public domain.
*.ocx made with Visual Studio 2017 Community.
Source code was written in C++ (MFC).

DOWNLOADS


IMPORTANT NOTE

This plugin under-the-hood relies on looping timed events for every frame, so whenever you remove timed events with code, you shouldn't assume the timed events you created are the only ones floating around.

In other words, instead of doing this:
Code: Select all
CreateTimedEvent ...


And this:
Code: Select all
RemoveTimedEvent 1


You should store the timed events you create in a variable, like so:
Code: Select all
TimedEventVar = CreateTimedEvent ...


And then remove it like this:
Code: Select all
RemoveTimedEvent TimedEventVar


You can replace "TimedEventVar" with whatever variable name suits your needs.

If you aren't dynamically removing timed events with code in your project, then you won't need to worry about this, and you can then use the plugin without compensation. I'm going to be working on a new version soon that will hopefully no longer rely on Adventure Maker's timed event system, but until then, keep this stuff in mind.

Cheers!
Samuel
Last edited by time-killer-games on Fri Dec 15, 2017 2:04 am, edited 8 times in total.
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: DispResEx for Adventure Maker

Postby time-killer-games » Wed Dec 06, 2017 12:55 am

Just released version 1.1.

It uses the same ActiveX Control (*.ocx file) as v1.0, so you won't need to uninstall/re-download/reinstall that file.

All you need to do to update is simply download the new *.pl1 file and replace it in your Adventure Maker shared plugins folder.

This update fixes 2 critical bugs regarding frame placement.

Enjoy!
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: DispResEx for Adventure Maker

Postby reneuend » Wed Dec 06, 2017 3:08 am

So, does this mean higher resolutions can be obtained? :shock:
Great plugin!
Thank you for adding this to the AM collection!
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2689
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: DispResEx for Adventure Maker

Postby time-killer-games » Wed Dec 06, 2017 3:30 am

reneuend wrote:So, does this mean higher resolutions can be obtained? :shock:


Yep! That it does. All my computers I've tested so far support 1280x1024, and I'll be sure to test that out on a few more PC's, to make sure it's reliable enough for people to use in their games, and I'll post my results here once I've done that.
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: DispResEx for Adventure Maker

Postby time-killer-games » Wed Dec 06, 2017 5:46 am

Version 1.2 released! Scripting is no longer required! (But it still can be done if prefered).

Added a new argument to the function, now it looks like this:

Code: Select all
ChangeDisplayResolutionEx Width, Height, IsPanoramicFrame

Or, if you prefer to not write code, you can use the plugin tab of the frame properties window.

Now compatible with panoramic frames! It's as easy as checking a checkbox in frame properties or writing True for IsPanoramicFrame.

Note you will need to uncheck that checkbox or set IsPanoramicFrame to False on frames that aren't panoramas - which is the default.

Cheers!
Samuel
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: DispResEx for Adventure Maker

Postby time-killer-games » Wed Dec 06, 2017 9:01 pm

This isn't a new version of the plugin itself, but I did make a slight change to the Demo Executable and Example AM Project; now one of the sample resolutions you can quickly test is 1280x720, and this resolution seems to be a lot more widely supported on monitors than 1280x1024, (a lot of monitors don't have a height of 1024 or more, I've come to realize). If you want a higher resolution, 1280x720 is probably your best bet, and most if not all modern desktop/laptop monitors support this resolution. I especially recommend this one because it has a 16:9 aspect ratio, which is very popular among games nowadays. (In the Example AM Project I list it as one of the "not recommended" resolutions only because AM's manual seems to say that for anything greater than or equal to 1024x768).
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: DispResEx for Adventure Maker

Postby time-killer-games » Mon Dec 11, 2017 11:01 am

In the process of adding support for games that switch in and out of windowed mode. Almost done! Just a few more tweaks... :mrgreen:
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: DispResEx for Adventure Maker

Postby reneuend » Mon Dec 11, 2017 4:12 pm

Very good news. Thanks for your hard work.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2689
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: DispResEx for Adventure Maker

Postby time-killer-games » Tue Dec 12, 2017 12:18 am

I'm a little stuck on something. Well, 2 things actually, that I'm getting a serious migraine over, just trying to figure it out. I'm continuing to work on it in the meantime, but if anyone would like to try to help, send me a PM and I'll give you what I currently have, and hopefully you can help. You'll be mentioned in the credits if any of your code is used in the next release. :)

Just a little overview of what everything does in the plugin's *.pl1 file beforehand...

This changes the screen resolution:
Code: Select all
Component("DispResEx").Object.ChangeDisplayResolutionEx Width, Height


This will retrieve the current screen width:
Code: Select all
Width = Component("DispResEx").Object.GetDisplayWidth()


And this for getting the current height:
Code: Select all
Height = Component("DispResEx").Object.GetDisplayHeight()


This is for checking whether the window has a border, aka whether it is currently in windowed mode:
Code: Select all
CheckBorder = Component("WinPatch").Object.WinPatchCheckBorder()


This checks whether the window is currently maximized or minimized, 1 if either one, 0 if neither:
Code: Select all
CheckMinMax = Component("WinPatch").Object.WinPatchCheckMinMax()


Anything that messes around with the BackgroundObject is exclusively for keeping the frame centered on the screen in fullscreen, and at a Left/Top position of 0,0 when in windowed mode.

Anything that messes around with the WindowObject is exclusively for making sure the window stays centered on the screen whenever it is resized.

Of course if you have any questions I'll do my best to answer as comprehensively as I can. :)

EDIT:

Nevermind! I fixed it on my own! Uploading now... :D
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: DispResEx for Adventure Maker

Postby time-killer-games » Tue Dec 12, 2017 8:31 pm

Version 1.3.0 released!

This plugin is now 100% compatible with projects that switch in and out of fullscreen! Yay!

Edit:

I discovered that whether you use this plugin, or AM's default resolution changer instead, either way, changing resolution is not compatible with switching in/out of fullscreen on a panoramic frame. The panorama plugin will throw an automation error, and the game will crash. So, to fix this, I'm going to have the "switch between fullscreen/windowed mode" menu item disabled during panoramic frames. However I'm going to have to email Simon to see if he knows how to do that or whether it is even possible in AM.
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: DispResEx for Adventure Maker

Postby reneuend » Wed Dec 13, 2017 5:50 am

Thanks for working on this issue. I hope Simon can help.
You might catch him on his forum at: https://the-icehouse.itch.io/
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2689
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: DispResEx for Adventure Maker

Postby time-killer-games » Thu Dec 14, 2017 7:01 am

Thanks for the link! I'll try contacting him there, if he takes but so long to respond to my email.

Cheers!
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: DispResEx for Adventure Maker

Postby time-killer-games » Thu Dec 14, 2017 10:18 am

Version 1.3.1 released!

For the third argument of ChangeDisplayResolutionEx, you will now need to use the opposite of what you previously had.

Before, this is what it looked like:
Code: Select all
ChangeDisplayResolutionEx Width, Height, IsPanoramicFrame


Now, it looks like this:
Code: Select all
ChangeDisplayResolutionEx Width, Height, AdaptWindow


IsPanoramicFrame is the opposite of AdaptWindow.

What is AdaptWindow? - whether to resize the window relative to the background image. Since panoramas are usually a lot larger than your initial project resolution, you will obviously want the third argument set to False now, (instead of True like before). The purpose of adapt window is further explained in the image below:
Attachments
important.png
important.png (467.66 KiB) Viewed 7297 times
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: DispResEx for Adventure Maker

Postby time-killer-games » Fri Dec 15, 2017 12:19 am

@reneuend

I heard back from Simon. He said he just disabled the options menu to prevent fullscreen switching during panoramic frames. Now that I have that confirmed, I will add this to the plugin. :)
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: DispResEx for Adventure Maker

Postby time-killer-games » Fri Dec 15, 2017 2:08 am

Version 1.3.2 released!

There is now a fourth argument to ChangeDisplayResolutionEx.

The function now looks like so:
Code: Select all
ChangeDisplayResolutionEx Width, Height, AdaptWindow, DisableOptions


DisableOptions sets whether or not to disable the options menu item, to prevent fullscreen switching. Good to have that checked / set to True for panoramic frames, so that there is no automation error.

Cheers!
Samuel
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Re: DispResEx for Adventure Maker

Postby Vengeance66 » Sat Jan 06, 2018 4:56 pm

Wow!

I just got email and one notification for a message on my page and whaaaaat... :o

I need to get back here and make a new game!
Stay a while and listen...

Rainbow Enterainment - http://rainbowenter.com/
User avatar
Vengeance66
Administrator
 
Posts: 630
Joined: Wed Oct 13, 2010 2:17 pm
Location: Macedonia

Re: DispResEx for Adventure Maker

Postby time-killer-games » Tue Jan 09, 2018 9:53 pm

That's great news V66! As always I look forward to seeing your work! :D

Welcome back, and if you need any bugs fixed you may come across, please let me know and I'll make sure I get it fixed as soon as I am able. :D
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA


Return to The Plugins Corner

Who is online

Users browsing this forum: No registered users and 3 guests

cron