As you said, the main thing is to construct the central extension.
The story is relatively straightforward for groups of type $A$ and gets more complicated in the general case.
First, let $\mathcal K=k((t)), \mathcal O= k[[t]]$.
As usual, let the affine Grassmannian $Gr_G$ be the quotient $G(\mathcal K)/G(\mathcal O)$. Then in order to construct a central extension of $G(\mathcal K)$ it is enough to construct a line bundle $\mathcal L$ on $Gr_G\times Gr_G$ which is

a) $G(\mathcal K)$-equivariant (note that this is the same as to specify a $G(\mathcal O)$-equivariant line bundle on $Gr_G$)

b) Has the property that for any $x_1,x_2,x_3\in Gr_G$ we have an isomorphism $\mathcal L(x_1,x_3)=\mathcal L(x_1,x_2)\otimes \mathcal L(x_2,x_3)$ satisfying obvious associativity relation (of course, all this is actually an additional structure - a careful way to say it is to identify two lifts of $\mathcal L$ to
$Gr_G\times Gr_G\times Gr_G$ such that two identifications on $Gr_G^4$ coincide, but this is standard).

Indeed given such $\mathcal L$ we can define the central extension $\hat{G}$ as the set of pairs $(g,\alpha\in \mathcal L(1,g)), \alpha\neq 0$ (here I identify elements of $G$ with their image in $Gr_G$) and the multiplication is easy from b) above.

Now we need to construct $\mathcal L$ as above. This is easy if $G=GL(n)$ (or $G=SL(n)$). Namely, in this case $Gr_G$ is the same as the space of lattices $\Lambda \subset \mathcal K^n$ and for any two such lattices $\Lambda_1,\Lambda_2$ we can set $\mathcal L(\Lambda_1,\Lambda_2)=\det(\Lambda_1/\Lambda_1\cap \Lambda_2)\otimes \det(\Lambda_2/\Lambda_1\cap\Lambda_2)^{-1}$. Properties a), b) are obvious.

For general $G$ the story is more complicated. First, canonically central extensions are in one-two-one correspondences with even invariant bilinear forms
on the Cartan of $Lie(G)$. For simple $G$ there is a minimal such form and it is enough to construct the extension corresponding to this minimal form (all others are "powers" of it in the appropriate sense). For $G=SL(n)$ the above construction gives exactly the minimal extension. For general $G$ you can easily adapt the above construction once you choose a representation $V$ of $G$. The problem is that when $G$ is not of type $A$, there is no $V$ that gives the minimal form (any $V$ defines an even invariant form on the Lie algebra of $G$ but usually it is not minimal). So, in this way you are going to get powers of the correct line bundle (and thus powers of the correct central extension). For instance, if you take $V$ to the be the adjoint representation, you get the $2h^{\vee}$-power of the minimal bundle, where $h^{\vee}$ is the dual Coxeter number. Constructing minimal $\mathcal L$ for general $G$ is a relatively tricky business - the best treatment of this that I know was given by Faltings in

Gerd Faltings, *Algebraic loop groups and moduli spaces of bundles*. J. Eur. Math. Soc. 5 (2003), 41-68. doi: 10.1007/s10097-002-0045-x.