Skip to content

Instantly share code, notes, and snippets.

View thesnarky1's full-sized avatar

thesnarky1

  • Three Planets Software
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
</body>
</html>
@thesnarky1
thesnarky1 / gist:6147879
Created August 3, 2013 20:34
fog of war idea for harkins
Adding unknown unknowns to fog of war visibility.
The disposition of your forces gives you an area where you have reasonable certainty you know what's going on (the unshaded terrain). However, we have to introduce a mechanism to both make you look somewhere that's no the enemy (to accurately reflect true fog of war) and give the enemy a chance to get rogue-like and sneaky. We can do this by adding a "confusion" coefficient to the Tiles and movement functions.
Basic idea is to have a variable amount of "confusion" for each Tile that we'll take into account when determining visibility. This only is checked when the Tile is the last one in the player's visibility range (or maybe for closer ones if it's high?). Random number times this coefficient gives us a chance to place a potential Player (question mark) on that square. This will encourage the opponents to spend time chasing ghosts, as opposed to sitting still and waiting for them to come in.
In addition, this confusion coefficient will give a possibilit
<?php
//All variables replaced, extra evals removed.
$a=0;
$b=0;
$c=0;
$d=3;
$l=base64_decode($o);
$e=0;
$g=(ord($l[1])<<8)+ord($l[2]);