Our Scripts Vault contains many game scripts that you can use to create your own game!
function createPlanet($gid,$sid,$pid) { sql("INSERT planet ..."); }function createSystem($gid,$sid) {$amount=rand(1,12); for($n=0;$n<$amount;$n++) createPlanet($gid,$sid,$n); }function createGalaxy($gid) {$amount=rand(20,50); for($n=0;$n<$amount;$n++) createSystem($gid,$n); }function createUniverse() {$amount=rand(5,10); for($n=0;$n<$amount;$n++) createGalaxy($n); }createUniverse();
function createPlanet($gid,$sid,$pid) { $resource=rand(1,5); echo("Planet: #$pid, resource:$resource"); }function createSystem($gid,$sid) {$amount=rand(1,12); for($n=0;$n<$amount;$n++) createPlanet($gid,$sid,$n); }function createGalaxy($gid) {$amount=rand(20,50); for($n=0;$n<$amount;$n++) createSystem($gid,$n); }function createUniverse() {$amount=rand(5,10); for($n=0;$n<$amount;$n++) createGalaxy($n); }srand(1);createUniverse();
Elite/Frontier
http://en.wikipedia.org/wiki/Archimedean_spiralwith this you can generate your x/y coordiantes, you save the Coordiantes in array and print it out with json_encode php function. now you will have a JSON Array in JavaScript. now yare able to add Divs and give them Positions