|
Full screen effects |
Dave McEnery
Member #5,468
February 2005
|
Hi, I'm currently working on a 2d platform game with mouse aiming, in Contra style I guess. I'm doing the animation and characters with clay and my digicam and the backgrounds with digicam pics. It is going to be locked at 800x600x32. I was thinking about doing some fancy fullscreen effects, rippling for explosions and such. My question is, would applying effects to the entire screen be way too slow? My target system will probably be 1ghz+ machines and I'm developing on an athlon 64 at 4000+ speeds. Opinions? |
Chris Katko
Member #1,881
January 2002
|
Quote: My question is, would applying effects to the entire screen be way too slow? Very much so, yes. If by "rippling" you mean bending everything. For that, I would strongly recommend using AllegroGL. If you were rendering on a texture, you could easily do a ripple effect by just splitting up the screen into multiple vertices and "bending" it. Though, I really don't have the OpenGL experience to talk on the matter... -----sig: |
Steve Terry
Member #1,989
March 2002
|
First of all to do things quickly you should focus on learning how to manipulate bitmaps by direct memory access through line pointers rather than get/putpixel. Since your screen res and depth is known you can optimize your routines further. You can do some pretty quick stuff, but you should set it up as so: 1. Render everything with no effects to a backbuffer. Even though you are developing on high end machines you need testers to test your program to see where it begins to degrade performance on slower machines. [edit] I have a small program I wrote which uses sin/cos to render an image sorta rippled, but it's not the effect you are looking for. However it's important to know that instead of iterating through the pixels of the source and blitting them to the destination bitmap, you do the opposite, you iterate through the pixels of the destination and calculate which pixel from the source bitmap to place ___________________________________ |
Dave McEnery
Member #5,468
February 2005
|
Hi! Well, I have an amd k6-2 500 I can test it on too. I guess I don't actually need to apply the effects to the entire screen, just read parts of the buffer near the explosions and do some warping. This is actually my first real project, I've done lots of little demos and tests and such, but now I'm focusing on putting an actual game together. I found allegro in the book "Game Programming All In One" by Thomson Course Technology... its about 700 pages. It's taught me a good amount but it doesn't get more complex than a 4 screen platform scrolling game using Mappy, so I'm going to have to teach myself a lot. That's good though, I enjoy it. I used to program C and pascal when i was younger and I still know VB. I'm new to C++ but I understand program structure so I'm just learning the syntax. I'm really surprised at the speed and quality of the repsonses here glad to see its very lively and I think I'll be hanging out here. Is there a popular allegro IRC channel? Thanks! |
Chris Katko
Member #1,881
January 2002
|
Quote: 2. Apply effects from backbuffer to the screen It might be faster to do that to another memory buffer and just blitting to the screen in one linear block. Quote: Chris I think OpenGL would be overkill but it's doable as well. Well, when I think ripple, I think the whole screen moving on the Z axis in a kind of puddle (of water) effect. So I figured OpenGL (in addition to its raw speed) would allow easy 3-D transformations. -----sig: |
Steve Terry
Member #1,989
March 2002
|
freenode #allegro Yes allegro is very active actually... ___________________________________ |
Matt Smith
Member #783
November 2000
|
"active" yes - "quality of responses" no If we have anything REALLY worth saying we put it on the record here |
Steve Terry
Member #1,989
March 2002
|
Well in Off Topic most of the responses are pure crap, no offense to anyone. But in the Programming topic there are usually pretty straight forward answers like RTFM, etc ___________________________________ |
Krzysztof Kluczek
Member #4,191
January 2004
|
Quote: First of all to do things quickly you should focus on learning how to manipulate bitmaps by direct memory access through line pointers rather than get/putpixel. Is there actually any reason to learn using this? Doing fullscreen effects in software seems to be a bit ancient technology now. We have GPUs, you know. Apart from this, accessing image memory may be useful for advanced effects, but in most cases pure OpenGL is enough to do most things. ________ |
Sirocco
Member #88
April 2000
|
Quote: Is there actually any reason to learn using this? Doing fullscreen effects in software seems to be a bit ancient technology now. We have GPUs, you know. Apart from this, accessing image memory may be useful for advanced effects, but in most cases pure OpenGL is enough to do most things. Knowledge is power. --> |
Chris Katko
Member #1,881
January 2002
|
Quote: But in the Programming topic there are usually pretty straight forward answers like RTFM, I take slight offense to that. As far as I can remember, anyone who ever says "RTFM" is either joking, or puts a useful link in it. -----sig: |
Steve Terry
Member #1,989
March 2002
|
Don't take offense... if you notice I used ___________________________________ |
Chris Katko
Member #1,881
January 2002
|
You can't just say "no offense" and say whatever you want. "No offense, but obviously, your mother liked to drop you." p.s. I'm not saying that to you, I'm just making a point. -----sig: |
razor
Member #2,256
April 2002
|
Quote: You can't just say "no offense" and say whatever you want. Sure you can, especially with an added smiley. Whoooo Oregon State University |
Ron Ofir
Member #2,357
May 2002
|
You can say that only in a warm, tight and loving community like Allegro.cc |
|