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

Cassiebsg

  • Cavefish
  • Posts: 5,013
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game 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
  • Posts: 1,793
  • 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 a game that won an AGS Award!
    •  
    • Gurok worked on a game 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: Adventure Game Studio
  1. #define VIDEO_VERSION
     
Change your code to
     
Code: Adventure Game Studio
  1. #ifdef VIDEO_VERSION
  2. D3D_Video* video; // defined at the top of the script
  3. #endif
  4.  
  5. function room_Load()
  6. {
  7. #ifdef VIDEO_VERSION
  8.     // load the video code
  9. #endif
  10. #ifndef VIDEO_VERSION
  11.     Display("Couldn't load the plugin");
  12. #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.

Crimson Wizard

  • Posts: 8,794
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on a game that won an AGS Award!
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
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
  • Posts: 1,793
  • 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 a game that won an AGS Award!
    •  
    • Gurok worked on a game 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 »

Crimson Wizard

  • Posts: 8,794
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on a game that won an AGS Award!
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
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
  • Posts: 5,013
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game 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
  • Posts: 5,013
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game 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...

AJA

  • Posts: 817
    • AJA worked on a game that was nominated for an AGS Award!
Are you using the correct render stage?

Code: Adventure Game Studio
  1. video.renderStage = eD3D_StageBackground;

That should render it immediately after the game background finishes rendering and before anything else.

Cassiebsg

  • Cavefish
  • Posts: 5,013
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game 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...