@name GuitarHero @inputs Screen:wirelink Key @outputs Score RockPercent Multiplier NoteStreak Hit Mode FirstNoteStart FirstNoteDone PlayStop @outputs Speed @persist [TrackStrings TrackSounds]:array I2 J2 Length2 @persist FretB FretT FretL FretR @persist Height Width Count R G B DrawStage Button Pause WrongPlays A @persist Title1:array Title2:array Title3:array @persist Track1:array TrackNum TrackPointer TrackPointerInc @persist String1:array String2:array String3:array String4:array String5:array @trigger Key if (first() | duped()) { #hint("-----------------------------", 10) #hint("- Geetar Hero, by Gobo -", 10) #hint("-----------------------------", 10) #hint("Strings: QWERT", 10) #hint("Reset: Z", 10) #hint("Pause: X", 10) #hint("Speed: NM", 10) Screen[1048574] = 1 # Clear Screen[1048569] = 1 # RGB Mode Height = 128 Width = 128 FretL = 25 #13 FretR = 128 - 25 #87 FretT = 25 FretB = 110 R = 255 G = 255 B = 255 Mode = 0 DrawStage = 1 TrackPointer = 1 Title1 = array() Title2 = array() # Gobo's Str1 = "011101110111011101011100" Str2 = "010001010101010101010100" Str3 = "010001010101010100010000" Str4 = "011101010110010100011100" Str5 = "010101010101010100000100" Str6 = "010101010101010100010100" Str7 = "011101110111011100011100" Title1:pushString(Str1) Title1:pushString(Str2) Title1:pushString(Str3) Title1:pushString(Str4) Title1:pushString(Str5) Title1:pushString(Str6) Title1:pushString(Str7) # Guitar Str1 = "0111011101110111011101110" Str2 = "0100010001000010010101010" Str3 = "0100010001000010010101010" Str4 = "0111011001100010011101100" Str5 = "0101010001000010010101010" Str6 = "0101010001000010010101010" Str7 = "0111011101110010010101010" Title2:pushString(Str1) Title2:pushString(Str2) Title2:pushString(Str3) Title2:pushString(Str4) Title2:pushString(Str5) Title2:pushString(Str6) Title2:pushString(Str7) # Hero Str1 = "01010111011101110" Str2 = "01010100010101010" Str3 = "01010100010101010" Str4 = "01110110011001010" Str5 = "01010100010101010" Str6 = "01010100010101010" Str7 = "01010111010101110" Title3:pushString(Str1) Title3:pushString(Str2) Title3:pushString(Str3) Title3:pushString(Str4) Title3:pushString(Str5) Title3:pushString(Str6) Title3:pushString(Str7) Track1 = array() Str1 = "001000001000000000000000000" # Part 1 Str2 = "000100000100000000000010100" Str3 = "010010010010011000000000000" Str4 = "000000100000100100001000000" Str5 = "000001000001000010010000000" Str1 += "00000000010000110000010100" # Part 2 Str2 += "00000001001001001000000000" Str3 += "01000000000010000100100000" Str4 += "00100010000000000001000000" Str5 += "00010100000000000000000000" Str1 += "01000001000000000000000000" # Part 1 Str2 += "00100000100000000000010100" Str3 += "10010010010011000000000000" Str4 += "00000100000100100001000000" Str5 += "00001000000000010010000000" Str1 += "0000000010000110000010100" # Part 2 Str2 += "0000001001001001000000000" Str3 += "1000000000010000100100000" Str4 += "0100010000000000001000000" Str5 += "0010100000000000000000000" Str1 += "0001110001110001110110000" # Part 3 Str2 += "1110001110001110000001110" Str3 += "0000000000000000000000000" Str4 += "0000000000000000000000000" Str5 += "0000000000000000000000000" Str1 += "00011100011100000000000" # Part 4 Str2 += "11100011100011000000000" Str3 += "00000000000000110001110" Str4 += "00000000000000001110000" Str5 += "00000000000000000000000" # Bug: If you add any more notes, the early ones get deleted #Str1 = "001000001000000000000000000" # Part 1 #Str2 = "000100000100000000000010100" #Str3 = "010010010010011000000000000" #Str4 = "000000100000100100001000000" #Str5 = "000001000001000010010000000" #Str1 += "0000000010000110000010100" # Part 2 #Str2 += "0000001001001001000000000" #Str3 += "1000000000010000100100000" #Str4 += "0100010000000000001000000" #Str5 += "0010100000000000000000000" Track1:pushString(Str1) Track1:pushString(Str2) Track1:pushString(Str3) Track1:pushString(Str4) Track1:pushString(Str5) String1 = array() String2 = array() String3 = array() String4 = array() String5 = array() ###################################################### # Thanks to Masogir for the Tetris song! TrackSounds[1, string] = "synth/square.wav" TrackStrings[1, string] = " bbbbbbb xxx ccc vvvvvvv ccc xxx zzzzzzz zzz ccc bbbbbbb vvv ccc xxxxxxx ccc vvvvvvv bbbbbbb ccccccc zzzzzzz zzzzzzz " + " vvvvvvv nnn ,,,,,,, mmm nnn bbbbbbb ccc bbbbbbb vvv ccc xxxxxxx xxx ccc vvvvvvv bbbbbbb ccccccc zzzzzzz zzzzzzz " + " bbbbbbb xxx ccc vvvvvvv ccc xxx zzzzzzz zzz ccc bbbbbbb vvv ccc xxxxxxx ccc vvvvvvv bbbbbbb ccccccc zzzzzzz zzzzzzz " + " vvvvvvv nnn ,,,,,,, mmm nnn bbbbbbb ccc bbbbbbb vvv ccc xxxxxxx xxx ccc vvvvvvv bbbbbbb ccccccc zzzzzzz zzzzzzz " + " ppppppppppppppp iiiiiiiiiiiiiii ooooooooooooooo uuuuuuuuuuuuuuu iiiiiiiiiiiiiii yyyyyyyyyyyyyyy yyyyyyyyyyyyyyy uuuuuuu " + " ppppppppppppppp iiiiiiiiiiiiiii ooooooooooooooo uuuuuuuuuuuuuuu iiiiiii ppppppp zzzzzzzzzzzzzzz aaaaaaaaaaaaaaa " TrackSounds[2, string] = "synth/tri.wav" TrackStrings[2, string] = " eee ppp eee ppp eee ppp eee ppp yyy zzz yyy zzz yyy zzz yyy zzz 666 aaa yyy zzz eee ppp eee ppp yyy zzz yyy zzz yyy zzz uuu iii" + " ooo www www www yyy rrr qqq iii iii qqq ttt ttt uuu xxx xxx ppp [[[ yyy zzz yyy zzz yyy " + " eee ppp eee ppp eee ppp eee ppp yyy zzz yyy zzz yyy zzz yyy zzz 666 aaa yyy zzz eee ppp eee ppp yyy zzz yyy zzz yyy zzz uuu iii" + " ooo www www www yyy rrr qqq iii iii qqq ttt ttt uuu xxx xxx ppp [[[ yyy zzz yyy zzz yyy " + " zzz bbb zzz bbb zzz bbb zzz bbb aaa bbb zzz bbb zzz bbb zzz bbb zzz bbb zzz bbb zzz bbb zzz bbb zzz bbb zzz bbb aaa bbb zzz bbb" + " zzz bbb zzz bbb zzz bbb zzz bbb aaa bbb zzz bbb zzz bbb zzz bbb zzz bbb zzz bbb zzz bbb zzz bbb zzz bbb zzz bbb aaa bbb zzz bbb" TrackSounds[3, string] = "synth/sine.wav" TrackStrings[3, string] = " xxx aaa zzz x b vvv zzz ]]] ppp ppp zzz ccc xxx zzz aaa [ p ]]] zzz xxx ccc zzz ppp ppp " + " [[[ zzz ccc c c xxx zzz ]]] ppp ]]] z ] [[[ ppp aaa ppp ]]] zzz xxx ]]] ccc ]]] zzz ppp ppp ppp " + " xxx aaa zzz x b vvv zzz ]]] ppp ppp zzz ccc xxx zzz aaa [ p ]]] zzz xxx ccc zzz ppp ppp " + " [[[ zzz ccc c c xxx zzz ]]] ppp ]]] z ] [[[ ppp aaa ppp ]]] zzz xxx ]]] ccc ]]] zzz ppp ppp ppp " + " iiiiiiiiiiiiiii yyyyyyyyyyyyyyy uuuuuuuuuuuuuuu 666666666666666 yyyyyyyyyyyyyyy eeeeeeeeeeeeeee eeeeeeeeeeeeeee 6666666 " + " iiiiiiiiiiiiiii yyyyyyyyyyyyyyy uuuuuuuuuuuuuuu 666666666666666 yyyyyyy iiiiiii ppppppppppppppp ooooooooooooooo " TrackSounds[4, string] = "synth/tri.wav" TrackStrings[4, string] = " 222 www w w www www www www www www 222 www w w www www www www www www" + " 222 www w w www www www www www www 222 www w w www www www www www www" + " 222 www w w www www www www www www 222 www w w www www www www www www" + " 222 www w w www www www www www www 222 www w w www www www www www www" + " 222 www w w www www www www www www 222 www w w www www www www www www" + " 222 www w w www www www www www www 222 www w w www www www www www www" while (I2 < TrackStrings:count()) { I2++ String = TrackStrings[I2, string] String = String:replace("7", "temp") String = String:replace("0", "74>") String = String:replace("6", "67>") String = String:replace("2", "60>") String = String:replace("3", "62>") String = String:replace("5", "65>") String = String:replace("9", "72>") String = String:replace("temp","69>") String = String:replace(" ", "00>") String = String:replace("q", "59>") String = String:replace("w", "61>") String = String:replace("e", "63>") String = String:replace("r", "64>") String = String:replace("t", "66>") String = String:replace("y", "68>") String = String:replace("u", "70>") String = String:replace("i", "71>") String = String:replace("o", "73>") String = String:replace("p", "75>") String = String:replace("[", "76>") String = String:replace("]", "78>") String = String:replace("=", "77>") String = String:replace("a", "79>") String = String:replace("z", "80>") String = String:replace("s", "81>") String = String:replace("x", "82>") String = String:replace("c", "83>") String = String:replace("f", "84>") String = String:replace("v", "85>") String = String:replace("g", "86>") String = String:replace("b", "87>") String = String:replace("n", "88>") String = String:replace("j", "89>") String = String:replace("m", "90>") String = String:replace("k", "91>") String = String:replace(",", "92>") String = String:replace("l", "93>") String = String:replace(".", "94>") String = String:replace("/", "95>") String = String:replace("'", "96>") TrackStrings[I2, string] = String } Length2 = TrackStrings[1, string]:length() FirstNoteStart = 0 Speed = 1 } interval((-1*(Speed - 5)) * 25) if (toChar(Key) == "z") { # Reset reset() } if (Mode == 1) { if (toChar(Key) == "x") { # Pause Pause = 1 for (I = 1, 4) { soundPitch(I, 0) } } elseif (!!toChar(Key)) { Pause = 0 } } if (!inputClk() & !Pause) { # Wrapped around the whole thing to make sure button # spam doesn't make the program run faster if ((toChar(Key) != "n" & toChar(Key) != "m" & Key) & Mode == 0) { Mode = 1 Score = 0 Multiplier = 1 Streak = 0 } if (Mode == 1) { TrackPointerInc++ if (TrackPointerInc == 5) { TrackPointer++ TrackPointerInc = 0 } if (TrackPointerInc == 0 & TrackPointer <= Track1[1, string]:length()) { A = 0 for (I = 1, 5) { if (Track1[I, string]:index(TrackPointer) == "1") { A = I } } if (A == 1) { String1:pushNumber(25) } if (A == 2) { String2:pushNumber(25) } if (A == 3) { String3:pushNumber(25) } if (A == 4) { String4:pushNumber(25) } if (A == 5) { String5:pushNumber(25) } } if (NoteStreak > 6) { Multiplier = 2 } else { Multiplier = 1 } if (NoteStreak > 12) { Multiplier = 4 } if (NoteStreak > 18) { Multiplier = 8 } #if (Button != 0) { Button = 0 } if (Key) { if (toChar(Key) == "q") { Button = 1 } elseif (toChar(Key) == "w") { Button = 2 } elseif (toChar(Key) == "e") { Button = 3 } elseif (toChar(Key) == "r") { Button = 4 } elseif (toChar(Key) == "t") { Button = 5 } } } else { FirstNoteStart = 0 if (toChar(Key) == "m" & $Key != 0) { if (Speed < 4) { Speed++ } } if (toChar(Key) == "n" & $Key != 0) { if (Speed > 1) { Speed-- } } } # Draw buttons R = 255 G = 255 B = 255 Size = 0.69 ButtonXStart = 21 for (I = 1, 5) { if (I != Button) { TempCell = floor((FretB + 2) * Height + ButtonXStart + (I*10)/Size) * 3 Screen[TempCell] = 0 Screen[TempCell + 1] = 0 Screen[TempCell + 2] = 0 Screen[TempCell + 3] = 0 Screen[TempCell + 3 + 1] = 0 Screen[TempCell + 3 + 2] = 0 Screen[TempCell - 3] = 0 Screen[TempCell - 3 + 1] = 0 Screen[TempCell - 3 + 2] = 0 # sides Screen[TempCell + (Height*3) - 3 - 3] = 0 Screen[TempCell + (Height*3) - 3 - 3 + 1] = 0 Screen[TempCell + (Height*3) - 3 - 3 + 2] = 0 Screen[TempCell + (Height*3) + 3 + 3] = 0 Screen[TempCell + (Height*3) + 3 + 3 + 1] = 0 Screen[TempCell + (Height*3) + 3 + 3 + 2] = 0 Screen[TempCell + (Height*3)*2 + 3 + 3] = 0 Screen[TempCell + (Height*3)*2 + 3 + 3 + 1] = 0 Screen[TempCell + (Height*3)*2 + 3 + 3 + 2] = 0 Screen[TempCell + (Height*3)*2 - 3 - 3] = 0 Screen[TempCell + (Height*3)*2 - 3 - 3 + 1] = 0 Screen[TempCell + (Height*3)*2 - 3 - 3 + 2] = 0 } } if (Button != 0) { TempCell = floor((FretB + 2) * Height + ButtonXStart + (Button*10)/Size) * 3 Screen[TempCell] = R Screen[TempCell + 1] = G Screen[TempCell + 2] = B Screen[TempCell + 3] = R Screen[TempCell + 3 + 1] = G Screen[TempCell + 3 + 2] = B Screen[TempCell - 3] = R Screen[TempCell - 3 + 1] = G Screen[TempCell - 3 + 2] = B # sides Screen[TempCell + (Height*3) - 3 - 3] = R Screen[TempCell + (Height*3) - 3 - 3 + 1] = G Screen[TempCell + (Height*3) - 3 - 3 + 2] = B Screen[TempCell + (Height*3) + 3 + 3] = R Screen[TempCell + (Height*3) + 3 + 3 + 1] = G Screen[TempCell + (Height*3) + 3 + 3 + 2] = B Screen[TempCell + (Height*3)*2 + 3 + 3] = R Screen[TempCell + (Height*3)*2 + 3 + 3 + 1] = G Screen[TempCell + (Height*3)*2 + 3 + 3 + 2] = B Screen[TempCell + (Height*3)*2 - 3 - 3] = R Screen[TempCell + (Height*3)*2 - 3 - 3 + 1] = G Screen[TempCell + (Height*3)*2 - 3 - 3 + 2] = B } if (Mode == 1) { # Draw notes # String 1 if (String1:count() > 0) { RemoveBottom = 0 for (I = 1, String1:count()) { SlantX = floor((String1[I, number]-25)/50*13) Screen[(String1[I, number] * Height + 46 + 15 - 4 - SlantX) * 3] = 55 Screen[(String1[I, number] * Height + 46 + 15 - 4 - SlantX) * 3 + 1] = 55 Screen[(String1[I, number] * Height + 46 + 15 - 4 - SlantX) * 3 + 2] = 55 if (String1[I, number] < FretB) { String1[I, number] = String1[I, number] + 1 SlantX = floor((String1[I, number]-25)/50*13) Screen[(String1[I, number] * Height + 46 + 15 - 4 - SlantX) * 3] = 0 Screen[(String1[I, number] * Height + 46 + 15 - 4 - SlantX) * 3 + 1] = 255 Screen[(String1[I, number] * Height + 46 + 15 - 4 - SlantX) * 3 + 2] = 0 } else { RemoveBottom = 1 if (FirstNoteStart != 1) { FirstNoteStart = 1 } if (Button == 1) { Score += Multiplier NoteStreak++ if (Hit < 0) { Hit = 0 } Hit++ } else { NoteStreak = 0 if (Hit > 0) { Hit = 0 } Hit-- } } } if (RemoveBottom) { String1:removeNumber(1) } } # String 2 if (String2:count() > 0) { RemoveBottom = 0 for (I = 1, String2:count()) { SlantX = floor((String2[I, number]-25)/50*6) Screen[(String2[I, number] * Height + 48 + 15 - 3 - SlantX) * 3] = 55 Screen[(String2[I, number] * Height + 48 + 15 - 3 - SlantX) * 3 + 1] = 55 Screen[(String2[I, number] * Height + 48 + 15 - 3 - SlantX) * 3 + 2] = 55 if (String2[I, number] < FretB) { String2[I, number] = String2[I, number] + 1 SlantX = floor((String2[I, number]-25)/50*6) Screen[(String2[I, number] * Height + 48 + 15 - 3 - SlantX) * 3] = 255 Screen[(String2[I, number] * Height + 48 + 15 - 3 - SlantX) * 3 + 1] = 0 Screen[(String2[I, number] * Height + 48 + 15 - 3 - SlantX) * 3 + 2] = 0 } else { RemoveBottom = 1 if (FirstNoteStart != 1) { FirstNoteStart = 1 } if (Button == 2) { Score += Multiplier NoteStreak++ if (Hit < 0) { Hit = 0 } Hit++ } else { NoteStreak = 0 if (Hit > 0) { Hit = 0 } Hit-- } } } if (RemoveBottom) { String2:removeNumber(1) } } # String 3 if (String3:count() > 0) { RemoveBottom = 0 for (I = 1, String3:count()) { Screen[(String3[I, number] * Height + (128/2)) * 3] = 55 Screen[(String3[I, number] * Height + (128/2)) * 3 + 1] = 55 Screen[(String3[I, number] * Height + (128/2)) * 3 + 2] = 55 if (String3[I, number] < FretB) { String3[I, number] = String3[I, number] + 1 Screen[(String3[I, number] * Height + (128/2)) * 3] = 255 Screen[(String3[I, number] * Height + (128/2)) * 3 + 1] = 255 Screen[(String3[I, number] * Height + (128/2)) * 3 + 2] = 0 } else { RemoveBottom = 1 if (FirstNoteStart != 1) { FirstNoteStart = 1 } if (Button == 3) { Score += Multiplier NoteStreak++ if (Hit < 0) { Hit = 0 } Hit++ } else { NoteStreak = 0 if (Hit > 0) { Hit = 0 } Hit-- } } } if (RemoveBottom) { String3:removeNumber(1) } } # String 4 if (String4:count() > 0) { RemoveBottom = 0 for (I = 1, String4:count()) { SlantX = floor((String4[I, number]-25)/50*6) Screen[(String4[I, number] * Height + 52 + 15 + 1 + SlantX) * 3] = 55 Screen[(String4[I, number] * Height + 52 + 15 + 1 + SlantX) * 3 + 1] = 55 Screen[(String4[I, number] * Height + 52 + 15 + 1 + SlantX) * 3 + 2] = 55 if (String4[I, number] < FretB) { String4[I, number] = String4[I, number] + 1 SlantX = floor((String4[I, number]-25)/50*6) Screen[(String4[I, number] * Height + 52 + 15 + 1 + SlantX) * 3] = 0 Screen[(String4[I, number] * Height + 52 + 15 + 1 + SlantX) * 3 + 1] = 0 Screen[(String4[I, number] * Height + 52 + 15 + 1 + SlantX) * 3 + 2] = 255 } else { RemoveBottom = 1 if (FirstNoteStart != 1) { FirstNoteStart = 1 } if (Button == 4) { Score += Multiplier NoteStreak++ if (Hit < 0) { Hit = 0 } Hit++ } else { NoteStreak = 0 if (Hit > 0) { Hit = 0 } Hit-- } } } if (RemoveBottom) { String4:removeNumber(1) } } # String 5 if (String5:count() > 0) { RemoveBottom = 0 for (I = 1, String5:count()) { SlantX = floor((String5[I, number]-25)/50*13) Screen[(String5[I, number] * Height + 54 + 15 + 2 + SlantX) * 3] = 55 Screen[(String5[I, number] * Height + 54 + 15 + 2 + SlantX) * 3 + 1] = 55 Screen[(String5[I, number] * Height + 54 + 15 + 2 + SlantX) * 3 + 2] = 55 if (String5[I, number] < FretB) { String5[I, number] = String5[I, number] + 1 SlantX = floor((String5[I, number]-25)/50*13) Screen[(String5[I, number] * Height + 54 + 15 + 2 + SlantX) * 3] = 255 Screen[(String5[I, number] * Height + 54 + 15 + 2 + SlantX) * 3 + 1] = 120 Screen[(String5[I, number] * Height + 54 + 15 + 2 + SlantX) * 3 + 2] = 0 } else { RemoveBottom = 1 if (FirstNoteStart != 1) { FirstNoteStart = 1 } if (Button == 5) { Score += Multiplier NoteStreak++ if (Hit < 0) { Hit = 0 } Hit++ } else { NoteStreak = 0 if (Hit > 0) { Hit = 0 } Hit-- } } } if (RemoveBottom) { String5:removeNumber(1) } } } ############################################## # I split the initial drawing stuff into stages so I don't # hit the quota. This could probably be done in a better way # But at least this is simple. XSt = 26 YSt = 10 if (DrawStage == 5) { #hint("Stage: " + DrawStage, 2) R = 255 G = 255 B = 0 ImageW = 17 ImageH = 7 XStart = XSt + 53 #59 # Hero for (I = 1, ImageH) { for (J = 1, ImageW) { if (Title3[I, string]:index(J) == "1") { Screen[((I + YSt) * Height + XStart + J) * 3] = R Screen[((I + YSt) * Height + XStart + J) * 3 + 1] = G Screen[((I + YSt) * Height + XStart + J) * 3 + 2] = B } else { Screen[((I + YSt) * Height + XStart + J) * 3] = 155 Screen[((I + YSt) * Height + XStart + J) * 3 + 1] = 0 Screen[((I + YSt) * Height + XStart + J) * 3 + 2] = 0 } } } DrawStage++ } if (DrawStage == 4) { #hint("Stage: " + DrawStage, 2) R = 255 G = 255 B = 0 ImageW = 25 ImageH = 7 XStart = XSt + 26 #32 # Guitar for (I = 1, ImageH) { for (J = 1, ImageW) { if (Title2[I, string]:index(J) == "1") { Screen[((I + YSt) * Height + XStart + J) * 3] = R Screen[((I + YSt) * Height + XStart + J) * 3 + 1] = G Screen[((I + YSt) * Height + XStart + J) * 3 + 2] = B } else { Screen[((I + YSt) * Height + XStart + J) * 3] = 155 Screen[((I + YSt) * Height + XStart + J) * 3 + 1] = 155 Screen[((I + YSt) * Height + XStart + J) * 3 + 2] = 0 } } } DrawStage++ } if (DrawStage == 3) { #hint("Stage: " + DrawStage, 2) R = 255 G = 255 B = 0 ImageW = 24 ImageH = 7 XStart = XSt # Gobo's for (I = 1, ImageH) { for (J = 1, ImageW) { if (Title1[I, string]:index(J) == "1") { Screen[((I + YSt) * Height + XStart + J) * 3] = R Screen[((I + YSt) * Height + XStart + J) * 3 + 1] = G Screen[((I + YSt) * Height + XStart + J) * 3 + 2] = B } else { Screen[((I + YSt) * Height + XStart + J) * 3] = 155 Screen[((I + YSt) * Height + XStart + J) * 3 + 1] = 0 Screen[((I + YSt) * Height + XStart + J) * 3 + 2] = 0 } } } DrawStage++ } if (DrawStage == 2) { #hint("Stage: " + DrawStage, 2) for (I = FretL + 14, FretR - 14) { # Bottom Fret Screen[(70 * Height + I) * 3] = 120 Screen[(70 * Height + I) * 3 + 1] = 150 Screen[(70 * Height + I) * 3 + 2] = 120 } for (I = FretL + 24, FretR - 24) { # Middle Fret Screen[(45 * Height + I) * 3] = 70 Screen[(45 * Height + I) * 3 + 1] = 100 Screen[(45 * Height + I) * 3 + 2] = 70 } for (I = FretL + 30, FretR - 30) { # Top Fret Screen[(30 * Height + I) * 3] = 20 Screen[(30 * Height + I) * 3 + 1] = 50 Screen[(30 * Height + I) * 3 + 2] = 20 } # Draw initial string lines (before the game has even started) #R = 0 G = 0 B = 0 # #for (I = FretT, FretB) { # # if (R <= 55) { # R += 2 G += 2 B += 2 # } # # SlantX = floor((I-25)/50*13) # # # Right Middle # Screen[(I * Height + 54 + SlantX) * 3] = R # Screen[(I * Height + 54 + SlantX) * 3 + 1] = G # Screen[(I * Height + 54 + SlantX) * 3 + 2] = B # # # Left Middle # Screen[(I * Height + 46 - SlantX) * 3] = R # Screen[(I * Height + 46 - SlantX) * 3 + 1] = G # Screen[(I * Height + 46 - SlantX) * 3 + 2] = B # # SlantX = floor((I-25)/50*6) # # # Right Middle # Screen[(I * Height + 52 + SlantX) * 3] = R # Screen[(I * Height + 52 + SlantX) * 3 + 1] = G # Screen[(I * Height + 52 + SlantX) * 3 + 2] = B # # # Left Middle # Screen[(I * Height + 48 - SlantX) * 3] = R # Screen[(I * Height + 48 - SlantX) * 3 + 1] = G # Screen[(I * Height + 48 - SlantX) * 3 + 2] = B # # # Middle # Screen[(I * Height + 50) * 3] = R # Screen[(I * Height + 50) * 3 + 1] = G # Screen[(I * Height + 50) * 3 + 2] = B #} DrawStage++ } if (DrawStage == 1) { #hint("Stage: " + DrawStage, 2) R = 0 G = 0 B = 0 for (I = FretT, FretB) { if (R < 255) { R += 5 G += 5 B += 5 } SlantX = floor((I-25)/50*20) # Left Screen[(I * Height + 45 + 10 - SlantX) * 3] = R Screen[(I * Height + 45 + 10 - SlantX) * 3 + 1] = G Screen[(I * Height + 45 + 10 - SlantX) * 3 + 2] = B # Right Screen[(I * Height + 55 + 28 - 10 + SlantX) * 3] = R Screen[(I * Height + 55 + 28 - 10 + SlantX) * 3 + 1] = G Screen[(I * Height + 55 + 28 - 10 + SlantX) * 3 + 2] = B } R = 255 G = 255 B = 255 for (I = FretL - 2, FretR + 2) { # Bottom Screen[(FretB * Height + I) * 3] = R Screen[(FretB * Height + I) * 3 + 1] = G Screen[(FretB * Height + I) * 3 + 2] = B } DrawStage++ } Play = Hit if (FirstNoteStart) { if (!FirstNoteDone) { FirstNoteDone = 1 I2 = J2 = 0 Count = TrackStrings:count() while(J2 < Count) { J2++ entity():soundPlay(J2, 0, TrackSounds[J2, string] ) } } I2 += 3 I2 = I2 % Length2 SubA = I2 - 2 SubB = I2 - 1 J2 = 0 while( J2 0) { WrongPlays = -200 } if ($Hit < 0 | WrongPlays > 10) { soundPitch(J2,2^((PV+randint(10)-5)/12)) WrongPlays++ } elseif ($Hit >= 0) { soundPitch(J2,2^(PV/12)) } } if (I2 == 0 & FirstNoteDone) { Mode = 0 FirstNoteStart = 0 FirstNoteDone = 0 TrackPointer = 1 } } else { soundPurge() } }