Creators not Consumers

Home

Design pages

One

Two

Wallpapers


3D Art pages

One

Two

Three

Four

Westonbirt

Stonehenge

Avebury

Cheddar


The creators not consumers Anti Massacre Web Page


Kiss

Kiss code tutorials


Ethics


Quotes


Politics OnLine UK


Articles and rants


Iraq home

The day of horror

Blair speech

Iraq02

Iraq03

Iraq04

Iraq05

Iraq06

Iraq07

Iraq08

Iraq09

Freedom is slavery


Bureaucracy

Foot and mouth

Chutzpah

Big Brother Britain


A price too high

Morphy Richards

Consuming

Beauty


Political action links


Tutorials

One

Two


Links

Down shifting

Graffiti removal


Contact

 

The following pages are my attempt to demystify Kiss code from my experience so far. I hope it helps.

Once you have some cels then you need to put them in a 'cnf' file. For a tutorial about that go here. http://www.geocities.com/hallamshire/ 

with a 'cnf' file, you can begin to code the doll.

If you've followed Zorro's tutorial above, you will have something like this:

; This .cnf file was written by PlayFKiSS.
; Please edit this file and header before redistributing.
;;
; **Palette files**
%palette.KCF
;
(800,600) ; Environment size
[2 ; Border color
;
;
; ** Cel entries **
;
#1.999 body.cel *0 :0 1 2 3 4 5 6 7 8 9 ;; comment: this cel is fixed, it will take 999 mouse clicks to release it.
#2 any.cel *0 :0 1 2 3 4 5 6 7 8 9 ;; comment: this cel is not fixed
;
; ** FKiSS stuff **
;
;@EventHandler()
;
;@initialize()
;
;@begin()

All I am going to deal with comes after ;@initialize(). In fact most of it will come after ;@begin()

What does the code mean?

Code diagram #1

In the diagram above:

1. Every line (after ; ** FKiSS stuff ** ) begins with ;@

2. This is a command, in this case a left mouse click

3. The named cel is enclosed with (" ")

4. The cel name

5. This line is a sub-command and requires a space after the ;@

6. The sub-command, in this case, makes the cel disappear

The next bit of code deals with what is called 'snap-to', making one cel jump to a specific place in relation to another.

Code diagram #2

7. In this command line, this is the cel that is movable, the one we've clicked on and moved with the mouse.

8. This is the cel that the first cel (7, 'any.cel') is coming into contact with (colliding)

5. See 5 above

9. Respectively these are saying, move a cel a certain amount on the x axis and on the y axis

10. This is the number in the ; ** Cel entries ** of the cel (any.cel) that we want to move in relation to...

11. ...this cel (body.cel)...

12. ...by this many pixels

What is this x, y thing about?

Code diagram #3

Code diagram #2

Regardless of the 'visible' shape of a cel in the doll viewer, all cels are drawn and exist in rectangular boxes. The top left most corner is the one we are interested in when we do a collide command. As you can see it is point 0 on the x and y axes. In 'Code diagram #2' the x and y co-ordinates were 23, 56, shown by the white dot in the diagram above.

Code diagram #4

When 'any.cel' (#2) collides with 'body.cel' (#1) in Code diagram #2, the top left corner of 'any'cel, moves to the point x = 23, y = 56 in relation to 'body.cel' (#2). What you see in the Kiss doll viewer is Fig 4.

This snap to code can also be written as follows, but this code works if any part of the invisible boxes touch whereas 'collide' works only when the visible parts of the cels touch (Thanks Tara for putting me right on this):

;@in(#1, #2)
;@ movebyx(#2, #1, 23)
;@ movebyy(#2, #1, 56)

If you want to copy and paste the code I've used, here it is, just change the cel names, numbers and x, y co-ordinates to suit your needs:

;@press("any.cel")
;@ unmap("any.cel")

;@collide("any.cel", "body.cel")
;@ movebyx(#2, #1, 23)
;@ movebyy(#2, #1, 56)

If you want to make one cel disappear and make another cel appear in it's place, then use the following:

;@press("any.cel")
;@ unmap("any.cel")
;@ map("another.cel")

 

Next - Blinking dolls

2000 Keith Lindsay-Cameron. All rights reserved.