old school demo effects?

BlitzMax Forums/BlitzMax Beginners Area/old school demo effects?

Newbie(Posted 2007) [#1]
Is there anyone who has made any small code applets that do old-skool demo effects? like copper tricks, display wobblers, stuff like that? When i look in the code archieves and select .max only, I dont see a lot ...


FlameDuck(Posted 2007) [#2]
Yes. However you can't really do "copper tricks" without a copper.


Newbie(Posted 2007) [#3]
I know that; but let me rephrase that to "simulate" copper effects


H&K(Posted 2007) [#4]
Well wasnt a copper, just Shorthand for Graphics Co-Prosessor. In that everything nowadays has a copper


Dreamora(Posted 2007) [#5]
Doing such code is not hard, although BM is not targeted at that. BM uses true 3D not, 2D commands and such old school tricks are 2D.
They are far easier and normally more performant when done in BlitzPlus / Blitz3D where you can access the buffers and modify it there.

That holds at least unless you add Shaders to your BM oldschool demo. Then it will be faster and will look stunning ^^.

Beside that: Without that there are most likely 2 ways to do such effects in BM:

1. Fullscreen Pixmap and modification of the pixels through the pixmap commands. Sounds nice ... unless the user has a serious resolution. As this is 100% cpu bound, it starts to cause performance break ins quite fast. On the other hand, in 2D you do not need 60 FPS :)

2. Use the backbuffer ptr and modify the stuff there. Its harder because you need to know how it is structured to work with it. There are no commands for that beside the commands to get width, height, and pointer as well as pitch. The rest is done through pure memory access functionality.


ImaginaryHuman(Posted 2007) [#6]
The copper was the Amiga's co-processor that specifically took contents of video ram and put it onto the physical screen as a raster beam, and whilst doing so could process instructions to change the lookup of where it is reading data from, and also change palette colors, specify hardware sprites, etc, in realtime. That's not really the same thing as today's `GPU` which although it takes contents of video ram and display it, does not really do any alterations to that data during the display process, it only alters the data first in video ram and outputs to video ram, ready for the rest of the system to take the image and put it onto the display. So in that sense, the GPU is more like a highly glorified blitter. But hey. :-)

To do a copper colorbar effect I recommend just drawing a bunch of rects one pixel high in different colors.

Dreamora, where and how do you get the pointer to the backbuffer frame data?


tonyg(Posted 2007) [#7]
Dreamora, where and how do you get the pointer to the backbuffer frame data?

In DX driver you can do the following...
Local renderSurf:IDirectDrawSurface7
D3D7GraphicsDriver().Direct3DDevice7().GetRenderTarget Varptr renderSurf

but I'm not sure what you can do with it once you have it.


Newbie(Posted 2007) [#8]
Thanks for all the feedback


Bremer(Posted 2007) [#9]
You might want to check out this forum: http://dbfinteractive.com/index.php , there is not much bmax stuff, but most basic languages are fairly easy to translate between and there are a lot of guys there who dabble in demo coding and effects.