Finally, after a long break, here is another competition. Your task is to size optimize a gravity particle routine.
The deadline will be : Sunday, July 5th 1998 at 18.00 CET. Everything has to be mailed to email@example.com till then.
You have to simulate a lot of particles with a very small mass moving around an object with a big mass. Interaction between the particles is not taken into account.
A pseudocode program:
ob.x, ob.y = Position of the heavy object.
This is only an approximation of course.
This time judgeing and ranking the entry has been quite difficult. Four out of eight entries violated the rules in some way. One entry didnt work at all and was taken out because of that. (Daves entry).The other entries had flaws like uninitalized variables (registers) or they were plotting pixels into memory other than the chunky buffer.
I solved this problem by added the number of bytes needed to fix the flaw plus two extra bytes as "penality"
Thanks must go to nao for helping to test and rank the routines
*) Merkos routine didnt initalise the register D4. Thus the first particle could be drawn at an erranous position. A moveq #0,d4 had to be added to fix this, adding two bytes.
**) These routines drew pixel into memory areas adjacent to the chunky buffer. This could have been easily fixed by inserting an eor #$8080,dx to calculate the pixel position offset instead of using an indexed addressing mode. No extra byte required.
***) These routines used an assymetric "particle space" by setting the "heavy object" to (128;128) in the particle space (thats not the screen space). Since the placement of the heavy object in the "particle space" wasnt mentioned in the competition rules I didnt count this as flaw.
In case you want to see the contributions code. Download the package here Please remember that even though you can download these routines, they are still not public domain. Ask before using any of these routines, or give credits at least.