Skip to main content
gamedev.net
🔒 Locked

Transitional effects

Started by raptorstrike Jan 1, 2005 at 7:15 PM 0 replies 600+ views
Original Post
raptorstrike
raptorstrike
ok if youve played an RPG in your life time you know what im talking about, those cool whoosh effects when you start a battle i think that would be somthing cool to add to my game rather then just an instant trasition problem is that i have no idea on how to do this? i have a very simple a black "box" come over the screen starting at the left but other then that im not quite sure how to do anything more thanks[smile] EDIT: i actually got a pretty cool effect by randomly drawing a line on the screen and not updating anything else like so:

            SDL_Surface* Blinder = IMG_Load("BMPs/Blind.PNG");// a line that is 480 pixles long
            SDL_Rect Blind_Rect = {0,0,0,0};
            for (int I = 0;I < 350; I++)
            {
                SDL_BlitSurface(Blinder,NULL,screen,&Blind_Rect);
                SDL_Flip(screen);//to update only this
                Blind_Rect.x = rand()% 640;//seeded to the tick count
            };
            SDL_FreeSurface(Blinder);       



im still open to other ideas though EDIT2: actually i just found one i really like i did the above technique except instead of just a line i made a picture with a black back and spraypainted on some white blotches in paint then colorkeyed out the black and blitted it and it gives me a pretty cool effect [Edited by - raptorstrike on January 1, 2005 8:09:48 PM]
____"This just in, 9 out of 10 americans agree that 1 out of 10 americans will disagree with the other 9"- Colin Mochrie
Omaha
Omaha
I use OpenGL, not Direct3D, but the way I handled transitions is just to copy the framebuffer into a texture (or series of textures, depending on hardware support) and then during rendering, draw the old frame, appropriately transformed (Faded, distorted, melted, whatever) and then the new frame.

http://www.personal.psu.edu/users/d/j/djp211/mw/menudemo.avi

You can see it in action when "New Game" is clicked/cancelled

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.