Author Topic: PLUGIN: Direct3D v1.0 (Sprite and Theora video rendering) [2012-02-08]  (Read 11976 times)

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Okay, guess I'll have to confine to having to compile and upload two versions of the game, one with video and one without.  :-\

Ps - I've now added some #define code, that Gurok suggested for this effect (creating 2 versions of the game)...
« Last Edit: 13 May 2017, 17:08 by Cassiebsg »
There are those who believe that life here began out there...

Gurok

  • Rottwheelers
  • When life hands you lemons, combine them with the mop
    • I can help with AGS tutoring
    • Best Innovation Award Winner 2016, for improving and extending the AGS scripting language
    • I can help with proof reading
    • I can help with scripting
    • Gurok worked on one or more games that won an AGS Award!
    •  
    • Gurok worked on one or more games that was nominated for an AGS Award!
Here are the instructions I sent Cassie:

--

Make a new script file and put it at the top of your script list.
Put this in the header:

Code: [Select]
#define VIDEO_VERSION     
Change your code to
     
Code: [Select]
#ifdef VIDEO_VERSION
D3D_Video* video; // defined at the top of the script
#endif

function room_Load()
{
#ifdef VIDEO_VERSION
    // load the video code
#endif
#ifndef VIDEO_VERSION
    Display("Couldn't load the plugin");
#endif

Use #ifdef VIDEO_VERSION anywhere D3D_Video stuff is referenced.
When you want to make the non-video version, comment out the #define line.

--

I'm posting this for future people who stumble across this thread, in the hope it helps others with the problem CW outlined above.

In the past I wrote a feature which let you to configure stubs for plugin functions. I gave it out for testing, but no one seemed to be interested, and I later forgot about it myself thus it never ended up into the official version.

« Last Edit: 13 May 2017, 17:23 by Crimson Wizard »

Gurok

  • Rottwheelers
  • When life hands you lemons, combine them with the mop
    • I can help with AGS tutoring
    • Best Innovation Award Winner 2016, for improving and extending the AGS scripting language
    • I can help with proof reading
    • I can help with scripting
    • Gurok worked on one or more games that won an AGS Award!
    •  
    • Gurok worked on one or more games that was nominated for an AGS Award!
Ah, I was just suggesting something like this to Cassie on IRC.
This would be great. Is the branch still around? The link to the branch didn't seem to work for me.
« Last Edit: 13 May 2017, 17:22 by Gurok »

It should be working, still in my repository. But the branch is very outdated and has to be rebased.
Branch name is "improve-scapimap", you could try fetching it in git.


Although, today I'd rather try some different approach which would do similar thing automatically, if compiler could add a note on imports that belong to plugins to let engine distinct these.

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
So, is that something I could use/implement or does it require more than what I can? 
Cause that sounds just like what I need.  (nod)

I can either offer my project for testing, or just make a snippet of it, for the purpose, if you like.
There are those who believe that life here began out there...

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Okay, quick question/problem.

I decided to use the Credits Module by SSH to scroll the end credits, and all was going pretty good, until I finally was done rendering the movie and added it to the project...  :-\ Apparently it suffers from the same problem that CWs TypedText suffered. But no matter what I try, I just can't get the video running on the BG.  :~(
Now this isn't that big a deal, since the video is mostly the ships just moving from the right to the left, so AGS can do that easy with a few sprites, but thought I would mentioned just in case you want/can fix this.

If you figure out what is causing this, or how to solve it, I'll be all ears.  (nod)

There are those who believe that life here began out there...

Are you using the correct render stage?

Code: [Select]
video.renderStage = eD3D_StageBackground;
That should render it immediately after the game background finishes rendering and before anything else.

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Erm... yes I had that... but now I'm unsure what happened, cause now it's working.  :-[

Last time I had tried it was running the video, and then the credits after the video was finished.  (roll)
There are those who believe that life here began out there...

AJA, are you still around? I would reaaaally like to take a look at your code to see what you needed to initialize of Directx in it and what you didn't because AGS had already done it for you.


Oh, this is amazing, thank you  :-*

Hi Guys anyone solved scaling and aspect ratio issues with 3.5 and also the crash on Fullscreen/windowed switch?
« Last Edit: 17 Jan 2020, 02:13 by rmonic79 »