50

There are several questions about TeX.SE. that concern designs for recurrences such as fireworks, lunar calendar, the pi-greek, and into my mind I'm remembering a protagonist of an old video game: Super Mario Bros.

But is it possible to make detailed drawings of the protagonists of video games with LaTeX?

I'm just curious to see only how the users build Super Mario Bros. Thank you everyone.

9
  • 13
    Why would you do that in TeX? – cfr Oct 2 '19 at 23:01
  • 2
    @cfr cwac! Miss you! – Paulo Cereda Oct 3 '19 at 13:02
  • 1
    @PauloCereda Cwac! – cfr Oct 3 '19 at 16:32
  • 2
    As you Know my answer is here. – vi pa Oct 4 '19 at 8:53
  • 10
    I need to think of questions like these to get my reputation boosted.... – jvriesem Oct 5 '19 at 17:05
43

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

3
  • 9
    Seeing the question, I felt confident that tikzducks would be rolled out. You did not disappoint. – Steven B. Segletes Oct 3 '19 at 1:24
  • Thank you for your invaluable cooperation and your collaboration. – Sebastiano Oct 6 '19 at 19:16
  • 1
    @Sebastiano, you are welcome. – Sigur Oct 7 '19 at 12:14
115

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
8
  • 2
    Unbelievable!!!! Did you already known this solution, right? Or did you create this just now? – Sigur Oct 2 '19 at 23:33
  • 7
    @Sigur I never worked for Nintendo, if that's what you're asking ;-) (yes, I wrote it now :-) – Phelype Oleinik Oct 2 '19 at 23:35
  • 1
    Ow, I was asking the second. Amazing how fast you wrote the code. Congs. – Sigur Oct 2 '19 at 23:37
  • 7
    @Sigur Actually the \MarioBox above is a modified version of LaTeX's \put, and \DrawBox is almost the same as \rule. The rest are funny catcode settings to obfuscate the code ;-) – Phelype Oleinik Oct 2 '19 at 23:39
  • 1
    Simply excellent the story... and the code. – Sebastiano Oct 6 '19 at 19:16
29

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

2
  • Actually I expected reply from you....and you fulfilled....Great.... – MadyYuvi Oct 4 '19 at 12:32
  • Put a raccoon tail on it and it might look like Mario in the tanuki suit as seen in Super Mario Bros. 3. – Geeky Guy Oct 4 '19 at 14:22
14

With ducksay package:

\documentclass{article}
\usepackage{ducksay}

\AddAnimal{luigi}
{
         ,-"-.
        /     :
       '   ,- |
       |  | L|---.
      .   `,'     |
      |   / _  _  |
     ,|  /."_ "."/
    | ' :  ( || |
     \  |b  D| b|.-.
      ,--8b     "   )
      | _     d._ -'
      '. `    YCGMMP
        ""\    " |"
           \    /
            |__|
}

\begin{document}

