Spoiler
Over the past few months after being introduced to ComputerCraft I have come along some very impressive GUIs in programs built by other players. I have always marveled at the accuracy and patience required to actually sit and write out the art.My first attempts at learning ended in miserable failure, so I desperately searched for an easy fix. Unfortunately, there was none; my artistic abilities both on and off the computer were doomed to remain at that of a child.
The reality of making ASCII art is that is quite simple if you don't mind using a couple of external tools! :P/>/>
The website I have used multiple times is this one: http://patorjk.com/software/taag/
This is an ASCII Art generator that will draw the text you write into the art font specified.
Once you've selected your font and have the proper text drawn, it's time to move this artistic wonder into a program!
First create a new file in NotePad++ to avoid later Repalcement accidents with '\' that you didn't want removed!
Typically, titles and other art are stored as a function that may look something like this:
function printLogo()
-- Print statements here
end
Once you have designed this functions framework (function header, end statement, etc.), you can simply copy over the text that was created by the generator line by line into separate print statements! Easy as pie!
Your new Logo function should look something like this:
function printLogo()
print(" _____ _____ _____ _____ ")
print("|_ _| ___/ ___|_ _|")
print(" | | | |__ \ `--. | | ")
print(" | | | __| `--. \ | | ")
print(" | | | |___/\__/ / | | ")
print(" \_/ \____/\____/ \_/ ")
end
Excellent! You're almost finished!
Now, you're bound to come across a scenario in which your drawing contains a slash of this fashion '\'. LUA and every programming language I know considers this an exit character usually followed by a further identifier like '\n' to end the line.
To fix this, if you use Notepad++ like me, just use the handy-dandy Ctrl+F tool! You'll be presented with a dialog box for the find feature, but you should choose the tab next to it, 'Replace'.
From the Replace tab, enter in the 'Find:' field: \
In the 'Replace With :' field, enter: \\
Finally, press replace all!
There are also some ASCII characters that ComputerCraft won't display, but instead will replace with a '?'.
The most common of which that I have found is this little bugger –> `
( I apologize for the lack of a name)
I usually replace characters like this guy with a period because I personally feel it takes away the least amount of graphical awe from your art.
Now, just move your new function into the intended file and call her whenever you'd your users' jaw to hit the floor in the amount of "effort" you put into your new ASCII Art!
~ Payment