I created an ASCII Art for Terminal Hacker but it is shown weirdly

I use the following code to show an ASCII Art:

    void PrintSplash()
    {
        Terminal.WriteLine(@"
  _____                 _            _ 
 |_   _|               (_)          | |
   | | ___ _ __ _ _ __  _ _ _   __ _| |
   | |/ _ \ '__| ' `  \| | ' \ / _` | |
   | |  __/ |  | || || | | || | (_| | |
   |_|\___|_|  |_||_||_|_|_||_|\__,_|_|");
        //Wait(5, PrintBoot);
    }

But when it is displayed there are empty lines. Does anyone know why?

Hi Naxos,

I don’t see any empty lines. If you are referring to the gap between the lines, that’s caused by the line spacing value.

I’m not sure what you mean with “line spacing value”.
I’m currently doing the terminal hacker section.
I didn’t change the font or terminal…
I just use the “@” syntax…
I’ll post another example later (currently on mobile), where there are no empty lines…

I still have no idea why it was not working.
But my current solution looks like this :frowning:

        Terminal.ClearScreen();
        Terminal.WriteLine("  _____                _            _ ");
        Terminal.WriteLine(" |_   _|              (_)          | |");
        Terminal.WriteLine("   | | __ _ __ _ _ __  _ _ _   __ _| |");
        Terminal.WriteLine("   | |/_ \\ '__| ' `  \\| | ' \\ / _` | |");
        Terminal.WriteLine("   | | __/ |  | || || | | || | (_| | |");
        Terminal.WriteLine("  _|_|\\__|_|  |_||_||_|_|_||_|\\__,_|_|");
        Terminal.WriteLine(" | |  | |          | |            ");
        Terminal.WriteLine(" | |__| | __ _  ___| | _____ _ __ ");
        Terminal.WriteLine(" |  __  |/ _` |/ __| |/ / _ \\ '__|");
        Terminal.WriteLine(" | |  | | (_| | (__|   <  __/ |   ");
        Terminal.WriteLine(" |_|  |_|\\__,_|\\___|_|\\_\\___|_|   ");

a little bit ugly. But that gets the job done.

I’m glad you found a solution. :slight_smile:

By “line spacing”, I meant this:

image

Thx.

Didn’t change anything in there.

I meant that you could have tried to decrease that value in your project, not that you did something wrong. :wink:

Oh ok. I obviously misunderstood… :hear_no_evil: :see_no_evil:

But when I used

Terminal.WriteLine("@
Hello
World");

There where no “empty lines”

Maybe the problem is/was the length if the string/lines. Ben and Rick hard-coded some things in their classes, and the length of the line often causes undesired side effects.

Yes. That was the initial problem.
Then I shortened it so much, that it should fit in.

My solution has the same line length.
So I really have no idea why this is behaving in such a way.

In addition to the “empty lines”

If formatting it with @ it is not beginning to write at the very top of the terminal (even not with clear screen right before)

But in the end: all this doesn’t really matter.

This project was meant to get familiar with c# and I’ve used this project to do exactly this.

So the solution I found is absolutely ok for me…

Anyway: thx for your time nina.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.