Crowd Simulation

by Orange55
Wanna see hundreds of units fight each other to the death?
ID:2468187
 
Hello to all my fellow hobbyists,

I've optimized the source code to this demonstration, the simulation now handles about 1K units fighting at a time without lag.

Basically, I tossed out BYOND's movement system in favor of manual translations, which sped it up quite a bit.

The crowd sim is pretty fun to toy with: I've released the source code, so anyone should be able to download it as a zip and edit it.

Bear in mind, the code is not commented - use it at your own risk
It bothers me that you use goto instead of a more common infinite loop structure like while(TRUE) or an empty for().

It also bothers me whenever someone uses spawn() as if it doesn't take a block. It really shouldn't affect the next line if the next line isn't indented.
// This makes sense:
spawn(time) spawned_code_here
not_spawned_code_here

spawn(time)
spawned
code
here
not_spawned_code_here

// This doesn't make sense:
spawn(time)
spawned_code_here
not_spawned_code_here
In response to Kaiochao
Different programmers prefer different things. I personally couldn't care less about the style code is written in as long as I can read it. but if you want, feel free to change it and re-release it under a specific style guide that you prefer.