Per Nilsson

Boys and Girls

Playful Flash Exercise

Boys and Girls

Description

I wrote this "dating simulation" during a course in Flash Algorithms. Boys and girls (this is a strictly heterosexual simulation) start off on opposite sides of a pen. When they run into each other, it counts as a "date", and they start thinking about each other. Should they run into each other again, they fall in love, and run off to live happily ever after.

Like real-life love, the simulation has its peculiarities. Sometimes a young couple has just found each other, and prepare to exit stage left, when another, single, person runs in and steals one of them! Other times, two people just don't have the spark, and will run around ignoring each other forever.

Technologies

Object-oriented Actionscript 2.0 and random number generation using a Normal Distribution curve.

You need Adobe Flash to view this content

Download Flash source files (28Kb Zip)

View Actionscript Source Files

Please note that some code comments are in Swedish.