Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / More Animation Problems

Author
Message
The Back Alley Media
18
Years of Service
User Offline
Joined: 22nd Nov 2005
Location:
Posted: 5th Mar 2006 18:44
I have spent the last two days trying to get an animation to play. The following is my code:

// Setup animation
dbLoadAnimation ( "demo1.wmv", 1 );
dbPlayAnimationToImage ( 1 , 111 , 0 , 0 , dbAnimationWidth ( 1 ) , dbAnimationHeight ( 1 ) );
dbLoopAnimation(1);

Inside my main game loop:
dbPasteImage ( 111 , 0 , 0);

First, I had to set the syncrate to 0, which makes no sense to me. My intention was to use a video file for a background while I layered sprites on top of it. With a 0 syncrate, this won't be possible.

Second, mre concerning is that the display is all garbled up. My animation plays, but it looks like a kaleidoscope. It is completely fractured into small rectangles that are displaced. I can't figure it out. No matter what I do, I can't get the animation to play unfragemented. Does anyone have any insight on this?

Third, here is another item that I was hoping to do. My artist typically creates animations with a key color as an avi in After Effects. I want to use these animations as sprites, so i would like to paste them to an image and use the animation as my sprite images. Is this possible.

Thanks in advance for the help.
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 5th Mar 2006 20:55
First:
calling dbSyncRate(0) does mean that Darksdk will decide how fast to refresh the screen/it will try the max syncrate possible. you should be able to use any sprites as normal.. if you worry about movement speed, then just use a timer approach for real time speed calculations...

Second:
cant help on that, you may need to post the file, and the code that produces this behaviour.

Third:
As you only need to specify an image once for a sprite, you should be able to do it by playAnimationToImage... and then it should just work.

-- I just started with DarkSDK, by translating DBP Projects. --
The Back Alley Media
18
Years of Service
User Offline
Joined: 22nd Nov 2005
Location:
Posted: 6th Mar 2006 00:36
Barnski,

Thanks for the help. I appreciate it. However, I am still having problems with the animation. The animation file I used, "demo1.wmv" is the file given with the sdk sample code for Visual Studio 6. I took it from the Animation Showcase example. So you should have it with your version of the sdk.

The code that I posted produced that behavior. I have been spinning my wheels on this one. I can't figure what is causing the animation fracturing. At first I thought maybe I gave the animation a bad width/height. I am going to try experimenting with that. But so far I have tried .wmv, and .avi (with different codecs) and have gotten the same results.
The Back Alley Media
18
Years of Service
User Offline
Joined: 22nd Nov 2005
Location:
Posted: 6th Mar 2006 19:58
Thanks everyone, I have resolved the problem. This one had me spinning my wheels for a bit. Here is the short answer:

The PC I was working on has an older graphics card, a matrox to be exact. It is pre-direct x version 9. The drivers on it, although upgraded, are not 100% modern or compatible with the latest version of direct x.

I am sorry for spreading a false alarm. I now know that when I put together an executable to make sure to test it on more than one PC. It does bring up a concern. It means that the games I am developing might not work on older PCS.
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 8th Mar 2006 11:44
Quote: " It does bring up a concern. It means that the games I am developing might not work on older PCS. "


That's right, you need a directx9 compatible graphic card and directx9c installed on the target machine for DarkSDK applications to work.

greets,
Barnski.
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 8th Mar 2006 12:28
Quote: "It does bring up a concern. It means that the games I am developing might not work on older PCS."

That cant be helped...

Login to post a reply

Server time is: 2024-11-19 04:21:47
Your offset time is: 2024-11-19 04:21:47