-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patharcade.py
More file actions
112 lines (67 loc) · 4.21 KB
/
Copy patharcade.py
File metadata and controls
112 lines (67 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#------------------------------------------------------------------------------
# _ ____ ____ _ ____ _____ --
# / \ | _ \ / ___| / \ | _ \| ____| --
# / _ \ | |_) | | / _ \ | | | | _| --
# / ___ \| _ <| |___ / ___ \| |_| | |___ --
# /_/ \_\_| \_\\____/_/ \_\____/|_____| --
# --
#------------------------------------------------------------------------------
import LEDarcade as LED
import DotInvaders as DI
import Outbreak as OB
import SpaceDot as SD
import Tron as TR
import Defender as DE
import time
#---------------------------------------
#Variable declaration section
#---------------------------------------
ScrollSleep = 0.025
TerminalTypeSpeed = 0.02 #pause in seconds between characters
TerminalScrollSpeed = 0.02 #pause in seconds between new lines
CursorRGB = (0,255,0)
CursorDarkRGB = (0,50,0)
#--------------------------------------
# M A I N P R O C E S S I N G --
#--------------------------------------
def LaunchArcade(GameMaxMinutes = 10000):
global start_time
start_time = time.time()
LED.LoadConfigData()
LED.ShowTitleScreen(
BigText = 'ARCADE',
BigTextRGB = LED.HighRed,
BigTextShadowRGB = LED.ShadowRed,
LittleText = 'RETRO CLOCK',
LittleTextRGB = LED.MedGreen,
LittleTextShadowRGB = (0,10,0),
ScrollText = 'Insert 25 cents to continue',
ScrollTextRGB = LED.MedYellow,
ScrollSleep = 0.03, # time in seconds to control the scrolling (0.005 is fast, 0.1 is kinda slow)
DisplayTime = 1, # time in seconds to wait before exiting
ExitEffect = 0 # 0=Random / 1=shrink / 2=zoom out / 3=bounce / 4=fade /5=fallingsand
)
LED.ClearBigLED()
LED.ClearBuffers()
CursorH = 0
CursorV = 0
LED.ScreenArray,CursorH,CursorV = LED.TerminalScroll(LED.ScreenArray,"accessing time machine",CursorH=CursorH,CursorV=CursorV,MessageRGB=(100,100,0),CursorRGB=(0,255,0),CursorDarkRGB=(0,50,0),StartingLineFeed=1,TypeSpeed=TerminalTypeSpeed,ScrollSpeed=TerminalTypeSpeed)
LED.BlinkCursor(CursorH= CursorH,CursorV=CursorV,CursorRGB=CursorRGB,CursorDarkRGB=CursorDarkRGB,BlinkSpeed=0.5,BlinkCount=2)
LED.ScreenArray,CursorH,CursorV = LED.TerminalScroll(LED.ScreenArray,"entering 1984",CursorH=CursorH,CursorV=CursorV,MessageRGB=(100,100,0),CursorRGB=(0,255,0),CursorDarkRGB=(0,50,0),StartingLineFeed=1,TypeSpeed=TerminalTypeSpeed,ScrollSpeed=TerminalTypeSpeed)
LED.BlinkCursor(CursorH= CursorH,CursorV=CursorV,CursorRGB=CursorRGB,CursorDarkRGB=CursorDarkRGB,BlinkSpeed=0.5,BlinkCount=2)
LED.ScreenArray,CursorH,CursorV = LED.TerminalScroll(LED.ScreenArray,"GOOD LUCK!",CursorH=CursorH,CursorV=CursorV,MessageRGB=(0,0,255),CursorRGB=(0,255,0),CursorDarkRGB=(0,50,0),StartingLineFeed=1,TypeSpeed=0.005,ScrollSpeed=ScrollSleep)
LED.BlinkCursor(CursorH= CursorH,CursorV=CursorV,CursorRGB=CursorRGB,CursorDarkRGB=CursorDarkRGB,BlinkSpeed=0.5,BlinkCount=2)
DE.LaunchDefender(GameMaxMinutes)
LED.DisplayDigitalClock(ClockStyle=3,CenterHoriz=True,v=1, hh=24, ZoomFactor = 1, AnimationDelay=30, RunMinutes = 5 )
TR.LaunchTron(GameMaxMinutes)
LED.DisplayDigitalClock(ClockStyle=3,CenterHoriz=True,v=1, hh=24, ZoomFactor = 1, AnimationDelay=30, RunMinutes = 5 )
DI.LaunchDotInvaders(GameMaxMinutes)
LED.DisplayDigitalClock(ClockStyle=3,CenterHoriz=True,v=1, hh=24, ZoomFactor = 1, AnimationDelay=30, RunMinutes = 5 )
OB.LaunchOutbreak(GameMaxMinutes)
LED.DisplayDigitalClock(ClockStyle=3,CenterHoriz=True,v=1, hh=24, ZoomFactor = 1, AnimationDelay=30, RunMinutes = 5 )
SD.LaunchSpaceDot(GameMaxMinutes)
LED.DisplayDigitalClock(ClockStyle=3,CenterHoriz=True,v=1, hh=24, ZoomFactor = 1, AnimationDelay=30, RunMinutes = 5 )
#execute if this script is called directly
if __name__ == "__main__" :
while(1==1):
LaunchArcade(5)