Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: Calin Leafshade on Sun 22/08/2010 16:40:53

Title: [PLUGIN] - D3DVSync
Post by: Calin Leafshade on Sun 22/08/2010 16:40:53
Ok so i'm not 100% sure this works since my computer and graphics card are too fast to make it tear but it should fix it in theory.

So can people test it in a game that they know to tear in D3D

Including the plugin in your game will automatically turn vsync on.

http://www.thethoughtradar.com/AGS/AGSD3DVSync.zip
Title: Re: [PLUGIN] - D3DVSync
Post by: Calin Leafshade on Mon 23/08/2010 16:14:01
anyone manage to test it?
Title: Re: [PLUGIN] - D3DVSync
Post by: subspark on Mon 23/08/2010 16:16:37
Impeccable timing Calin. AGS is now asking for d3dx10_43.dll
Otherwise this plug-in will be very useful for our full-screen effects!

Cheers,
Sparky.
Title: Re: [PLUGIN] - D3DVSync
Post by: subspark on Fri 27/08/2010 16:58:35
Just to clarify, AGS is asking for d3dx10_43.dll however I have a Direct X 11 Machine (Win 7) with the latest GeForce GFX 200 drivers installed.

Am I missing something? I'd love to test it for you Calin and I have the perfect GIP (Game In Progress) but I can't seem to launch AGS with the plugin. Am I meant to put your dll in the AGS directory and compile the game, then make a local copy of the dll to the game path?

Cheers,
Sparky.
Title: Re: [PLUGIN] - D3DVSync
Post by: Calin Leafshade on Fri 27/08/2010 17:06:05
I'm not really sure why it's asking for the DLL.. i mustve compiled it with the debug version or something.

I'll see if i can fix it.

If you are really dying to try it then you cand just download and install the DX SDK.
Title: Re: [PLUGIN] - D3DVSync
Post by: subspark on Fri 27/08/2010 17:09:20
Yeah I considered the SDK, but I'll wait for your fix. Im patient enough...I think ;D
Thanks for sorting it out.

Sparky.
Title: Re: [PLUGIN] - D3DVSync
Post by: xenogia on Fri 27/08/2010 23:27:14
Hey Calin I look forward to this one :)
Title: Re: [PLUGIN] - D3DVSync
Post by: Pumaman on Sat 28/08/2010 12:45:30
If you use any D3DX functions in your plugin, you need to distribute the D3DX DLL with it. This is why AGS doesn't use D3DX but just uses raw D3D.
Title: Re: [PLUGIN] - D3DVSync
Post by: Calin Leafshade on Sat 28/08/2010 12:51:42
Ahh, I see.

It's because I left references to ID3DXEffect in from a different project.

I can fix this easily enough.
Title: Re: [PLUGIN] - D3DVSync
Post by: Calin Leafshade on Sat 28/08/2010 13:17:46
Ok here we are.

It only has a reference to d3d9.h so it should be fine.

http://www.thethoughtradar.com/AGS/AGSVSync.zip
Title: Re: [PLUGIN] - D3DVSync
Post by: Knox on Mon 30/08/2010 16:33:43
Hey Calin,

Dont know if Im the only one but when I place your new dll version into my AGS folder, I get "MSVCR100D.dll" is missing + error loading "agsvsync.dll"

Ok I downloaded it and placed into my sys32/syswow folders.

Can this plugin diminish your fps?

Testing now :P
Title: Re: [PLUGIN] - D3DVSync
Post by: Calin Leafshade on Mon 30/08/2010 16:52:07
I think i compiled it in debug mode.. thus it uses the debug version of the DLL.

try this one compiled for release

http://www.thethoughtradar.com/AGS/AGSVSyncR.zip

and yes Vsync can negatively impact your framerate.
Title: Re: [PLUGIN] - D3DVSync
Post by: xenogia on Tue 31/08/2010 11:17:27
Hey Calin,

I get the same issue as general_knox on my Win XP virtual machine.  I'll try and update my directx drivers.

EDIT: Still no luck and this is with your re-uploaded dll.
Title: Re: [PLUGIN] - D3DVSync
Post by: Knox on Tue 31/08/2010 15:19:29
Hey Xenogia,

I just downloaded the dll directly, and copied it into my system32 and sysWOW64 folders:

http://www.dll-download-system.com/home/m-dlls-not-system-/msvcr100.dll/details.html (http://www.dll-download-system.com/home/m-dlls-not-system-/msvcr100.dll/details.html)
Title: Re: [PLUGIN] - D3DVSync
Post by: Calin Leafshade on Tue 31/08/2010 18:11:59
knox, does it actually work?
Title: Re: [PLUGIN] - D3DVSync
Post by: Knox on Tue 31/08/2010 20:55:44
Yep! No errors once I place that dll in those folders...

For the tearing, my game hasnt done it yet so I cant really test to see if it prevents it...but so far my framerate hasnt changed with this plugin on.
Title: Re: [PLUGIN] - D3DVSync
Post by: Calin Leafshade on Tue 31/08/2010 21:13:14
So thats something of a null result :P

If it doesnt tear with it on or off then we havent proved anything.
Title: Re: [PLUGIN] - D3DVSync
Post by: Knox on Tue 31/08/2010 21:39:47
yeah I know...lol!

I cant test the tearing until I actually get my game advanced enough so it could actually tear (I dont have much oging on right now)...so for me I wont be able to give you any results until a good while..I just wanted to see if it did anything to the framerate by default, if that makes any sense  :P
Title: Re: [PLUGIN] - D3DVSync
Post by: xenogia on Tue 31/08/2010 23:14:04
What exactly is the msvcr1000.dll for though?  And will I require to put it in the package when releasing the game?
Title: Re: [PLUGIN] - D3DVSync
Post by: Calin Leafshade on Wed 01/09/2010 00:00:26
well MSVCR100D.dll is the debug version of the visual c++ library.

