I want to make a "go into warp" and "drop out of warp" effect. It will probably be an animated sprite, so it will consist of frames. I already have an "animation" class for such a thing. But how to get the animation frames themselves... there are explosion or fire generators that spit out the frames you need.. but a warp effect..... any ideas ?
If you mean in terms of visual, have you considered using decreasing opacity, it provokes a feedback effect where images merge with each other. And in the second half you increase back opacity, so everything ends up sharp again.
That would be more of a cloacking effect.
A shader might work, where you stretch everything radially. Search for radial blur or something similar.
EDIT
Scratch that, what you want is a zoom blur. Paint.net has one you could use.
Have you considered capturing a few screen-grabs from an episode and editing them in Photoshop? The opening credits from TNG might be a good source.
What do you mean by warp effect? Do you have an example video?
What do you mean by warp effect? Do you have an example video?
I'm assuming he means something long these lines:
I need a special effect sprite ( bit like an explosion or fire)
for when an NPC ship leaves or enters the same sector as the enterprise. So you will see a ship appearing or disappearing
So like the effect that appears at 0:57 of the video?
Something like it yes..
would there be any algorithm to generate such a thing as sprite frames ? Like a explosion generator, but for warp.
The original visual effect is similar to a long exposure : As the light sources move, the points illuminated stay illuminated at the maximum level which was ever reached.
With pixel-based units, you have two approaches :
- perform a very precise sprite movement loop, pixel-per-pixel if you can. At each frame, render things with a blending function max(old_pixel,new_pixel).
- Use a system similar to "contrails", where you keep track of lines of segments, over the movement of the craft. Then you draw textured quads alongside this trail, using the same kind of blending function. The good news is that in your scenario, the lines are straight, so you don't have the problem of subsequent segments overlapping each other. Another good news of this system, is that you are able to render the image completely from scratch in one go.
edit: oh, if you mean pre-render them manually, check for example if your painting program has a blending mode like "Maximum", or "Lighten" (in Paint.NET).
Thanks all of you.
I think Audric's idea is the way to go..
I'll see if I can implement it this week.
btw: for anyone who is interested, a Linux and a Windows version of the game thusfar can be downloaded here
https://www.allegro.cc/depot/StartrekProject
This is an oldie, and it might be hard to get it to work, but it's really nice:
EGG by Shawn Hargreaves, our famous predecessor. See here: http://www.shawnhargreaves.com/egg/
I'd be tickled pink if someone ported it to Allegro 5...
EGG
Man that's incredibly well written!
I love Star Trek, and remember when my friends were blown away by me correctly guessing the Enterprise-E was going to be Sovereign Class before they even revealed it. Even wrote a fanfic about the Enterprise-N (trust me it was terrible). Sorry, I know, my usual off-topic rambles, ignore me.