  Let $n$ be a prime power, $r$ be a prime with $r\mid n-1$, and
$\varepsilon\in (0,1/2)$. Using the theory of multiplicative character sums and
superelliptic curves, we construct new codes over $\mathbb F_r$ having length
$n$, relative distance $(r-1)/r+O(n^{-\varepsilon})$ and rate
$n^{-1/2-\varepsilon}$. When $r=2$, our binary codes have exponential size when
compared to all previously known families of linear and non-linear codes with
relative distance asymptotic to $1/2$, such as Delsarte--Goethals codes.
Moreover, our codes are linear.
