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 / Video/Animation , need a Tutorial , (from Hassan plz)

Author
Message
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 16th Jan 2011 14:01
Ok guys i think we all agree to have a nice tutorial on loading videos (avi,wmv,etc) in our games.

As DarkGDK doesn't support this , we need an alternative.

plz somebody post a tut for loading the animations plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.

ALLAH IS THE GREATEST
May he forgive me
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 16th Jan 2011 15:09 Edited at: 16th Jan 2011 15:26
I've been meaning to look into this and I've recently found in the forums that apparently there are some bugs in the dbLoadAnimation set of functions. I think I'll quickly have a look and see what happens. I'll let you know.

EDIT:



Nope, doesn't play a video file...

Warning! May contain Nuts!
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 16th Jan 2011 15:24
@WLGfx

Thank you sir , this is the third time you have come to the rescue.Many thanks , sir.

BTW , how are you gonna check the bugs?.Because there are only header file and none of the code with it.

ALLAH IS THE GREATEST
May he forgive me
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 16th Jan 2011 15:57
Ok so now what???????????

ALLAH IS THE GREATEST
May he forgive me
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 16th Jan 2011 16:42
Apart from paying out for Dark Video, there's no other way (unless playing around with the WMP SDK). It used to work with DB Classic but not now in pro or GDK.

Warning! May contain Nuts!
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 18th Jan 2011 13:19
taken from old TGC member, really sorry i don't remember the name



parameters:
1-parent window (usually include "globstruct.h" and pass g_pGlob->hWnd)
2-name of the file
3,4,5,6- x,y,width and height
7- optional parameter (can be NULL), length of the video will be returned using this parameter

usage:
very simple usage could be:


Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 19th Jan 2011 17:25
Not working man,

its reallllly frustrating.

I get these errors:


Any Ideas????? i am a noob in this situation.

ALLAH IS THE GREATEST
May he forgive me
JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 20th Jan 2011 00:04
MSDN docs.

Hope this helps,

JTK
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 20th Jan 2011 06:25
Umm i don't get it???????

ALLAH IS THE GREATEST
May he forgive me
Freedom Fighters
14
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 20th Jan 2011 06:34 Edited at: 20th Jan 2011 06:35
@Neotron

have you remembered the requirements for it?


EDIT:
make sure you include these



[ FF - Engine ] - Coming Soon...
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 20th Jan 2011 07:54
The video doesn't play.............
Any full source code only with playing a demo video??/ plzzzzzzzzzzzzzzzzzz

i need to see it in action.

ALLAH IS THE GREATEST
May he forgive me
Freedom Fighters
14
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 20th Jan 2011 11:13
i upload a pic that show it for you, its works.

this is the code i used.



if you have a avi file somewhere, put it at C:/<video name>.avi
and try loading it from that area.
what is it not doing?

[ FF - Engine ] - Coming Soon...

Attachments

Login to view attachments
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: &lt;script&gt; alert(1); &lt;/script&gt;
Posted: 20th Jan 2011 13:05
sorry i didn't mention the lib and the header...vfw32.lib and vfw.h

and dude, no need for all the "plzzzzzzzzzzzzzzzzzz" and "????????????", calm down and stop calling yourself a noob..

Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 20th Jan 2011 13:22
Well it was wrong with my code as i had a fullscreen on.How can i do it in full screen.

And oh yeah my video plays in windowed mode but just displays for a split second and then just goes to the other lines of code.

@HASSAN umm i am a noob in this stuff.

ALLAH IS THE GREATEST
May he forgive me
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 20th Jan 2011 13:48
Well ok i got the video to work i just added a small value in the "Length" variable so it waited a little longer.

Now my question is , any ideas how to implement it with the dbSetWindowOff() (full screen mode)?.This is gonna be tricky.

How can i point to the hWnd when it is not a window any more?

ALLAH IS THE GREATEST
May he forgive me
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: &lt;script&gt; alert(1); &lt;/script&gt;
Posted: 20th Jan 2011 15:45 Edited at: 20th Jan 2011 15:46
it is a window actually, but i believe the full-screens in directX are always top-priority, thus will be displayed over the video (this is somewhat a guess..)
so perhaps, try something like:

