Chaosforge Forum

  • April 15, 2024, 21:56
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: Javascript ASCII DooM icon writer  (Read 1765 times)

ParaSait

  • Baffen :P
  • Elder
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1229
  • Happy Little Boozer
    • View Profile
    • MPSF
Javascript ASCII DooM icon writer
« on: March 07, 2008, 13:22 »

I'm busy creating a function in javascript that writes the ASCII DooM icon (from DooMRL) on the screen. Note that "WriteSpaces" writes a certain quantity of nbsp's (unbreakable spaces) on the screen. It's a lot of work and I'm really tired of finishing it. Can someone do it for me? Use the icon at the main menu of DooMRL as an example. This is the function so far:

Code: [Select]
function CreateDoomIcon()
{
document.write("</font><font face='"+FontType+"' color='"+ColorBlue+"'>###")
WriteSpaces(37);
document.write("##<br>######");
WriteSpaces(6);
document.write("####");
WriteSpaces(7);
document.write("####");
WriteSpaces(5);
document.write("#");
WriteSpaces(6);
document.write("###<br>#########&nbsp########&nbsp&nbsp&nbsp########&nbsp####");
WriteSpaces(4);
document.write("####<br>###&nbsp#####&nbsp###&nbsp&nbsp####&nbsp####&nbsp&nbsp###&nbsp#####&nbsp&nbsp#####<br>###&nbsp&nbsp&nbsp##</font><font face='"+FontType+"' color='"+ColorYellow+"'>#&nbsp#</font><font face='"+FontType+"' color='"+ColorBlue+"'>##&nbsp&nbsp&nbsp###&nbsp###&nbsp&nbsp&nbsp##</font><font face='"+FontType+"' color='"+ColorYellow+"'>#&nbsp#</font><font face='"+FontType+"' color='"+ColorBlue+"'>###########<br>###&nbsp&nbsp&nbsp#</font><font face='"+FontType+"' color='"+ColorYellow+"'>##&nbsp###&nbsp&nbsp&nbsp</font><font face='"+FontType+"' color='"+ColorBlue+"'>###&nbsp###&nbsp&nbsp&nbsp</font><font face='"+FontType+"' color='"+ColorYellow+"'>###&nbsp##</font><font face='"+FontType+"' color='"+ColorBlue+"'>#&nbsp####&nbsp###<br>###&nbsp&nbsp&nbsp</font><font face='"+FontType+"' color='"+ColorYellow+"'>###&nbsp###&nbsp&nbsp&nbsp#</font><font face='"+FontType+"' color='"+ColorBlue+"'>##&nbsp##</font><font face='"+FontType+"' color='"+ColorYellow+"'>");
}

Oh and note that FontType is "Terminal" (which is an ideal font type for creating ASCII art).
Logged
[18|7|3|0|0|0] [MED:13/43] [SPE:36/67] [ASM:11/40]

Check out my epic youtube channel!
Currently playing The Bard's Tale and System Shock 2 (coop with GrAV1t)!
Pages: [1]