\ducksay[animal=luigi]{I'm luigi}

\end{document}
1
  • Wait, someone (except me) posted a ducksay answer, and I completely missed it! Great answer! – Skillmon Jan 12 at 19:03
8

Not exactly Mario, but close enough. You'll need to download the Super Mario 256 font and compile this with XeTeX or LuaTeX.

enter image description here

\documentclass{article}
\usepackage{fontspec}
\usepackage{xcolor}
\usepackage{relsize}
\newfontfamily\mario{SuperMario256.ttf}
\newcommand\marioltr[2]{{%
  \mario \sbox0{#1}\sbox2{\larger#1}%
  \dimen0=\dimexpr(\wd2-\wd0)/2\relax
  \dimen2=\dimexpr\ht2-\ht0\relax
  \leavevmode \kern-\dimen0\lower\dimen2 \rlap{\unhbox2}\kern \dimen0
  \textcolor{#2}{#1}}}
\newcommand\textmario[2]{%
  \textmarioAUX#1{}\relax\textmarioAUXX#2{}\relax\stop}
\newcommand\textmarioAUX{}
\def\textmarioAUX#1#2\textmarioAUXX#3#4\stop{%
  \stopifempty{#1}\stopifempty{#3}%
  \marioltr{#1}{#3}\textmarioAUX#2\textmarioAUXX#4\stop}
\newcommand\stopifempty[1]{%
  \if\relax\detokenize{#1}\relax\stopmario\fi}
\newcommand\stopmario{}
\def\stopmario#1\stop{\fi}
\newcommand\mariologo{{%
  \sbox0{\textmario{SUPER}{byrgy}}%
  \sbox2{\larger\textmario{MARIO}{rgybg}}%
  \dimen0=\dimexpr(\wd2-\wd0)/2\relax
  \leavevmode \vbox {\hsize=\wd2 \parindent=0pt
    \leavevmode \kern\dimen0 \box0 \par\nointerlineskip
    \leavevmode \ht2=0.9\ht2 \box2}}}
\newcommand\makeHTMLcolors[1]{%
  \ifx\relax#1 \else\expandafter\makeHTMLcolorAUX \fi{#1}}
\newcommand\makeHTMLcolorAUX[2]{\definecolor{#1}{HTML}{#2}\makeHTMLcolors}
\makeHTMLcolors b{049CD8}y{FBD000}r{E52521}g{43B047}\relax
\begin{document}
\mariologo
\end{document}
2
  • 1
    Wow...thank you so much...for a happy new year...and for your nice answer. Thank you very much again. – Sebastiano Jan 1 '20 at 12:41
  • 1
    You're welcome @Sebastiano! I fixed the code: the previous version had some problems when using the logo inline with other text – The Drunken Whaler Jan 2 '20 at 14:09
7

Utilizing the newly released pxpic package, and recreating something from a lovely old post by Paulo Cereda, the following adds Yoshi and his long tongue as a better alternative to \hspace and \hfill.

enter image description here

\documentclass[border=3.14,preview]{standalone}

\usepackage{pxpic}

\makeatletter
\newcommand*\yoshi@drawhead[1]
  {%
    \pxpic
      [
        mode=px,
        size={#1},
        skip=0,
        colors =
          {
             d=[HTML]{380a00} % dark red from hat border
            ,v=[HTML]{ae2e5f} % violet from within hat
            ,p=[HTML]{f63b70} % pink from within hat
            ,B=[HTML]{8f4546} % ugly violet brown from within hat
            ,P=[HTML]{ba554d} % strange pastel pink from within hat
            ,G=[HTML]{a7b23a} % dirt green from top right of hat
            ,O=[HTML]{d6a433} % dirt orange from top right of hat
            ,Y=[HTML]{f3d563} % dirt yellow from top right of hat
            ,s=[HTML]{f1c7b7} % skin
            ,S=[HTML]{fa6a62} % dark skin
            ,b=[HTML]{815e1a} % brown from ear
            ,1=[HTML]{314369} % dark blue from trousers
            ,2=[HTML]{49819a} % navy blue from trousers
            ,3=[HTML]{88d5c5} % bright blue from trousers
            ,4=[HTML]{293581} % dark saturated blue from trousers
            ,5=[HTML]{42766a} % teal from trousers
            ,o=[HTML]{ed8603} % yoshi orange
            ,.=[HTML]{00f502} % yoshi bright green
            ,:=[HTML]{0db710} % yoshi middle green
            ,;=[HTML]{077208} % yoshi dark green
            ,"=[HTML]{f6f5fa} % gloves white
            ,t=[HTML]{b42e09} % tongue
            ,k=black
            ,w=white
          }
      ]
      {
        {0000000dddd}
        {00000ddPppGd}
        {000ddPpvvOYd}
        {00dPpvvkkkkkkk}
        {0dPvvkkkkkkkkkk}
        {0dvvskkSSk}
        {dBvsbskssk0bbb}
        {dvvSbskksssss0b00000000000kkkk}
        {dBvdSsksskSSbbb0000kkk00kk....k}
        {0ddkdSsskkkb""b000k:.;kk....ww.k}
        {00kkdddddddb""b000k:;ww...k...wk}
        {00012dvvpppb"0b000k;wwwk.....::k}
        {001522dvvvvBbb0000k;wwwk....:kk}
        {0012222ddddd0000000kwwww...:k}
        {001222223ww4kk000kkokww:..:k}
        {00122222223kYkkk0okok;:..:k}
        {0kk44222224kbkkokkkk:....tt}
        {0k:kw44444kbkkkkk:......wtt}
        {00kwkwkkkkkbkk;;;.....wwwk}
        {00kwkwwwwwkkk::::wwwwwwwwk}
        {00k;wkkkkkkokwkkw;kkkk;ww;kk}
        {000kwk":::kookookk0000kk;ww;k}
        {000kwkkkkkkkooook0000000kkkkk}
        {000k;ktttttkkookk}
        {0000kkttttt"kkkk}
        {00000kttttttk}
        {00000kkkkkkkk}
      }%
  }
\newcommand*\yoshi@drawtonguetip[1]
  {%
    \pxpic
      [
        mode=px,
        size={#1},
        skip=0,
        colors =
          {
             o=[HTML]{ed8603} % yoshi orange
            ,t=[HTML]{b42e09} % tongue
            ,k=black
          }
      ]
      {
        {00tttt}
        {tttoott}
        {tttooot}
        {tttttot}
        {ttttttt}
        {00tttt}
      }%
  }
\NewExpandableDocumentCommand\yoshi@drawtongue{O{#2} m}
  {%
    \pxpic
      [
        mode=px,
        ht={#2},
        wd={#1},
        colors = {t=[HTML]{b42e09}}
      ]
      {tt}%
  }
\newcommand\yoshifill[1][1pt]
  {%
    \leavevmode
    \yoshi@drawhead{#1}\nobreak
    \hskip-5\dimexpr#1\relax
    \xleaders\hbox{\raise9\dimexpr#1\relax\yoshi@drawtongue[.01pt]{#1}}\hfill
    \nobreak
    \raise7\dimexpr#1\relax\yoshi@drawtonguetip{#1}%
  }
\newcommand\yoshiskip[2][1pt]
  {%
    \leavevmode
    \ifdim\dimexpr#2-34\dimexpr#1\relax<0pt
      \PackageWarning{yoshi}
        {%
          Yoshi is too big for your skip, put him on a diet.\MessageBreak
          O\expandafter\@gobble
        }%
      \rlap{\yoshiskip@{#1}{0pt}}%
      \hskip\dimexpr#2\relax
    \else
      \hbox{\yoshiskip@{#1}{#2-34\dimexpr#1\relax}}%
    \fi
  }
\newcommand\yoshiskip@[2]
  {%
    \yoshi@drawhead{#1}%
    \hskip-5\dimexpr#1\relax
    \raise9\dimexpr#1\relax\yoshi@drawtongue[#2]{#1}%
    \raise7\dimexpr#1\relax\yoshi@drawtonguetip{#1}%
  }
\makeatother

\begin{document}
\makebox[7cm][s]{Some text\yoshifill here}

\rule{7cm}{1pt}\\ % for comparison
\yoshiskip{7cm}

A\yoshiskip{30pt}bc\\ % yoshi is too big, we must put him on a diet!
A\yoshiskip[.5pt]{30pt}bc
\end{document}

Since ToCs are boring, and no one likes dotted lines, how about letting Yoshi help fetching those page numbers?

\documentclass[]{article}

\usepackage{pxpic}

\makeatletter
\newcommand*\yoshi@drawhead[1]
  {%
    \pxpic
      [
        mode=px,
        size={#1},
        skip=0,
        colors =
          {
             d=[HTML]{380a00} % dark red from hat border
            ,v=[HTML]{ae2e5f} % violet from within hat
            ,p=[HTML]{f63b70} % pink from within hat
            ,B=[HTML]{8f4546} % ugly violet brown from within hat
            ,P=[HTML]{ba554d} % strange pastel pink from within hat
            ,G=[HTML]{a7b23a} % dirt green from top right of hat
            ,O=[HTML]{d6a433} % dirt orange from top right of hat
            ,Y=[HTML]{f3d563} % dirt yellow from top right of hat
            ,s=[HTML]{f1c7b7} % skin
            ,S=[HTML]{fa6a62} % dark skin
            ,b=[HTML]{815e1a} % brown from ear
            ,1=[HTML]{314369} % dark blue from trousers
            ,2=[HTML]{49819a} % navy blue from trousers
            ,3=[HTML]{88d5c5} % bright blue from trousers
            ,4=[HTML]{293581} % dark saturated blue from trousers
            ,5=[HTML]{42766a} % teal from trousers
            ,o=[HTML]{ed8603} % yoshi orange
            ,.=[HTML]{00f502} % yoshi bright green
            ,:=[HTML]{0db710} % yoshi middle green
            ,;=[HTML]{077208} % yoshi dark green
            ,"=[HTML]{f6f5fa} % gloves white
            ,t=[HTML]{b42e09} % tongue
            ,k=black
            ,w=white
          }
      ]
      {
        {0000000dddd}
        {00000ddPppGd}
        {000ddPpvvOYd}
        {00dPpvvkkkkkkk}
        {0dPvvkkkkkkkkkk}
        {0dvvskkSSk}
        {dBvsbskssk0bbb}
        {dvvSbskksssss0b00000000000kkkk}
        {dBvdSsksskSSbbb0000kkk00kk....k}
        {0ddkdSsskkkb""b000k:.;kk....ww.k}
        {00kkdddddddb""b000k:;ww...k...wk}
        {00012dvvpppb"0b000k;wwwk.....::k}
        {001522dvvvvBbb0000k;wwwk....:kk}
        {0012222ddddd0000000kwwww...:k}
        {001222223ww4kk000kkokww:..:k}
        {00122222223kYkkk0okok;:..:k}
        {0kk44222224kbkkokkkk:....tt}
        {0k:kw44444kbkkkkk:......wtt}
        {00kwkwkkkkkbkk;;;.....wwwk}
        {00kwkwwwwwkkk::::wwwwwwwwk}
        {00k;wkkkkkkokwkkw;kkkk;ww;kk}
        {000kwk":::kookookk0000kk;ww;k}
        {000kwkkkkkkkooook0000000kkkkk}
        {000k;ktttttkkookk}
        {0000kkttttt"kkkk}
        {00000kttttttk}
        {00000kkkkkkkk}
      }%
  }
\newcommand*\yoshi@drawtonguetip[1]
  {%
    \pxpic
      [
        mode=px,
        size={#1},
        skip=0,
        colors =
          {
             o=[HTML]{ed8603} % yoshi orange
            ,t=[HTML]{b42e09} % tongue
            ,k=black
          }
      ]
      {
        {00tttt}
        {tttoott}
        {tttooot}
        {tttttot}
        {ttttttt}
        {00tttt}
      }%
  }
\NewExpandableDocumentCommand\yoshi@drawtongue{O{#2} m}
  {%
    \pxpic
      [
        mode=px,
        ht={#2},
        wd={#1},
        colors = {t=[HTML]{b42e09}}
      ]
      {tt}%
  }
\newcommand\yoshifill[1][1pt]
  {%
    \leavevmode
    \yoshi@drawhead{#1}\nobreak
    \hskip-5\dimexpr#1\relax
    \xleaders\hbox{\raise9\dimexpr#1\relax\yoshi@drawtongue[.01pt]{#1}}\hfill
    \nobreak
    \raise7\dimexpr#1\relax\yoshi@drawtonguetip{#1}%
  }
\newcommand\yoshiskip[2][1pt]
  {%
    \leavevmode
    \ifdim\dimexpr#2-34\dimexpr#1\relax<0pt
      \PackageWarning{yoshi}
        {%
          Yoshi is too big for your skip, put him on a diet.\MessageBreak
          O\expandafter\@gobble
        }%
      \rlap{\yoshiskip@{#1}{0pt}}%
      \hskip\dimexpr#2\relax
    \else
      \hbox{\yoshiskip@{#1}{#2-34\dimexpr#1\relax}}%
    \fi
  }
\newcommand\yoshiskip@[2]
  {%
    \yoshi@drawhead{#1}%
    \hskip-5\dimexpr#1\relax
    \raise9\dimexpr#1\relax\yoshi@drawtongue[#2]{#1}%
    \raise7\dimexpr#1\relax\yoshi@drawtonguetip{#1}%
  }

\usepackage{etoolbox}
\patchcmd\@dottedtocline
  {\leaders\hbox{$\m@th\mkern\@dotsep mu\hbox{.}\mkern\@dotsep mu$}\hfill}
  {\yoshifill[.06ex]}
  {}
  {\GenericError{}{Patching gone wrong}{}{}}
\makeatother

\usepackage{duckuments}

\begin{document}
\duckument[toc]
\end{document}

enter image description here

2
  • aahhah very beautiful and I see a long code....For me it is impossible to do this code. Many compliments and thank youuuuuuuu. :-) +1 – Sebastiano Jan 12 at 19:39
  • 1
    @Sebastiano well, substract everything that's inside of the arguments of \pxpic and you see how long the real code is :) – Skillmon Jan 12 at 21:07
6

As a fan I have to contribute to this. It is a rather simple soltution, but gets the job done.

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{plotmarks}

\begin{document}
    
    \definecolor{skin}{RGB}{251,206,177}
    
    \begin{tikzpicture}
        \pgfsetplotmarksize{3.3ex}
        
        %\foreach \x in {0,1,2,...,12}
        %\foreach \y in {0,1,2,...,18}
        %\draw (\x,\y) rectangle (1,1);
        
        %red trouseres
        \node[red] at (2.5,3.5) {\pgfuseplotmark{square*}};
        \node[red] at (3.5,3.5) {\pgfuseplotmark{square*}};
        \node[red] at (4.5,3.5) {\pgfuseplotmark{square*}};
        
        \node[red] at (7.5,3.5) {\pgfuseplotmark{square*}};
        \node[red] at (8.5,3.5) {\pgfuseplotmark{square*}};
        \node[red] at (9.5,3.5) {\pgfuseplotmark{square*}};
        
        \node[red] at (2.5,4.5) {\pgfuseplotmark{square*}};
        \node[red] at (3.5,4.5) {\pgfuseplotmark{square*}};
        \node[red] at (4.5,4.5) {\pgfuseplotmark{square*}};
        \node[red] at (5.5,4.5) {\pgfuseplotmark{square*}};
        \node[red] at (6.5,4.5) {\pgfuseplotmark{square*}};
        \node[red] at (7.5,4.5) {\pgfuseplotmark{square*}};
        \node[red] at (8.5,4.5) {\pgfuseplotmark{square*}};
        \node[red] at (9.5,4.5) {\pgfuseplotmark{square*}};
        
        \node[red] at (3.5,5.5) {\pgfuseplotmark{square*}};
        \node[red] at (4.5,5.5) {\pgfuseplotmark{square*}};
        \node[red] at (5.5,5.5) {\pgfuseplotmark{square*}};
        \node[red] at (6.5,5.5) {\pgfuseplotmark{square*}};
        \node[red] at (7.5,5.5) {\pgfuseplotmark{square*}};
        \node[red] at (8.5,5.5) {\pgfuseplotmark{square*}};
        
        \node[red] at (3.5,6.5) {\pgfuseplotmark{square*}};
        
        \node[red] at (5.5,6.5) {\pgfuseplotmark{square*}};
        \node[red] at (6.5,6.5) {\pgfuseplotmark{square*}};
        
        \node[red] at (8.5,6.5) {\pgfuseplotmark{square*}};

        \node[red] at (4.5,7.5) {\pgfuseplotmark{square*}};
        \node[red] at (5.5,7.5) {\pgfuseplotmark{square*}};
        \node[red] at (6.5,7.5) {\pgfuseplotmark{square*}};
        \node[red] at (7.5,7.5) {\pgfuseplotmark{square*}};
        
        \node[red] at (4.5,8.5) {\pgfuseplotmark{square*}};
        \node[red] at (7.5,8.5) {\pgfuseplotmark{square*}};
        
        \node[red] at (4.5,9.5) {\pgfuseplotmark{square*}};
        %\node[red] at (7.5,9.5) {\pgfuseplotmark{square*}};
        
        %red cap
        \node[red] at (2.5,15.5) {\pgfuseplotmark{square*}};
        \node[red] at (3.5,15.5) {\pgfuseplotmark{square*}};
        \node[red] at (4.5,15.5) {\pgfuseplotmark{square*}};
        \node[red] at (5.5,15.5) {\pgfuseplotmark{square*}};
        \node[red] at (6.5,15.5) {\pgfuseplotmark{square*}};
        \node[red] at (7.5,15.5) {\pgfuseplotmark{square*}};
        \node[red] at (8.5,15.5) {\pgfuseplotmark{square*}};
        \node[red] at (9.5,15.5) {\pgfuseplotmark{square*}};
        
        \node[red] at (3.5,16.5) {\pgfuseplotmark{square*}};
        \node[red] at (4.5,16.5) {\pgfuseplotmark{square*}};
        \node[red] at (5.5,16.5) {\pgfuseplotmark{square*}};
        \node[red] at (6.5,16.5) {\pgfuseplotmark{square*}};
        
        %olive shirt
        \node[olive] at (2.5,6.5) {\pgfuseplotmark{square*}};
        
        \node[olive] at (.5,7.5) {\pgfuseplotmark{square*}};
        \node[olive] at (1.5,7.5) {\pgfuseplotmark{square*}};
        \node[olive] at (2.5,7.5) {\pgfuseplotmark{square*}};
        \node[olive] at (3.5,7.5) {\pgfuseplotmark{square*}};
        
        \node[olive] at (1.5,8.5) {\pgfuseplotmark{square*}};
        \node[olive] at (2.5,8.5) {\pgfuseplotmark{square*}};
        \node[olive] at (3.5,8.5) {\pgfuseplotmark{square*}};
        \node[olive] at (2.5,9.5) {\pgfuseplotmark{square*}};
        \node[olive] at (3.5,9.5) {\pgfuseplotmark{square*}};
        
        \node[olive] at (5.5,8.5) {\pgfuseplotmark{square*}};
        \node[olive] at (6.5,8.5) {\pgfuseplotmark{square*}};
        \node[olive] at (5.5,9.5) {\pgfuseplotmark{square*}};
        \node[olive] at (6.5,9.5) {\pgfuseplotmark{square*}};
        
        
        \node[olive] at (9.5,6.5) {\pgfuseplotmark{square*}};
        
        \node[olive] at (8.5,7.5) {\pgfuseplotmark{square*}};
        \node[olive] at (9.5,7.5) {\pgfuseplotmark{square*}};
        \node[olive] at (10.5,7.5) {\pgfuseplotmark{square*}};
        \node[olive] at (11.5,7.5) {\pgfuseplotmark{square*}};
        
        \node[olive] at (8.5,8.5) {\pgfuseplotmark{square*}};
        \node[olive] at (9.5,8.5) {\pgfuseplotmark{square*}};
        \node[olive] at (10.5,8.5) {\pgfuseplotmark{square*}};
        
        %\node[olive] at (8.5,9.5) {\pgfuseplotmark{square*}};
        %\node[olive] at (9.5,9.5) {\pgfuseplotmark{square*}};
        
        \node[olive] at (7.5,9.5) {\pgfuseplotmark{square*}};
        
        %olive feet
        \node[olive] at (.5,1.5) {\pgfuseplotmark{square*}};
        \node[olive] at (1.5,1.5) {\pgfuseplotmark{square*}};
        \node[olive] at (2.5,1.5) {\pgfuseplotmark{square*}};
        \node[olive] at (3.5,1.5) {\pgfuseplotmark{square*}};
        
        \node[olive] at (8.5,1.5) {\pgfuseplotmark{square*}};
        \node[olive] at (9.5,1.5) {\pgfuseplotmark{square*}};
        \node[olive] at (10.5,1.5) {\pgfuseplotmark{square*}};
        \node[olive] at (11.5,1.5) {\pgfuseplotmark{square*}};
        
        \node[olive] at (1.5,2.5) {\pgfuseplotmark{square*}};
        \node[olive] at (2.5,2.5) {\pgfuseplotmark{square*}};
        \node[olive] at (3.5,2.5) {\pgfuseplotmark{square*}};
        
        \node[olive] at (8.5,2.5) {\pgfuseplotmark{square*}};
        \node[olive] at (9.5,2.5) {\pgfuseplotmark{square*}};
        \node[olive] at (10.5,2.5) {\pgfuseplotmark{square*}};
        
        %skin knots
        \node[skin] at (4.5,6.5) {\pgfuseplotmark{square*}};
        \node[skin] at (7.5,6.5) {\pgfuseplotmark{square*}};
        
        %skin face
        \node[skin] at (3.5,10.5) {\pgfuseplotmark{square*}};
        \node[skin] at (4.5,10.5) {\pgfuseplotmark{square*}};
        \node[skin] at (5.5,10.5) {\pgfuseplotmark{square*}};
        \node[skin] at (6.5,10.5) {\pgfuseplotmark{square*}};
        \node[skin] at (7.5,10.5) {\pgfuseplotmark{square*}};
        \node[skin] at (8.5,10.5) {\pgfuseplotmark{square*}};
        \node[skin] at (9.5,10.5) {\pgfuseplotmark{square*}};
        
        \node[skin] at (3.5,11.5) {\pgfuseplotmark{square*}};
        \node[skin] at (4.5,11.5) {\pgfuseplotmark{square*}};
        \node[skin] at (5.5,11.5) {\pgfuseplotmark{square*}};
        \node[skin] at (6.5,11.5) {\pgfuseplotmark{square*}};
        
        \node[skin] at (5.5,14.5) {\pgfuseplotmark{square*}};
        \node[skin] at (6.5,14.5) {\pgfuseplotmark{square*}};
        
        \node[skin] at (2.5,13.5) {\pgfuseplotmark{square*}};
        \node[skin] at (2.5,12.5) {\pgfuseplotmark{square*}};
        
        \node[skin] at (4.5,13.5) {\pgfuseplotmark{square*}};
        \node[skin] at (5.5,13.5) {\pgfuseplotmark{square*}};
        \node[skin] at (6.5,13.5) {\pgfuseplotmark{square*}};
        
        \node[skin] at (2.5,12.5) {\pgfuseplotmark{square*}};
        \node[skin] at (5.5,12.5) {\pgfuseplotmark{square*}};
        \node[skin] at (6.5,12.5) {\pgfuseplotmark{square*}};
        \node[skin] at (7.5,12.5) {\pgfuseplotmark{square*}};
        
        \node[skin] at (8.5,14.5) {\pgfuseplotmark{square*}};
        \node[skin] at (8.5,13.5) {\pgfuseplotmark{square*}};
        \node[skin] at (9.5,13.5) {\pgfuseplotmark{square*}};
        \node[skin] at (10.5,13.5) {\pgfuseplotmark{square*}};

        \node[skin] at (9.5,12.5) {\pgfuseplotmark{square*}};
        \node[skin] at (10.5,12.5) {\pgfuseplotmark{square*}};
        \node[skin] at (11.5,12.5) {\pgfuseplotmark{square*}};
        
        %skin hands
        \node[skin] at (0.5,4.5) {\pgfuseplotmark{square*}};
        \node[skin] at (0.5,5.5) {\pgfuseplotmark{square*}};
        \node[skin] at (0.5,6.5) {\pgfuseplotmark{square*}};
        \node[skin] at (1.5,4.5) {\pgfuseplotmark{square*}};
        \node[skin] at (1.5,5.5) {\pgfuseplotmark{square*}};
        \node[skin] at (1.5,6.5) {\pgfuseplotmark{square*}};
        \node[skin] at (2.5,5.5) {\pgfuseplotmark{square*}};
        
        \node[skin] at (10.5,4.5) {\pgfuseplotmark{square*}};
        \node[skin] at (10.5,5.5) {\pgfuseplotmark{square*}};
        \node[skin] at (10.5,6.5) {\pgfuseplotmark{square*}};
        \node[skin] at (9.5,5.5) {\pgfuseplotmark{square*}};
        \node[skin] at (11.5,4.5) {\pgfuseplotmark{square*}};
        \node[skin] at (11.5,5.5) {\pgfuseplotmark{square*}};
        \node[skin] at (11.5,6.5) {\pgfuseplotmark{square*}};
        
    
        %olive face and beard
        \node[olive] at (7.5,11.5) {\pgfuseplotmark{square*}};
        \node[olive] at (8.5,11.5) {\pgfuseplotmark{square*}};
        \node[olive] at (9.5,11.5) {\pgfuseplotmark{square*}};
        \node[olive] at (10.5,11.5) {\pgfuseplotmark{square*}};
        \node[olive] at (8.5,12.5) {\pgfuseplotmark{square*}};
        
        \node[olive] at (7.5,13.5) {\pgfuseplotmark{square*}};
        \node[olive] at (7.5,14.5) {\pgfuseplotmark{square*}};
        
        \node[olive] at (2.5,11.5) {\pgfuseplotmark{square*}};
        \node[olive] at (1.5,11.5) {\pgfuseplotmark{square*}};
        \node[olive] at (1.5,12.5) {\pgfuseplotmark{square*}};
        \node[olive] at (1.5,13.5) {\pgfuseplotmark{square*}};
        
        \node[olive] at (2.5,14.5) {\pgfuseplotmark{square*}};
        \node[olive] at (3.5,14.5) {\pgfuseplotmark{square*}};
        \node[olive] at (4.5,14.5) {\pgfuseplotmark{square*}};
        \node[olive] at (3.5,13.5) {\pgfuseplotmark{square*}};
        \node[olive] at (3.5,12.5) {\pgfuseplotmark{square*}};
        \node[olive] at (4.5,12.5) {\pgfuseplotmark{square*}};
        
    \end{tikzpicture}
    
\end{document}

enter image description here

5
  • 1
    You can reduce your code with this method. – Paul Gaborit Dec 23 '20 at 6:20
  • @Paul Gaborit. Thanks I will try that. – Roland Dec 23 '20 at 6:28
  • I love it. It´s great to draw pixel graphics!...Is there a posibility to get rid of the black grid? – Roland Dec 23 '20 at 6:30
  • 1
    Dearest Roland, in truth these days I thought of you when I saw your avatar changed. In fact I wished, I am also a Super Mario fan, that you could put a reply. I thank you very much because each time reminds me of beautiful and carefree times. A cordial greeting and happy holidays and wishes. – Sebastiano Dec 23 '20 at 12:38
  • @ sebastiano. For you too happy holidays and all the best in the new year. – Roland Dec 23 '20 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.