Let $k$ be an algebraically closed field of characteristic 0.
Let $G$ be a connected reductive group over $k$.
The notion of the algebraic fundamental group of $\pi_1(G)$
was introduced in
my memoir here
and generalized to arbitrary characteristic
here
and to reductive group schemes here.
Let $G^{\rm ss}=[G,G]$ denote the commutator subgroup of $G$ (which is semisimple).
Let $G^{\rm sc}\twoheadrightarrow G^{\rm ss}$ denote the universal covering of $G^{\rm ss}$ (then $G^{\rm sc}$ is simply connected).
We consider the composite homomorphism
$$ \rho\colon G^{\rm sc} \twoheadrightarrow G^{\rm ss} \hookrightarrow G.$$
Let $T\subset G$ be a maximal torus.
By abuse of notation, we write $T^{\rm sc}$ for the preimage of $T$ in $G^{\rm sc}$.
We have a homomorphism
$$\rho\colon T^{\rm sc}\to T,$$
which in general is neither surjective nor injective.
Let $X_*(T)=\{\chi\colon \mathbf{G}_{m,k}\to T\}$
denote the cocharacter group of $T$.
We obtain a homomorphism
$$ \rho_*\colon X_*(T^{\rm sc})\to X_*(T). $$
Definition. $\pi_1(G)=X_*(T)/\rho_* X_*(T^{\rm sc}). $
This algebraic fundamental group $\pi_1(G)$
does not depend on the choice of $T$ (up to a canonical isomorphism).
Further, if $K$ is an algebraically closed field extension of $k$,
then clearly
$$ X_*(T)=X_*(T\times_k K)$$
and
$$ \pi_1(G)=\pi_1(G\times_k K).$$
Let $k={\mathbb{C}}$. A cocharacter $\chi\colon \mathbf{G}_{m,{\mathbb{C}}}\to T$
induces a continuous homomorphism ${\mathbb{C}}^\times\to T({\mathbb{C}})$
and a homomorphism of topological fundamental groups
$$ \pi_1^{\mathrm{top}}({\mathbb{C}}^\times)\to\pi_1^{\mathrm{top}}(T({\mathbb{C}}))\to\pi_1^{\mathrm{top}}(G({\mathbb{C}})).$$
By Proposition 11.1 of the memoir, in this way we obtain
a canonical isomorphism
$$
\pi_1(G)\overset{\sim}{\to}\mathrm{Hom}\left[\pi_1^{\mathrm{top}}({\mathbb{C}}^\times)
\to\pi_1^{\mathrm{top}}(G({\mathbb{C}}))\right].
$$
After we choose one of the two generators of $\pi_*^{\mathrm{top}}({\mathbb{C}}^\times)$,
we obtain a noncanonical isomorphism
$$ \pi_1(G)\overset{\sim}{\to}\pi_1^{\mathrm{top}}(G({\mathbb{C}})). $$
Now reducing to the case $k={\mathbb{C}}$, one can easily see that Igor Rivin's comment
works over any algebraically closed field $k$ of characteristic 0.
I show below how to see this without reducing to ${\mathbb{C}}$,
by elaborating on the comment of Matthias Wendt.
First assume that $G$ is a simply connected semisimple group.
Then $G^{\rm sc}=G^{\rm ss}=G$, hence $T^{\rm sc}=T$ and $\pi_1(G)=0$ (as one should expect!).
Since $\mathrm{Sp}_{2n}$ is simply connected,
we conclude that $\pi_1(\mathrm{Sp}_{2n})=0$.
Then assume that $G$ is a torus.
Then $G^{\rm sc}=1$, $T=G$, $T^{\rm sc}=1$, hence $\pi_1(G)=X_*(G)$.
Since $\mathrm{SO}_2$ is a 1-dimensional torus,
we conclude that $\pi_1(\mathrm{SO}_2)\simeq\mathbb{Z}$.
Now let $G$ be a semisimple group over $k$.
Note that $\ker\rho$ is always a finite abelian group.
By Example 1.6(3) in the memoir, we have a canonical isomorphism
$$\pi_1(G)\cong \mathrm{Hom}(\mathrm{Hom}_k(\ker\rho,\mathbf{G}_{m,k}),\mathbb{Q}/\mathbb{Z}).$$
It is well known that for $\mathrm{SO}_n$ for $n>2$ we have $\ker\rho\simeq\mu_2$,
hence $\pi_1(G)\simeq\mathbb{Z}/2\mathbb{Z}$ (again, as one should expect).
Unfortunately, Example 1.6(3) was given without proof.
For a proof see, e.g., this preprint, Lemma 15.2.
The point of introducing the algebraic fundamental groups was as follows.
If $G$ is actually defined over a
nonclosed field $k_0$ such that $k$ is an algebraic closure of $k_0$,
then the Galois group $\mathrm{Gal}(k/k_0)$ acts on $\pi_1(G)$.
Then, following an idea of Kottwitz, from the Galois module $\pi_1(G)$ one can compute arithmetic invariants of $G$ over $k_0$,
such as the Galois cohomology $H^1(k_0,G)$ when $k_0$ is a $p$-adic field,
and the Tate-Shafarevich kernel and the defect of weak approximation for $G$ when $k_0$ is a number field.