create the video window, position it and all stuff
minimize GDK window
start playing the video
wait till it ends
maximize GDK window
destroy video window

might work, might not, but it is worth a try, please post your code after you try this (if you will do so)

Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 20th Jan 2011 21:25
Hey i finally got it.
Its a little bit awkward to switch to window and fullscreen modes but it will have to do it.

Oh and i used my version of waitt() so just replace it with dbWait(). IT was only for debug purpose.


ALLAH IS THE GREATEST
May he forgive me
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 20th Jan 2011 23:51
Fingers crossed I can get this to work myself...

Warning! May contain Nuts!
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 21st Jan 2011 07:21
Oh and HASSAN , i saw your engine back there , how long studies and work you had to do?

I am just going the way of switching between windows and full screen till then , but if someone has an alternative please fell free to share.
P.S. I 'll be checking this post everyday.

ALLAH IS THE GREATEST
May he forgive me
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: &lt;script&gt; alert(1); &lt;/script&gt;
Posted: 21st Jan 2011 07:27
Quote: "Oh and HASSAN , i saw your engine back there , how long studies and work you had to do?"


it took me around a year, studying and implementing at the same time, but whole time was wasted when i was moving from direct3D 9 to 10 to 11, lots of changes and stuff

Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 21st Jan 2011 09:27
Well i don't think its wasted . Besides it runs faster then darkGDK .

cough .. promise me you will the addons and plugins for it free cough darkgdk needs alot of..cough .plugins...cough...

ALLAH IS THE GREATEST
May he forgive me
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 21st Jan 2011 14:45
HEY!!!!!

This command doesn't play sound with the animation/video.I have an avi video file with sound.It just doesn't play the sound with it.And the video is not smooth , its super fast.

ALLAH IS THE GREATEST
May he forgive me
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 21st Jan 2011 18:11
Yeah, too many problems with that so far.

Ideally, it would be nice to setup the Dark GDK screen and attached a video file direct to it, full or even displaying somewhere in the screen. As far as I can tell, the Bitmap is the same as a Direct Media bitmap layer so attaching a direct media video to the screen is something I'm struggling with. Argh! Not fun... lol... C and C++ is easy enough but these PC things have millions of libraries to learn and by the time you've taught yourself it, it's out of date again.

Warning! May contain Nuts!
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 21st Jan 2011 18:21
So what am i suppose to do now?

Oh and @WLGfx can you see my other post http://forum.thegamecreators.com/?m=forum_view&t=180586&b=22

I need a tutorial on how did you made the bullets.PLEASE

ALLAH IS THE GREATEST
May he forgive me
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 21st Jan 2011 18:47
Maybe you could get around it by using the System command to open media player to display a video. I've never used it so far.

If you could run media player using a command line type calling convention it may work as a temporary fix. I'm still in the middle of playing with the direct media layer thingy to play videos.

Warning! May contain Nuts!
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: &lt;script&gt; alert(1); &lt;/script&gt;
Posted: 21st Jan 2011 21:17
hmm...last time i used this, my video had sound and it was just as good as it was on windows media player, and i tested it on multiple machines

haliop
User Banned
Posted: 23rd Jan 2011 04:07
u cancpass around it. here is how you can do it. its a bit tricky but can be done.
go tocgoogle and search for a video editor. save the sound of that video into a seperate file and the video as jpg files. then cycle trough them as images play the sound file simoutenlecly. iknow it is a bad solution but it will work. more then that once its in images you have alot of power to manipulate them. hope this hlps. nadav.
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: &lt;script&gt; alert(1); &lt;/script&gt;
Posted: 23rd Jan 2011 12:38
that's a VERY bad way of doing it..

WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 23rd Jan 2011 15:32
I might play around with the Direct Media library today see if I get anywhere...

Warning! May contain Nuts!

Login to post a reply

Server time is: 2024-09-28 14:02:51
Your offset time is: 2024-09-28 14:02:51