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 / splash screen or trailer at start

Author
Message
chan
12
Years of Service
User Offline
Joined: 14th Nov 2011
Location:
Posted: 29th Nov 2011 18:02
hey guys im making a 2d game and i wanted it to have splash screen.. after a while or seconds of loading, the game starts and has its trailer played like what other games have.

any idea?

-Excellence deals with weak people-
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Nov 2011 18:23
My tip... Look at LOAD ANIMATION... in DBPro commands and look to port it into DGDK....

sovr
14
Years of Service
User Offline
Joined: 2nd Jan 2010
Location: USA
Posted: 29th Nov 2011 22:10
I would have a variable that at the start of the code would equal 0. When the loop starts the code will check weather that variable is a 0 or a 1. If the variable is a 0 it will show the splash screen then convert that variable to a 1 which will load all of the media to the game (then after that change the variable to 2). I guess you would need a third if statement that will see if the variable is at 2 then the splash screen would go away and your game would start.

sov the game creator!
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Nov 2011 22:16 Edited at: 29th Nov 2011 22:17
I think an easier way would be to check how long the animation is in milliseconds and then SLEEP the app while the video plays... Or something like that... I think using a variable is compute time heavy lol

EDIT

Or even better.. A while loop

Hassan
14
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 30th Nov 2011 12:37
i don't get it, isn't it like:

main menu
load
play trailer
continue game

?

if you want a loading bar, usually it's done like this:
you must know the number of the things you want to load, and keep track of the current thing you're loading, and in a loop (which a dbSync), you will stretch a sprite to fit the border it's in, the sprite will be the loading bar, you will stretch it using this formula: (curThingIndex / totalThingsCount) * totalBarWidth, the height remains constant, and you will load 1 thing every loop and increase the current thing index by 1

for the video to play after loading, you could use this:


and to play the video:


chan
12
Years of Service
User Offline
Joined: 14th Nov 2011
Location:
Posted: 30th Nov 2011 16:19
@Hassan

T_T i am using DarkGDK.. are these compatible with DGDK?

-Excellence deals with weak people-
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 1st Dec 2011 00:04
Quote: "T_T i am using DarkGDK.. are these compatible with DGDK?
"


Yes they are. g_pGlob is a pointer to GDK's window handling system in "globstruct.h", and PlayVideo is a Multimedia Control Interface function (MCI) that can play the video I believe, correct me if I am wrong.
Hassan
14
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 1st Dec 2011 09:22
as Mr Bigglesworth, animation functions of GDK are not working because (as far as i know) DirectX dropped support for them, guess that's the only way left

chan
12
Years of Service
User Offline
Joined: 14th Nov 2011
Location:
Posted: 1st Dec 2011 10:09
ok ok i will try this code..

thanks alot guys

-Excellence deals with weak people-
chan
12
Years of Service
User Offline
Joined: 14th Nov 2011
Location:
Posted: 1st Dec 2011 10:21
i got lots of errors like g_pGlob is unidentified and left of ->hWnd ..am i doing it right?

i just copied and pasted then changed the name of vid, length and width.

-Excellence deals with weak people-
Hassan
14
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 1st Dec 2011 11:23
sorry, forgot a "#include "globstruct.h"" in there, put it with the includes

chan
12
Years of Service
User Offline
Joined: 14th Nov 2011
Location:
Posted: 1st Dec 2011 12:34
when i put dbSetWindowOff it doesnt play. why is that?

i want not to see minimize, maximize and close..

-Excellence deals with weak people-
Hassan
14
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 1st Dec 2011 20:19 Edited at: 1st Dec 2011 20:19
no idea why, but you could set window on, play, set it off again

though, you shouldn't be using that anyway, full-screen mode is much faster

Login to post a reply

Server time is: 2024-04-24 10:02:33
Your offset time is: 2024-04-24 10:02:33