Path: chuka.playstation.co.uk!news From: "Greg Cook" Newsgroups: scee.yaroze.freetalk.english Subject: Re: Beginner Questions. Date: Sat, 11 May 2002 17:45:09 +1200 Organization: PlayStation Net Yaroze (SCEE) Lines: 162 Message-ID: References: NNTP-Posting-Host: 203-96-148-51.apx1.paradise.net.nz X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Matt can you expand on this for me, sorry im really new at this. here the code that ive written. this is my main function, all i want it to do right now is start witha black screen fade the yaroze scene logo in, leave it for a few seconds and fade to black, then after that just show the logo as normal. ( the last bit would be where a title screen or something would go i guess. im just trying to understandhow all this stuff works. as you will seee im still just learing the structure of all this stuff, it hasnt quite clicked yet, VSyncs, DrawSyncs etc are still playing with my head a bit. thanks greg void main (void) { int vsync = 0; // vertical screen sync int BufferIndex; // buffer index int frame; Initialise(); InitSprite((u_long *)YAROZE_SCENE_ADD); BufferIndex = GsGetActiveBuff(); // Returns either 1 or 0, GameState = RUNNING; while(GameState) // Check that we are still playing the game { switch(GameState) { case RUNNING: // The Normal GamePlay break; case TITLESCREEN: // The TitleScreen for(frame=0;frame<=60; frame++) { sprite.r -= 1; sprite.g -= 1; sprite.b -= 1; VSync(0); } GameState = RUNNING; break; case PAUSE: // Pause Command break; case GAMEOVER: // GameOver break; } DealWithPad(); GsSetWorkBase((PACKET*)packetArea[BufferIndex]); GsClearOt(0, 0, &WorldOT[BufferIndex]); //clear out the present OT ready for drawing // now lets set up the image GsSortFastSprite(&sprite,&WorldOT[BufferIndex],0); // register the sprite in the ordering table DrawSync(0); vsync = VSync(1); VSync(0); // get the vertical sync interval FntPrint("HSYNC: %d\n", vsync); ResetGraph(1); GsSwapDispBuff(); GsSortClear(0, 0, 0, &WorldOT[BufferIndex]); GsDrawOt(&WorldOT[BufferIndex]); // draw the current off screen buffer to the screen BufferIndex = BufferIndex^1; // change side to 1 or 0 FntFlush(-1); // print all font calls } ResetGraph(0); } "Matt Verran" wrote in message news:ab5ouq$442@www.netyaroze-europe.com... > well you could just have a few for loops, like: > > for (frame=0; frame<60; frame++) > { > fade in/zoom text on/do whatever > vsync > } > for (frame=0; frame<60; frame++) > { > leave stuff on screen static > vsync > } > for (frame=0; frame<60; frame++) > { > fade out/zoom text off/do whatever > vsync > } > > each loop lasts 60 vsyncs, which at 60fps is one second. > > hope thats some kind of help? > -Matt > > Greg Cook wrote in message > news:ab47pv$441@www.netyaroze-europe.com... > > Ok guys ive finally found some time to play with my yaroze, thanks to max > > and his great tute im underway :) ive got plenty of questions, but this > one > > i think might be the simplest, and i think i can learn alot from it. > > > > Ive been playing the games yarozians and robot ron, both very cool games > :) > > I noticed that both the demos loaded with a yaroze scene splash screen, > the > > graphics appeared, hung around for a bit and then faded into another > screen. > > > > Id like to know how you did this, any chance that someone has a bit of > code > > that shows how the intro screen like that loads and then fades to black or > > another screen? > > > > Ive got my game ( if you can call it that it most a "bit of code im > playing > > with ") working with different states, eg PLAYING, TITLESCREEN, ENDGAME > > etc.. so i think id just jave to add a new state for LOADINGINTRO, but in > > really not sure how to do all this. > > > > well some example of code or something would be really appreciated, i was > > especially impressed by robot ron, where the level starts and the bar > > scrolls across the screen and tells you the level etc.. very cool! id love > > to knwo how you did it. > > > > Sorry for the newbie questions, but any help is appreciated. > > > > > >