Tag Info

New answers tagged

0

tl;dr code example with md5 (you can run it here): function getHashTail($pair) { $res = hexdec(substr(md5($pair), -4)) % 1024; return $res < 100? dechex($res % 16) : ' '; } Usage example: <html> <head> <title>Hash space</title> <style> div { text-align:center; vertical-align:top; ...


0

What you're describing is procedural generation (of some kind of universe in this example). This is actually rather trivial to do. Basically you'll just have to calculate everything on basis of your coordinates. This can either be done by simple math or by using the coordinates as the seed for your random number generator. In your example, you want 20 % of ...



Top 50 recent answers are included