I compiled the it with the release settings which should mean it requires the release version (MSVCR100.dll) but i have no idea why.. the plugin is literally 2 lines of code.
Title: Re: [PLUGIN] - D3DVSync
Post by: subspark on Thu 02/09/2010 11:12:18
Yeah for some reason Calin, the latest VSync Plugin still requires MSVCR100.dll
If you say thats unusual for two lines on code then hmmmmm. ???

Sparky.
Title: Re: [PLUGIN] - D3DVSync
Post by: NSM on Mon 15/11/2010 18:59:38
After placing the MSVCR100.dll file in the system32 file the plugin ran fine and it eliminated the tearing in my high resolution game (which was tearing quite badly).  Nice job.
Title: Re: [PLUGIN] - D3DVSync
Post by: goodohman on Tue 16/11/2010 14:19:07
Calin,
Sorry for my ignorance..
What is this plugin for?

Thanks!
Title: Re: [PLUGIN] - D3DVSync
Post by: Calin Leafshade on Tue 16/11/2010 23:45:01
Hey NSM, thanks for finally confirming whether the plugin actually *works*.

@goodohman:

Basically the plugin enables VSync for the D3D version of the engine so that the image doesnt tear when scrolling horizontally.

Vsync needs to be enabled when the graphics engine is initalised for D3D so thats why it cant be enabled in the script like the Direct Draw version. I dunno why CJ didnt set it on by default though.. the performance hit is tiny when dealing with a handfull of sprites like this.
Title: Re: [PLUGIN] - D3DVSync
Post by: goodohman on Wed 17/11/2010 07:41:07

Thank you for the answer Calin!
Title: Re: [PLUGIN] - D3DVSync
Post by: dbuske on Wed 29/08/2012 18:11:05
Calin, are you aware all your downloads are dead.
Maybe the website you use are dead or gone.
Title: Re: [PLUGIN] - D3DVSync
Post by: Calin Leafshade on Wed 29/08/2012 18:16:44
I was 100% aware of that, yes.

Most of my plugins are now no longer needed due to the engine source being open.
Title: Re: [PLUGIN] - D3DVSync
Post by: Dualnames on Thu 30/08/2012 14:00:36
In that case, would you be against, if someone provided a link to this plugin?
Title: Re: [PLUGIN] - D3DVSync
Post by: Calin Leafshade on Sat 08/09/2012 16:02:52
No, feel free to provide a link if you like.
Title: Re: [PLUGIN] - D3DVSync
Post by: Dualnames on Sat 08/09/2012 16:11:06
Wonderful, but it appears I haven't stored this. Anyhow, if anyone has it, I'll be glad to host it.
Title: Re: [PLUGIN] - D3DVSync
Post by: on Sun 28/04/2013 23:18:49
Hm, sorry to drag up an older thread - but does this plugin still exist somewhere in some shape or form for download, please? :)
Title: Re: [PLUGIN] - D3DVSync
Post by: dbuske on Mon 29/04/2013 15:44:56
I have the d3dvsync plugin on my hard drive.
Anyone who wants it I will be glad to send it.
Title: Re: [PLUGIN] - D3DVSync
Post by: on Thu 02/05/2013 03:51:00
Yes please: speilbergjnr at hotmail.com

thank you! :)
Title: Re: [PLUGIN] - D3DVSync
Post by: on Sat 21/09/2013 16:31:00
Seems to work a-ok, cheers Calin!

As dbuske provided me it and others may think about using it (you really should if you use DirectX mode and have scrolling backgrounds)...

Here's a public link: http://www.screen7.co.uk/junc/agsblend.rar

Instructions:
1. Put all the files in your AGS root folder (ie C:\Program Files\Adventure Game Studio 3.2.1).
2. Copy  AGSBlend.dll and AGSD3DVSync.dll to your game's Compiled folder (they must be distributed with the game)
3. Open AGS and under Plugins select AGSBlend and AGSD3DVsync

Note: You may need to put some of those dll files in a system directory too, I can't quite remember. To quote Danilo, "I just copied those files everywhere and it worked." ;)

Run, compile, save etc - screen tearing will be gone!
Title: Re: [PLUGIN] - D3DVSync
Post by: StillInThe90s on Tue 24/09/2013 05:54:17
Quote from: Mods on Sat 21/09/2013 16:31:00
Note: You may need to put some of those dll files in a system directory too, I can't quite remember. To quote Danilo, "I just copied those files everywhere and it worked." ;)
Would this mean that anyone using the finished exe also has to install dll files everywhere?
Title: Re: [PLUGIN] - D3DVSync
Post by: Khris on Tue 24/09/2013 13:35:47
No, usually the system (Windows) will look in the working directory first, then in the usual ones like system32.
So if the dll is in the same dir as the .exe, it should work without copying it anywhere else.

No guarantees though for when people are stupid enough to play this right from inside the archive instead of extracting all files first.
Title: Re: [PLUGIN] - D3DVSync
Post by: StillInThe90s on Tue 24/09/2013 17:10:41
Ah. Thanks for clarifying.
Title: Re: [PLUGIN] - D3DVSync
Post by: on Sat 28/09/2013 18:25:55
Any idea why this is using a "msvcr100d.dll"

I've been told that using a "debug" version of a DLL is an odd thing to do.
Title: Re: [PLUGIN] - D3DVSync
Post by: Calin Leafshade on Sat 28/09/2013 22:38:10
Because when i wrote it I didn't really know what I was doing and compiled it against the debug version of the library.

It should really be added to the engine core and shouldnt need a hacky plugin.