Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > Requests > Help with coding newschool routines.
2007-01-14 01:44
Conrad

Registered: Nov 2006
Posts: 840
Help with coding newschool routines.

Hi there.

Recently I have joined the c64 scene and I would like to start to learn how these new type of routines work.

As a coder, I can only manage to do old school routines such as raster bars, side border, FLD and various others. As for new routines like 3D, checkerboards, plasmas, etc... I am completely baffled with how they work, but am very eager to learn how they work.

I have in the past read various articles about demo coding, but they don't really provide the info I need.

Any volunteers to help me will be much appreciated!
Thanks, CRD.
 
... 20 posts hidden. Click here to view all posts....
 
2007-01-17 14:39
Oswald

Registered: Apr 2002
Posts: 5076
dycps, plotters, liners are middleskool :P ;)
2007-01-17 15:00
Cruzer

Registered: Dec 2001
Posts: 1048
Oldskool/newskool is definitely too simple. In my view there has been 4 major "skools" in the C64 scene history:
- CracktroSkool: The first demos were clearly very inspired by cracktros with scrolls, swinging logos and rasterbars. With time these effects progressed into more complex versions, e.g. DYCPs instead of normal scrollers, tech-tech instead of a swinging logo, rastersplits instead of a normal rasterbar, etc.
- AmigaSkool: The next step was trying to convert effects known from Amiga, such as filled vector, vectorballs and plasma to C64.
- PCskool: RotoZoomers, bumpmapping, texturemapping, etc.
- ArtSkool: Who cares about routines, it's the message/story of the demo that counts.
2007-01-17 15:07
Scout

Registered: Dec 2002
Posts: 1570
Quote:
- ArtSkool: Who cares about routines, it's the message/story of the demo that counts.


But also the use of *skool effects in a creative/other way.
2007-01-17 15:37
Oswald

Registered: Apr 2002
Posts: 5076
cruzer, I'd stick a crest/dutchbreezeskool between crackskool and amigaskool ;)
2007-01-17 15:44
Cruzer

Registered: Dec 2001
Posts: 1048
@Scout: True, just trying to simplify it :)

@Oswald: True, especially DutchBreezeSkool. Maybe you could call it early artskool though, since artskool is also about "slideshows are demos too". CrestSkool I don't know about. Basically Crests demos have always been CracktroSkool and then later evolving into ArtSkool.
2007-01-17 20:01
Optimus

Registered: Jan 2002
Posts: 122

* You just need to start a PC compiler with some nice and easy to use library that gives you a software buffer to experiment and learn how effects work (I suggest DevC++ with either SDL or TinyPTC(Maybe you can get both from devpaks especially packaged for DevC. If you don't know C, there is Freebasic which is rather fast for a basic compiler and has SDL/TinyPTC or it's own gfx lib integrated (search for FBide to get the whole package)).

* Then get some tutorials. The most easy concepts to understand and start with is Plasma or Fire effects I think. Then, sine image distortion. Then, maybe zoom and rotate. Then, the other stuff (bump, tunnel, floor, sphere mapping, water, radial blur, blobs, etc.).

* Still, you won't be able to make the effects run fast enough on the C64 without getting some insight in what clever speedcodes (aka unrolled code, movelists, etc.) to generate. But that's for later. First get a grip on how some things works..

p.s. It's ironic to me that I went on through the opposite way than most people do. When I started with democoding on 8bits (CPC and later C64), I remember I was scared of oldschool stuff because of the excessive timing and hardware tricks involved, thus I had to learn a lot new stuff. I was more experienced before in mid/newschool pixel effects (because of trying to meme PC demoeffects in Quickbasic ;) and I just needed a software buffer to do stuff, so my first demo on the CPC was displaying fires and plasmas which was unique though for the CPC scene who was doing mostly hardware fx demos :P
2007-01-17 20:39
Optimus

Registered: Jan 2002
Posts: 122
Mmm,. I can hardly find some central site with tutorials on demo effects atm.

More help and thoughts:

I once tried to devide the effects on some diferrent categories according to the way pixel manipulation is happening. In most of them you need to move serially through the pixel buffer and follow a simple and the same logic for each pixel, so it's quite simple at the end and you don't even need to wipe out the background because the next frame does this.

I'll write the diferrent logics in brief here for inspiration of the basic ideas:

1) Color = F(x,y) or Color = F(angle, radius)

For each pixel, the color is a function of it's coordinates. In cartesian coordinates (X,Y) if the function has sines/cosines in it, you will get plasmas (Nice tutorial to get the visual mathematician connection of it). If the function is based in polar coordinates (Angle and radius of a pixel from the center of the effect) you get polar plasmas (swirls, radial stuff, check my tutorial with screenshots and functions here). And many more you can get if you try strange stuff..

2) Color = Bitmap[U,V]
where U = F(x,y) and V = G(x,y)

For each pixel, the color is taken from a Bitmap and from it's pixel with coordinates (U,V), which are being calculated from functions of the actual X,Y pixel on the effect screen. It's like for each pixel you render corresponds a pixel from the bitmap. Rotozoomers, tunnels, sphere mapping, floors, etc. In some of them, you can create huge speedcodes for every pixel, with precalculated correspondance to another side of the memory where the texture is. All you just need is to make it work on the compiler and know which maths generate what you want to show, then how to generate from those data the unrolled codes later on the C64. Then either by scrolling the texture or increasing some pointers (depending on the unrolled codes or size of the texture), you can have some cool effects going on (I once called this, static mapping). Rotozoomer is a bit diferrent than tunnels/sphere/floor in this aspect, but similar in the rendering concept.

3) Filters. For fire effects and other stuff. In short, you have a gradient pallete (where 255 is some bright color, and it fades to some dark color till zero). If you have bright values in your fire buffer and for each pixel you take the average of the around pixels: Pixel(x,y) = (Pixel(x-1,y) + Pixel(x+1,y) + Pixel(x,y-1) + Pixel(x,y+1)) / 4, you can easilly imagine what will happen (but test it in the compiler). The bright colors blur to the black background. Water is also happening via some filter, unlike it didn't seemed like this.

4) Other effects I haven't categorized. Fractals, blobs, bump, etc.

5) 3D is a whole new world and I can hardly think how to optimize stuff for 8bits atm (And that low precission of bits ;P). Maybe something I'll still have to research a lot. But you can check some nice tutorials just to get an idea of how things works on the PC compiler.

Also:
Nice whirlpool tutorial specifically for C64 (Features speedcode generation)

Old page with lot's of good tutorials, check the 2d effects for a start
2007-01-18 00:06
Conrad

Registered: Nov 2006
Posts: 840
@Optimus:
Well, that is CERTAINLY a huge amount of info you have provided (probably too much ;) but it sure is useful! Thanks for helping :-)

Oh and as for C/C++ ...I'm quite an expert with that language, although I haven't used it for effects which involve advanced mathematics.

Anyway, thanks again.
2007-01-18 09:18
Oswald

Registered: Apr 2002
Posts: 5076
CRD, I advise you to read all that stuff including the links, _very_good_ infos to understand the basic ideas behind the newschool effects. On how to optimise them on c64 ask us here or at #c-64.
Previous - 1 | 2 | 3 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
kbs/Pht/Lxt
zscs
JEZ
Guests online: 130
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 Wonderland XIV  (9.6)
8 Comaland 100%  (9.6)
9 No Bounds  (9.6)
10 Unboxed  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Morph  (9.5)
8 Dawnfall V1.1  (9.5)
9 Onscreen 5k  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Nostalgia  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.2)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Cash  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.042 sec.