Tutorial: film-files for showing a more complex film
====================================================

Example for a film showing a house with a smoking chimney, the moon,
a tree, a cloud passing by darkening the picture when it covers the moon,
and a running animal.
To run this film, use tut-film1.c.
The film is located in "film/film-3/" with name "film.film".


How to organize the film
At first we have to consider how many picture-files are needed.
There are many possibilities between many picture-files
and only a few of it which use many parameters.

We want to use 8 pictures using 5 pictures-files (some are reused):
First we will see the smoking house, the tree and moon, a music is starting
-> first picture-file.
Next the cloud is coming from left up to the middle of the picture
-> second picture-file.
While the cloud is going on, an animal is running from right to left
-> third picture-file.
The animal has gone, the cloud moves on until it reaches the moon
-> second picture-file again with other parameters.
While the cloud is covering the moon, it becomes darker
-> forth picture-file.
The cloud covers the moon, an owl is crying
-> fifth picture-file.
While the cloud is decovering the moon, it becomes brighter
-> forth picture-file again with other parameters.
The cloud moves on until it leaves the picture
-> second picture-file again with other parameters.


film.film
In this main film-file we load the 8 pictures.
For some additional descriptions please refer to film/film-3/film.film

==>
[FILM 40]
# Loop-time 40 milliseconds

# 1. picture (1. picture-file)
# The smoking house, tree and moon, a music is starting
1 film.pic1

# 2. picture (2. picture-file)
# show this picture with 300 repeats until the cloud has reached its middle
# parameter 1: x-start of cloud
300 film.pic2 -45

# 3. picture (3. picture-file)
# the cloud is going on, show the running animal
# parameter 1: x-start of cloud
180 film.pic3 105

# 4. picture (2. picture-file)
# the cloud is going on until it reaches the moon
# parameter 1: x-start of cloud
50 film.pic2 195

# 5. picture (4. picture-file)
# the cloud is covering the moon, it becomes darker
# parameter 1: x-start of cloud
# parameter 2: start value for brightness
# parameter 3: whether brightness is becoming darker (=-1) or brighter (=1)
100 film.pic4 220 0 -1

# 6. picture (5. picture-file)
# it is the darkest moment in the picture, an owl is crying
# we don't draw anything, but also don't clear the screen.
1 film.pic5

# 7. picture (4. picture-file)
# the cloud leaves the moon, it becomes brighter again
# parameter 1: x-start of cloud
# parameter 2: start value for brightness
# parameter 3: whether brightness is becoming darker (=-1) or brighter (=1)
100 film.pic4 270 -20 1

# 8. picture (2. picture-file)
# the cloud is moving until it leaves the window
# parameter 1: x-start of cloud
160 film.pic2 320
<== film.pic1 First picture-file, loaded from film.film For some descriptions please refer to film/film-3/film.pic1 ==>
loop(100)
clear(0)

bitmap(270,20,trans) ../bitmaps/moon.vga
bitmap(105,100,trans) ../bitmaps/tree.vga
bitmap(200,130,trans) ../bitmaps/house.vga
sprite(176,55,trans,next) ../sprites/smoke.sprite
sprite(172,57,trans,current) ../sprites/smoke.sprite

soundstart(loop,100) ../sounds/rappcook.mid
<== film.pic2 Second picture-file, loaded from film.film For some descriptions please refer to film/film-3/film.pic2 ==>
clear(0)

bitmap(270,20,trans) ../bitmaps/moon.vga
bitmap($1+$0/2,35,trans) ../bitmaps/cloud.vga
bitmap(105,100,trans) ../bitmaps/tree.vga
bitmap(200,130,trans) ../bitmaps/house.vga
sprite(176,55,trans,next) ../sprites/smoke.sprite
sprite(172,57,trans,current) ../sprites/smoke.sprite
<== film.pic3 Third picture-file, loaded from film.film For some descriptions please refer to film/film-3/film.pic3 ==>
clear(0)

bitmap(270,20,trans) ../bitmaps/moon.vga
bitmap($1+$0/2,35,trans) ../bitmaps/cloud.vga
bitmap(105,100,trans) ../bitmaps/tree.vga
bitmap(200,130,trans) ../bitmaps/house.vga
sprite(176,55,trans,next) ../sprites/smoke.sprite
sprite(172,57,trans,current) ../sprites/smoke.sprite

sprite(350-$0*2,185,trans,next) ../sprites/animal.sprite
<== film.pic4 Forth picture-file, loaded from film.film For some descriptions please refer to film/film-3/film.pic4 ==>
clear(0)

brightness($2+$3*$0/5)

bitmap(270,20,trans) ../bitmaps/moon.vga
bitmap($1+$0/2,35,trans) ../bitmaps/cloud.vga
bitmap(105,100,trans) ../bitmaps/tree.vga
bitmap(200,130,trans) ../bitmaps/house.vga
sprite(176,55,trans,next) ../sprites/smoke.sprite
sprite(172,57,trans,current) ../sprites/smoke.sprite
<== film.pic5 Fifth picture-file, loaded from film.film For some descriptions please refer to film/film-3/film.pic5 ==>
soundstart(once,40) ../sounds/owl.wav
<== Running the film When you run the film, you also will see our debug output. There are 3 numbers: - the first represents the current (non-comment) line of film.film - the second represents the current value of $0 (number of repeat) - the third represents the loop number of the picture-file The film-files film/film-3/film.film film/film-3/film.pic1 film/film-3/film.pic2 film/film-3/film.pic3 film/film-3/film.pic4 film/film-3/film.pic5
[Previous] - [Index] - [Next]