Amn
04-22-2009, 05:19 PM
Folks, I have a proposal for a competition. All who want can participate.
The competition is to create a small SWF demo. Preferrable language is ActionScript 3, although it is interesting to know that someone uses something else than ActionScript to generate the SWF. However a strict requirement is that the SWF version is at least 9, i.e. running under the AVM2 (if you do not know what AVM2 means, you probably should not take part, however you are very welcome to be an observer). Otherwise it would be difficult to compare different virtual machines in action doing the same demo.
The demo is very strictly defined:
Visually simulate a 2-dimensional field of initially randomly positioned disc-shaped particles of equal diameter of 10 pixels with initially random speeds of up to 200px/second, colliding elastically with each other. They must be confined within a 800x600(px) sized frame, i.e. they must bounce off its edges. They must also bounce off each other the way elastic collisions between equal-size disc shaped 'particles' are implemented, i.e. according to a) law of conservation of linear momentum b) law of conservation of kinetic energy and c) naturally, upon collision, normal forces are perpendicular to the surface of collision. This is your classical and MUCH simplified pool table ball mechanics. The theory of elastic collision is available on Internet, and is explained throughly for us to apply. We would use the http://en.wikipedia.org/wiki/Elastic_collision as reference description and guideline. How you implement it and how you trade in accuracy for speed etc is part of the point of your contribution. Think of the wikipedia article as an ActionScript interface - the implementation is yours as long as it 'implements' the interface ;-)
The animation must be realtime, although naturally the Flash Player will only give us so much framerate. So, what I mean is that particles are animated by real time, no matter framerate. i.e. some sort of distance = particle_speed * (getTimer() - t0). If you change the framerate, they will still move as fast as they would otherwise, just not redrawn as frequently. If you do not understand, ask me and I will try to explain.
So, to sum up:
Strict requirements, must be honored:
1. A field of n particles,
2. Initially randomly positioned within the 800x600 frame
3. Initially random constant velocity vector of up to 200px/second
4. Disc-shaped, 10px in diameter
5. Moving in 2 dimensions
6. Bouncing off the 800x600 frame
7. Bouncing each other on collision as outlined in http://en.wikipedia.org/wiki/Elastic_collision
8, You have to have an account on this forum
Also remember, that certain approximations of simulation is unavoidable, f.e. sometimes particles will get 'entangled' together when they collide INTO each other, as opposed to colliding WITH each other. If you cannot solve it, don't. If your particles overlap, make a choice. We want your contribution for visual treat of it, we do not want you having a weekend long headache and your girlfriend/boyfriend leaving you for someone who spends less time reading on molecular dynamics simulation. Remember, even REALLY BAD simulation will do as long as the points above are honored, except #7 which can be really hard to do, so just be creative and dont break your head trying, but try nevertheless - after all elastic collision is part of the visual treat here.
Stuff you can do as you please:
1. Color of particles and the rest, obviously, if you want. If it slows your demo down, tough luck, read on judges' priority below :-)
2. You choose (obviously) the mathematical precision of your demo, if you want to trade in precision for speed, you may do so, but it will be taken into consideration by the judges, especially if it affects visual quality (more on judging below).
3. You can add stuff BEYOND the strict requirements, if you feel you are too cool for school and have the competition already in your pocket. Feel free to add flying text, sound effects, logos and all that jazz, as long as you are aware of the priority the judges will have :-)
4. You do not have to submit ANYTHING but the SWF. Your tools of choice, language choice and the source code itself will not be asked for during the run of the competion. You can play the mystery game and as long as you produce and provide the SWF, how you made it is your secret. Just make sure it is you who made it ;-)
5. Framerate :-) Since this is realtime, framerate may or may not help you the way you thought it would, because we will be judging speed of your realtime animation (read above).
6. You may demand Flash Player 10, instead of 9, if your demo has to use the 10's features.
We have to choose a good judge or two here and now. Preferrably someone with relevant qualities. Obviously judges cannot participate in the competition. Just reply if you feel like judging.
Judges will have to judge the following, in descending priority:
1. Amount of particles present
2. REAL frames per second (Flash Player WILL slow down if it cannot calculate fast enough, so you will not be able to cheat this one) - how smooth it is
3. Visual perception of accuracy of simulation of collision detection and consequences. You may use 'int' types if it helps your speed, but if it all gets weird artifacts, judges will not ignore this.
4. The visual and artistic factor - colors, eye-candy etc. This is least priority, so spending too much time on this obviously will have be futile?
Judges must only judge on the basis of SWF displayed in the Flash Player. Obviously the same test platform has to apply for all contestants. I have not decided on the rating system yet.
I personally will contribute / give out a meaningful prize. And before all skeptics here take a long hard look at me, let me say I WILL participate myself, and I do not need this for a) School assignment (school is long over for my part) b) Client expecting implementation. THIS IS ALL JUST FOR FUN!
We have to agree on prize, and I am funding it from own pocket up to 20$, which I guess is a price of a DVD or Audio CD. Hey, "Blade Runner: The Final Cut" on Blu-ray for little over $15 :-) If we add up our coins, it can certainly be more, but let us keep the fun part. This is not about winning a MacBook Pro :-)
Judgement Day on Thu, April 30 8pm GMT. Good time, or?
1st and 2nd place only. 2nd place - no prize, at least not from my shallow pocket, but feel free to make a pot, preferrably smaller than the pot for 1st place :-) When winners are announced, they are encouraged to provide the cool details of implementation, the source code and list their tools of trade. Which is part of the point of doing this on public forums where people ask and answer questions.
Umm, I don't know if I missed anything but I can edit this later/add stuff.
If this can be made Sticky, I guess why not?
Does this fly? :D
The competition is to create a small SWF demo. Preferrable language is ActionScript 3, although it is interesting to know that someone uses something else than ActionScript to generate the SWF. However a strict requirement is that the SWF version is at least 9, i.e. running under the AVM2 (if you do not know what AVM2 means, you probably should not take part, however you are very welcome to be an observer). Otherwise it would be difficult to compare different virtual machines in action doing the same demo.
The demo is very strictly defined:
Visually simulate a 2-dimensional field of initially randomly positioned disc-shaped particles of equal diameter of 10 pixels with initially random speeds of up to 200px/second, colliding elastically with each other. They must be confined within a 800x600(px) sized frame, i.e. they must bounce off its edges. They must also bounce off each other the way elastic collisions between equal-size disc shaped 'particles' are implemented, i.e. according to a) law of conservation of linear momentum b) law of conservation of kinetic energy and c) naturally, upon collision, normal forces are perpendicular to the surface of collision. This is your classical and MUCH simplified pool table ball mechanics. The theory of elastic collision is available on Internet, and is explained throughly for us to apply. We would use the http://en.wikipedia.org/wiki/Elastic_collision as reference description and guideline. How you implement it and how you trade in accuracy for speed etc is part of the point of your contribution. Think of the wikipedia article as an ActionScript interface - the implementation is yours as long as it 'implements' the interface ;-)
The animation must be realtime, although naturally the Flash Player will only give us so much framerate. So, what I mean is that particles are animated by real time, no matter framerate. i.e. some sort of distance = particle_speed * (getTimer() - t0). If you change the framerate, they will still move as fast as they would otherwise, just not redrawn as frequently. If you do not understand, ask me and I will try to explain.
So, to sum up:
Strict requirements, must be honored:
1. A field of n particles,
2. Initially randomly positioned within the 800x600 frame
3. Initially random constant velocity vector of up to 200px/second
4. Disc-shaped, 10px in diameter
5. Moving in 2 dimensions
6. Bouncing off the 800x600 frame
7. Bouncing each other on collision as outlined in http://en.wikipedia.org/wiki/Elastic_collision
8, You have to have an account on this forum
Also remember, that certain approximations of simulation is unavoidable, f.e. sometimes particles will get 'entangled' together when they collide INTO each other, as opposed to colliding WITH each other. If you cannot solve it, don't. If your particles overlap, make a choice. We want your contribution for visual treat of it, we do not want you having a weekend long headache and your girlfriend/boyfriend leaving you for someone who spends less time reading on molecular dynamics simulation. Remember, even REALLY BAD simulation will do as long as the points above are honored, except #7 which can be really hard to do, so just be creative and dont break your head trying, but try nevertheless - after all elastic collision is part of the visual treat here.
Stuff you can do as you please:
1. Color of particles and the rest, obviously, if you want. If it slows your demo down, tough luck, read on judges' priority below :-)
2. You choose (obviously) the mathematical precision of your demo, if you want to trade in precision for speed, you may do so, but it will be taken into consideration by the judges, especially if it affects visual quality (more on judging below).
3. You can add stuff BEYOND the strict requirements, if you feel you are too cool for school and have the competition already in your pocket. Feel free to add flying text, sound effects, logos and all that jazz, as long as you are aware of the priority the judges will have :-)
4. You do not have to submit ANYTHING but the SWF. Your tools of choice, language choice and the source code itself will not be asked for during the run of the competion. You can play the mystery game and as long as you produce and provide the SWF, how you made it is your secret. Just make sure it is you who made it ;-)
5. Framerate :-) Since this is realtime, framerate may or may not help you the way you thought it would, because we will be judging speed of your realtime animation (read above).
6. You may demand Flash Player 10, instead of 9, if your demo has to use the 10's features.
We have to choose a good judge or two here and now. Preferrably someone with relevant qualities. Obviously judges cannot participate in the competition. Just reply if you feel like judging.
Judges will have to judge the following, in descending priority:
1. Amount of particles present
2. REAL frames per second (Flash Player WILL slow down if it cannot calculate fast enough, so you will not be able to cheat this one) - how smooth it is
3. Visual perception of accuracy of simulation of collision detection and consequences. You may use 'int' types if it helps your speed, but if it all gets weird artifacts, judges will not ignore this.
4. The visual and artistic factor - colors, eye-candy etc. This is least priority, so spending too much time on this obviously will have be futile?
Judges must only judge on the basis of SWF displayed in the Flash Player. Obviously the same test platform has to apply for all contestants. I have not decided on the rating system yet.
I personally will contribute / give out a meaningful prize. And before all skeptics here take a long hard look at me, let me say I WILL participate myself, and I do not need this for a) School assignment (school is long over for my part) b) Client expecting implementation. THIS IS ALL JUST FOR FUN!
We have to agree on prize, and I am funding it from own pocket up to 20$, which I guess is a price of a DVD or Audio CD. Hey, "Blade Runner: The Final Cut" on Blu-ray for little over $15 :-) If we add up our coins, it can certainly be more, but let us keep the fun part. This is not about winning a MacBook Pro :-)
Judgement Day on Thu, April 30 8pm GMT. Good time, or?
1st and 2nd place only. 2nd place - no prize, at least not from my shallow pocket, but feel free to make a pot, preferrably smaller than the pot for 1st place :-) When winners are announced, they are encouraged to provide the cool details of implementation, the source code and list their tools of trade. Which is part of the point of doing this on public forums where people ask and answer questions.
Umm, I don't know if I missed anything but I can edit this later/add stuff.
If this can be made Sticky, I guess why not?
Does this fly? :D