Drawing Super Mario Bros.....in LaTeX

As everyone knows, the game was released in 1985, and at that time LaTeX was just making it out into the world and there was no such thing as pdfTeX, let alone TikZ and other fancy systems, so what Nintendo had to make the pictures was Knuth's TeX only.

They needed an efficient way to make the pictures, so they obviously didn't have the time to write all those coordinates, so they resorted to a syntax which was easy to draw each frame of the game, like this:

\beginmario
..=====....
.=========.
.---@@-@...
-@-@@@-@@@.
-@--@@@-@@@
--@@@@----.
..@@@@@@@..
.==+===....
===+==+===.
===++++====
@=+@++@+=@@
@@++++++@@@
@++++++++@@
.+++..+++..
---....---.
---....----
\endmario

to produce:

enter image description here

So they used something like this:

\input color.tex
\newtoks\marioactives
\def\newmariocolor#1#2#3{%
  \definecolor{M#2}{rgb}{#3}%
  \expandafter\def\csname MarioSquare#1\endcsname
    {\begingroup\color{M#2}\MarioBox}%
  \marioactives\expandafter{\the\marioactives\mkactive{#1}}}
\newdimen\unitlength
\newdimen\rulesize
\newcount\therow
\newcount\thecol
\def\MarioBox{\leavevmode\raise\therow\unitlength
  \hbox to 0pt{\kern\thecol\unitlength\DrawBox\hss}%
  \endgroup\advance\thecol 1 \ignorespaces}
\def\DrawBox{\leavevmode\hbox{\vrule width\rulesize height\rulesize}}
\def\mkactive#1{%
  \catcode`#1=13\relax
  \begingroup\lccode`~=`#1\lowercase{\endgroup
  \expandafter\let\expandafter~}\csname MarioSquare#1\endcsname}
{\catcode`\^^M=13
\gdef\beginmario{%
  \begingroup
  \catcode`\ =9
  \catcode`\^^M=13
  \def^^M{\advance\therow-1 \thecol 0 }%
  \rulesize\unitlength
  \advance\rulesize 0.1pt
  \the\marioactives}%
  \gdef\endmario{\endgroup}%
}

\newmariocolor{=}{red}{1,0,0}
\newmariocolor{+}{blue}{0,0.15,1}
\newmariocolor{@}{yellow}{1,0.65,0}
\newmariocolor{-}{brown}{0.5,0.1,0}
\newmariocolor{.}{white}{1,1,1}
\unitlength=5pt

\beginmario
..=====....
.=========.
.---@@-@...
-@-@@@-@@@.
-@--@@@-@@@
--@@@@----.
..@@@@@@@..
.==+===....
===+==+===.
===++++====
@=+@++@+=@@
@@++++++@@@
@++++++++@@
.+++..+++..
---....---.
---....----
\endmario

\bye

What if Mario and Luigi are going to a party? Somebody said that they love ducks!!

enter image description here

From The TikZducks package

MWE

\documentclass[border=2mm]{standalone}
\usepackage{xcolor}
\usepackage{tikzducks}

\newcommand{\superstripes}{\stripes[color=blue!80!black,width=3,height=1.0,rotate=5] \stripes[color=blue!80!black,width=0.1,rotate=0,distance=0.7,initialx=-1.1,height=2]}

\begin{document}

\begin{tikzpicture}
\duck[tshirt=red!80!black,peakedcap=red!80!black,stripes={\superstripes}]
\fill[white] (0.8,2) circle (0.13);
\node[red!80!black,rotate=-25] at (0.8,2) {\scalebox
{0.6}{\textsf{M}}};
\end{tikzpicture}
\begin{tikzpicture}
\duck[tshirt=green!70!black,peakedcap=green!70!black,
stripes={\superstripes}]
\fill[white] (0.8,2) circle (0.13);
\node[green!70!black,rotate=-25] at (0.8,2) {\scalebox
{0.6}{\textsf{L}}};
\end{tikzpicture}
\end{document}

enter image description here


Like Sigur, I am also convinced this is an XY question. Probably Italian autocorrection replaced marmot my Mario, right? ;-)

\documentclass[border={1cm 3.14mm 1cm 3.14mm}]{standalone}
\usepackage{tikzlings} % https://ctan.org/pkg/tikzlings
\begin{document}
\begin{tikzpicture}
 \marmot[whiskers,teeth,3D,shadow]
 \fill[top color=blue!70,bottom color=blue,shading angle=-30] 
 (-0.56,1.35) to[out=-10,in=190] (0.56,1.35) 
 to[out=-80,in=85] (0.58,0.6) to[out=-175,in=-5] (-0.58,0.6) 
  to[out=95,in=-100] cycle;
 \shade[ball color=brown!50!black,rotate around={70:(0.385,0.93)}] (0.385,0.93) ellipse (0.24 and 0.13);
 \shade[ball color=brown!50!black,rotate around={-70:(-0.385,0.93)}] (-0.385,0.93) ellipse (0.24 and 0.13);
 \draw[red,thick,fill=yellow] (-0.1,1.2) -- (-0.25,1.05) -- (0,0.7) -- (0.25,1.05) --
  (0.1,1.2) -- cycle;
 \node[font=\sffamily\bfseries,text=red] at (0,1) {S};
\end{tikzpicture}
\end{document}

enter image description here