Laser Projector New Years' Countdown

With the new year coming up, and a lot of us being stuck indoors, I thought I’d make a Laser Projector New Years’ countdown for anyone that’s spending it in Tower Unite.

The first one:

Counts down to midnight, then remains at 00:00:00 for the grace_period, which is 4 hours by default. There’s no way of checking the date in laser code as far as I’m aware so this is the best I could do.

Reveal Code
# Digital Clock Countdown by BOT Dan
# Laser Projector Settings:
# - Shape: Rectangular Grid
# - Grid Size: 20 x 20
# - Colour: White

# Display Settings:
# Set the scale of the clock here (similar to FOV)
scale = 4;

# Set the distance between numbers here
gap = 2;

# Sets the amount of seconds after midnight to continue registering as 00:00:00 (60 * 60 * 4 = 4hrs)
grace_period = 60 * 60 * 4;

# Sets an offset in seconds to the current time. Could be used if you don't want to count down to midnight.
time_offset = 60 * 60 * 0;

# Colour Settings:
# - [1] Block Colour
# - [2] Rainbow - Full
# - [3] Rainbow - Horizontal
# - [4] Rainbow - Vertical
# Set this to one of the numbers above
colour_type = 1;

# If using block colour, set your colour here (0-360)
colour_block = 0;

# If using rainbow, change the cycle speed here
colour_speed = 100;

# If using rainbow, change the stretch of colour
colour_stretch = 1;

############### CODE STARTS BELOW ###############

# Make 7 (6x10) display squares ( Top-left = (0,0) )
fake_z = floor( index / 60 );

fake_y = floor( ( index - ( fake_z * 60 ) ) / 6 );
fake_x = ( index % 6 );

fake_z = if(index>=360 & index<384, 6, fake_z);
fake_z = if(index>=384, 7, fake_z);

# Place the lasers into the display squares
x' = -( fake_x * scale + ( fake_z * ( 6 * scale + gap ) ) );
x' = x' - floor( fake_z / 2 ) * ( 2 * scale + gap );
x' = x' + ( 20 * scale ) + ( 3 * gap );
y' = ( fake_y * scale );
y' = y' - ( 5 * scale );

# Break up the 7th display square into 2 colon columns
fake_x = if( ( index>=360 & index<372 ),
	( index % 2 ),
	fake_x);
fake_y = if( ( index>=360 & index<372 ),
	floor( ( index - 360 ) / 2) + 2,
	fake_y);
	
fake_x = if( ( index>=372 & index<384 ),
	( index % 2 ),
	fake_x);
fake_y = if( ( index>=372 & index<384 ),
	floor( ( index - 372 ) / 2) + 2,
	fake_y);

# Position these 2 colon columns
x' = if( ( index>=360 & index<372 ),
	-( fake_x * scale + ( 2 * ( 6 * scale + gap ) ) ) + ( 20 * scale ) + ( 3 * gap ),
	x' );
y' = if( ( index>=360 & index<372 ),
	fake_y * scale - ( 5 * scale ),
	y' );
	
x' = if( ( index>=372 & index<384 ),
	-( fake_x * scale + ( 4 * ( 6 * scale + gap ) ) ) + ( - floor( 3 / 2 ) * ( 2 * scale + gap ) ) + ( 20 * scale ) + ( 3 * gap ),
	x' );
y' = if( ( index>=372 & index<384 ),
	fake_y * scale - ( 5 * scale ),
	y' );

# Make the minus sign
x' = if( index>=384,
	-( fake_x * scale - ( 1 * ( 6 * scale + gap ) ) ) + ( 20 * scale ) + ( 3 * gap ),
	x' );

# We have 40 spare Dots
# 8 needed per colon
# 2 colons
# leaves 24 for minus
# 12 needed for minus sign


# Define the 7 segments of a number and the ":"
seg_t =   (fake_y<=1);
seg_t_l = ((fake_x<=1) & (fake_y<=4));
seg_t_r = ((fake_x>=4) & (fake_y<=4));
seg_m   = ((fake_y>=4) & (fake_y<=5));
seg_b_l = ((fake_x<=1) & (fake_y>=5));
seg_b_r = ((fake_x>=4) & (fake_y>=5));
seg_b   = (fake_y>=8);
seg_dot = ( fake_y >= 2 & fake_y <=3 ) | ( fake_y >= 6 & fake_y <= 7 );

# Define 0 to 9 using the segments
num_0 = seg_t   + seg_t_l + seg_t_r + seg_b_l + seg_b_r + seg_b;
num_1 = seg_t_r + seg_b_r;
num_2 = seg_t   + seg_t_r + seg_m   + seg_b_l + seg_b;
num_3 = seg_t   + seg_t_r + seg_m   + seg_b_r + seg_b;
num_4 = seg_t_l + seg_t_r + seg_m   + seg_b_r;
num_5 = seg_t   + seg_t_l + seg_m   + seg_b_r + seg_b;
num_6 = seg_t   + seg_t_l + seg_m   + seg_b_l + seg_b_r + seg_b;
num_7 = seg_t   + seg_t_r + seg_b_r;
num_8 = seg_t   + seg_t_l + seg_t_r + seg_m   + seg_b_l + seg_b_r + seg_b;
num_9 = seg_t   + seg_t_l + seg_t_r + seg_m   + seg_b_r;

# Define the time
time_fake = (time + time_offset) % 86400;
is_finished = time_fake < grace_period;

time_diff = 86400 - time_fake;
time_disp = if(is_finished, 0, time_diff);
    # Hours (all, tens, units)
time_h   = floor( time_disp / 3600 );
time_h_1 = floor( time_h / 10 );
time_h_2 = ( time_h % 10 );
    # Minutes (all, tens, units)
time_m   = floor( time_disp / 60 % 60 );
time_m_1 = floor( time_m / 10 );
time_m_2 = ( time_m % 10 );
    # Seconds (all, tens, units)
time_s   = floor( time_disp % 60 );
time_s_1 = floor( time_s / 10 );
time_s_2 = ( time_s % 10 );
	# Milliseconds
time_d   = floor( ( time_fake % 1 ) * 10 )
	
v = 0;
# Hours -> Tens
v = if( time_h_1 == 0 & fake_z == 0, num_0, v );
v = if( time_h_1 == 1 & fake_z == 0, num_1, v );
v = if( time_h_1 == 2 & fake_z == 0, num_2, v );
v = if( time_h_1 == 3 & fake_z == 0, num_3, v );
v = if( time_h_1 == 4 & fake_z == 0, num_4, v );
v = if( time_h_1 == 5 & fake_z == 0, num_5, v );
v = if( time_h_1 == 6 & fake_z == 0, num_6, v );
v = if( time_h_1 == 7 & fake_z == 0, num_7, v );
v = if( time_h_1 == 8 & fake_z == 0, num_8, v );
v = if( time_h_1 == 9 & fake_z == 0, num_9, v );

# Hours -> Units
v = if( time_h_2 == 0 & fake_z == 1, num_0, v );
v = if( time_h_2 == 1 & fake_z == 1, num_1, v );
v = if( time_h_2 == 2 & fake_z == 1, num_2, v );
v = if( time_h_2 == 3 & fake_z == 1, num_3, v );
v = if( time_h_2 == 4 & fake_z == 1, num_4, v );
v = if( time_h_2 == 5 & fake_z == 1, num_5, v );
v = if( time_h_2 == 6 & fake_z == 1, num_6, v );
v = if( time_h_2 == 7 & fake_z == 1, num_7, v );
v = if( time_h_2 == 8 & fake_z == 1, num_8, v );
v = if( time_h_2 == 9 & fake_z == 1, num_9, v );

# Minutes -> Tens
v = if( time_m_1 == 0 & fake_z == 2, num_0, v );
v = if( time_m_1 == 1 & fake_z == 2, num_1, v );
v = if( time_m_1 == 2 & fake_z == 2, num_2, v );
v = if( time_m_1 == 3 & fake_z == 2, num_3, v );
v = if( time_m_1 == 4 & fake_z == 2, num_4, v );
v = if( time_m_1 == 5 & fake_z == 2, num_5, v );
v = if( time_m_1 == 6 & fake_z == 2, num_6, v );
v = if( time_m_1 == 7 & fake_z == 2, num_7, v );
v = if( time_m_1 == 8 & fake_z == 2, num_8, v );
v = if( time_m_1 == 9 & fake_z == 2, num_9, v );

# Minutes -> Units
v = if( time_m_2 == 0 & fake_z == 3, num_0, v );
v = if( time_m_2 == 1 & fake_z == 3, num_1, v );
v = if( time_m_2 == 2 & fake_z == 3, num_2, v );
v = if( time_m_2 == 3 & fake_z == 3, num_3, v );
v = if( time_m_2 == 4 & fake_z == 3, num_4, v );
v = if( time_m_2 == 5 & fake_z == 3, num_5, v );
v = if( time_m_2 == 6 & fake_z == 3, num_6, v );
v = if( time_m_2 == 7 & fake_z == 3, num_7, v );
v = if( time_m_2 == 8 & fake_z == 3, num_8, v );
v = if( time_m_2 == 9 & fake_z == 3, num_9, v );

# Minutes -> Tens
v = if( time_s_1 == 0 & fake_z == 4, num_0, v );
v = if( time_s_1 == 1 & fake_z == 4, num_1, v );
v = if( time_s_1 == 2 & fake_z == 4, num_2, v );
v = if( time_s_1 == 3 & fake_z == 4, num_3, v );
v = if( time_s_1 == 4 & fake_z == 4, num_4, v );
v = if( time_s_1 == 5 & fake_z == 4, num_5, v );
v = if( time_s_1 == 6 & fake_z == 4, num_6, v );
v = if( time_s_1 == 7 & fake_z == 4, num_7, v );
v = if( time_s_1 == 8 & fake_z == 4, num_8, v );
v = if( time_s_1 == 9 & fake_z == 4, num_9, v );

# Minutes -> Units
v = if( time_s_2 == 0 & fake_z == 5, num_0, v );
v = if( time_s_2 == 1 & fake_z == 5, num_1, v );
v = if( time_s_2 == 2 & fake_z == 5, num_2, v );
v = if( time_s_2 == 3 & fake_z == 5, num_3, v );
v = if( time_s_2 == 4 & fake_z == 5, num_4, v );
v = if( time_s_2 == 5 & fake_z == 5, num_5, v );
v = if( time_s_2 == 6 & fake_z == 5, num_6, v );
v = if( time_s_2 == 7 & fake_z == 5, num_7, v );
v = if( time_s_2 == 8 & fake_z == 5, num_8, v );
v = if( time_s_2 == 9 & fake_z == 5, num_9, v );

# Dots
v = if( time_d < 5 & fake_z == 6, seg_dot, v );

# Minus
v = if( fake_z == 7, seg_m, v );

# Flash when at 00:00:00
# v = if(is_finished, (time_d < 5) & v, v);

s = 1;
h = 0;

h = if( colour_type == 1, colour_block, h );
h = if( colour_type == 2, time*colour_speed, h );
h = if( colour_type == 3, time*colour_speed + x'*colour_stretch, h );
h = if( colour_type == 4, time*colour_speed + y'*colour_stretch, h );

#####
# Settings are at the top of this file
# You can quickly scroll to the top by holding PAGE UP
# Edit everything there!
#####

The second one:

Counts down to 00:00:00, then displays the text “Happy New Year!” for the duration of the grace_period, which is 4 hours by default. Just a warning with this one, it’s not the most efficient, so will impact FPS worse than the other one. I’ve left definitions for unused letters in the code in case anyone wants to mess with it.

This one also has 2 colour stages, one for when the countdown is active (colour_type), and one for when the Happy New Year text is displaying (colour_type_final). This way you can make the final text rainbow if you so desire by changing colour_type_final to 2, 3 or 4.

Reveal Code
# Happy New Year from BOT Dan
# Laser Projector Settings:
# - Shape: Rectangular Grid
# - Grid Size: 20 x 20
# - Colour: White

# Scale
var_scale = 1;

# Amount of pixels to move per second
var_speed = 20;

# The time (in seconds) from midnight to call midnight
var_time_target = 0;

# How long to display the end message (in seconds) (60 * 60 * 1 = 1hr)
var_grace_period = 60 * 60 * 4;

# Transparency of background lasers
var_transparency = 0.25;

# Amount of letters in (Happy new year!)
var_letters = 15;

# Amount of pixels between each letter
var_spacing = 1;

# Set to 1 to preview the final message
preview = 0;

# Colour Settings:
# - [1] Block Colour
# - [2] Rainbow - Full
# - [3] Rainbow - Horizontal
# - [4] Rainbow - Vertical
# Set this to one of the numbers above
colour_type = 1;
colour_type_final = 1;

# If using block colour, set your colour here (0-360)
colour_block = 0;
colour_block_final = 0;

# If using rainbow, change the cycle speed here
colour_speed = 100;
colour_speed_final = 100;

# If using rainbow, change the stretch of colour
colour_stretch = 5;
colour_stretch_final = 5;

############### CODE STARTS BELOW ###############
pixels_wide = 55;
char_size = 5 + var_spacing;
grace_period = if(preview, 60 * 60 * 24, var_grace_period);

# Make the display (pixels_widex7)
fake_x = floor( index / 7 );
fake_y = ( index % 7 );

# Place lasers in the middle of the view
x' = ( -fake_x + (pixels_wide/2) ) * var_scale;
y' = ( fake_y - (5/2) ) * var_scale;

# Scroll things
time_fake = (time - var_time_target) % 86400;
is_finished = time_fake < grace_period;

scroll_length = var_letters * char_size + pixels_wide;
scroll_pos = if(is_finished, pixels_wide - floor( time_fake * var_speed % scroll_length ), 1);

seg = floor((fake_x - scroll_pos) / char_size);
seg_x = (fake_x - scroll_pos) % char_size;

# Y values if masks
y1 = if( fake_y == 0, 1, 0 );
y2 = if( fake_y == 1, 1, 0 );
y3 = if( fake_y == 2, 1, 0 );
y4 = if( fake_y == 3, 1, 0 );
y5 = if( fake_y == 4, 1, 0 );
y6 = if( fake_y == 5, 1, 0 );
y7 = if( fake_y == 6, 1, 0 );

# X values mask
x1 = if( seg_x == 0, 1, 0);
x2 = if( seg_x == 1, 1, 0);
x3 = if( seg_x == 2, 1, 0);
x4 = if( seg_x == 3, 1, 0);
x5 = if( seg_x == 4, 1, 0);

# Letter [A]
letter_a = (x1 & (y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y1 + y5))
 | (x3 & (y1 + y5))
 | (x4 & (y1 + y5))
 | (x5 & (y2 + y3 + y4 + y5 + y6 + y7));

# Letter [B]
letter_b = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y1 + y4 + y7))
 | (x3 & (y1 + y4 + y7))
 | (x4 & (y1 + y4 + y7))
 | (x5 & (y2 + y3 + y5 + y6));

# Letter [C]
letter_c = (x1 & (y2 + y3 + y4 + y5 + y6))
 | (x2 & (y1 + y7))
 | (x3 & (y1 + y7))
 | (x4 & (y1 + y7))
 | (x5 & (y2 + y6));

# Letter [D]
letter_d = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y1 + y7))
 | (x3 & (y1 + y7))
 | (x4 & (y1 + y7))
 | (x5 & (y2 + y3 + y4 + y5 + y6));

# Letter [E]
letter_e = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y1 + y4 + y7))
 | (x3 & (y1 + y4 + y7))
 | (x4 & (y1 + y4 + y7))
 | (x5 & (y1 + y7));

# Letter [F]
letter_f = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y1 + y4))
 | (x3 & (y1 + y4))
 | (x4 & (y1 + y4))
 | (x5 & (y1));

# Letter [G]
letter_g = (x1 & (y2 + y3 + y4 + y5 + y6))
 | (x2 & (y1 + y7))
 | (x3 & (y1 + y5 + y7))
 | (x4 & (y1 + y5 + y7))
 | (x5 & (y2 + y5 + y6));

# Letter [H]
letter_h = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y4))
 | (x3 & (y4))
 | (x4 & (y4))
 | (x5 & (y1 + y2 + y3 + y4 + y5 + y6 + y7));

# Letter [I]
letter_i = (x1 & (0))
 | (x2 & (y1 + y7))
 | (x3 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x4 & (y1 + y7))
 | (x5 & (0));

# Letter [J];
letter_j = (x1 & (y5 + y6))
 | (x2 & (y7))
 | (x3 & (y7))
 | (x4 & (y7))
 | (x5 & (y1 + y2 + y3 + y4 + y5 + y6));

# Letter [K]
letter_k = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y4))
 | (x3 & (y3 + y5))
 | (x4 & (y2 + y6))
 | (x5 & (y1 + y7));

# Letter L
letter_l = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y7))
 | (x3 & (y7))
 | (x4 & (y7))
 | (x5 & (y7));

# Letter [M]
letter_m = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y2))
 | (x3 & (y3))
 | (x4 & (y2))
 | (x5 & (y1 + y2 + y3 + y4 + y5 + y6 + y7));

# Letter [N]
letter_n = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y3))
 | (x3 & (y4))
 | (x4 & (y5))
 | (x5 & (y1 + y2 + y3 + y4 + y5 + y6 + y7));

# Letter [O]
letter_o = (x1 & (y2 + y3 + y4 + y5 + y6))
 | (x2 & (y1 + y7))
 | (x3 & (y1 + y7))
 | (x4 & (y1 + y7))
 | (x5 & (y2 + y3 + y4 + y5 + y6));

# Letter [P]
letter_p = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y1 + y5))
 | (x3 & (y1 + y5))
 | (x4 & (y1 + y5))
 | (x5 & (y2 + y3 + y4));

# Letter [Q]
letter_q = (x1 & (y2 + y3 + y4 + y5 + y6))
 | (x2 & (y1 + y7))
 | (x3 & (y1 + y5 + y7))
 | (x4 & (y1 + y6 + y7))
 | (x5 & (y2 + y3 + y4 + y5 + y6 + y7));

# Letter [R]
letter_r = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y1 + y5))
 | (x3 & (y1 + y5))
 | (x4 & (y1 + y5))
 | (x5 & (y2 + y3 + y4 + y6 + y7));

# Letter [S]
letter_s = (x1 & (y2 + y3 + y6))
 | (x2 & (y1 + y4 + y7))
 | (x3 & (y1 + y4 + y7))
 | (x4 & (y1 + y4 + y7))
 | (x5 & (y2 + y5 + y6));

# Letter [T]
letter_t = (x1 & (y1))
 | (x2 & (y1))
 | (x3 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x4 & (y1))
 | (x5 & (y1));

# Letter [U]
letter_u = (x1 & (y1 + y2 + y3 + y4 + y5 + y6))
 | (x2 & (y7))
 | (x3 & (y7))
 | (x4 & (y7))
 | (x5 & (y1 + y2 + y3 + y4 + y5 + y6));

# Letter [V]
letter_v = (x1 & (y1 + y2 + y3 + y4 + y5))
 | (x2 & (y6))
 | (x3 & (y7))
 | (x4 & (y6))
 | (x5 & (y1 + y2 + y3 + y4 + y5));

# Letter [W]
letter_w = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y6))
 | (x3 & (y5))
 | (x4 & (y6))
 | (x5 & (y1 + y2 + y3 + y4 + y5 + y6 + y7));

# Letter [X]
letter_x = (x1 & (y1 + y2 + y6 + y7))
 | (x2 & (y3 + y5))
 | (x3 & (y4))
 | (x4 & (y3 + y5))
 | (x5 & (y1 + y2 + y6 + y7));

# Letter [Y]
letter_y = (x1 & (y1 + y2 + y3))
 | (x2 & (y4))
 | (x3 & (y5 + y6 + y7))
 | (x4 & (y4))
 | (x5 & (y1 + y2 + y3));

# Letter [Z]
letter_z = (x1 & (y1 + y6 + y7))
 | (x2 & (y1 + y5 + y7))
 | (x3 & (y1 + y4 + y7))
 | (x4 & (y1 + y3 + y7))
 | (x5 & (y1 + y2 + y7));

# Letter [0]
letter_0 = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y1 + y7))
 | (x3 & (y1 + y7))
 | (x4 & (y1 + y7))
 | (x5 & (y1 + y2 + y3 + y4 + y5 + y6 + y7));

# Letter [1]
letter_1 = (x1 & 0)
 | (x2 & (y2 + y7))
 | (x3 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x4 & y7)
 | (x5 & 0);

# Letter [2]
letter_2 = (x1 & (y1 + y4 + y5 + y6 + y7))
 | (x2 & (y1 + y4 + y7))
 | (x3 & (y1 + y4 + y7))
 | (x4 & (y1 + y4 + y7))
 | (x5 & (y1 + y2  +y3  +y4 + y7));

# Letter [3]
letter_3 = (x1 & (y1 + y7))
 | (x2 & (y1 + y4 + y7))
 | (x3 & (y1 + y4 + y7))
 | (x4 & (y1 + y4 + y7))
 | (x5 & (y1 + y2 + y3 +y4 + y5 + y6 + y7))

# Letter [4]
letter_4 = (x1 & (y1 + y2 + y3 + y4))
 | (x2 & (y4))
 | (x3 & (y4))
 | (x4 & (y4))
 | (x5 & (y1 + y2 + y3 + y4 + y5 + y6 + y7));

# Letter [5]
letter_5 = (x1 & (y1 + y2 + y3 + y4 + y7))
 | (x2 & (y1 + y4 + y7))
 | (x3 & (y1 + y4 + y7))
 | (x4 & (y1 + y4 + y7))
 | (x5 & (y1 + y4 + y5 + y6 + y7));

# Letter [6]
letter_6 = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y1 + y4 + y7))
 | (x3 & (y1 + y4 + y7))
 | (x4 & (y1 + y4 + y7))
 | (x5 & (y1 + y4 + y5 + y6 + y7));

# Letter [7]
letter_7 = (x1 & (y1))
 | (x2 & (y1))
 | (x3 & (y1 + y5 + y6 + y7))
 | (x4 & (y1 + y4))
 | (x5 & (y1 + y2 + y3));

# Letter [8]
letter_8 = (x1 & (y1 + y2 + y3 + y4 + y5 + y6 + y7))
 | (x2 & (y1 + y4 + y7))
 | (x3 & (y1 + y4 + y7))
 | (x4 & (y1 + y4 + y7))
 | (x5 & (y1 + y2 + y3 + y4 + y5 + y6 + y7));

# Letter [9]
letter_9 = (x1 & (y1 + y2 + y3 + y4 + y7))
 | (x2 & (y1 + y4 + y7))
 | (x3 & (y1 + y4 + y7))
 | (x4 & (y1 + y4 + y7))
 | (x5 & (y1 + y2 + y3 + y4 + y5 + y6 + y7));

# Letter [.]
letter_DOT = (x3 & y7);

# Letter [,]
letter_COMMA = (x2 & y7) | (x3 & (y5 + y6));

# Letter [']
letter_APOSTROPHE = x3 & (y1 + y2 + y3);

# Letter ["]
letter_SPEECH = (x2 | x4) & (y1 + y2 + y3);

# Letter [-]
letter_DASH = ((x1 | x2 | x3 | x4 | x5) & y4);

# Letter [(]
letter_LBRACKET = (x3 & (y2 + y3 + y4 + y5 + y6)) | (x4 & (y1 + y7))

# Letter [)]
letter_RBRACKET = (x2 & (y1 + y7)) | (x3 & (y2 + y3 + y4 + y5 + y6));

# Letter [$]
letter_UNIT = (x1 & (y1 + y2 + y3 + y4 + y5 + y6))
 | (x2 & (y7))
 | (x3 & (y2 + y4 + y7))
 | (x4 & (y1 + y2 + y3 + y4 + y5 + y6))
 | (x5 & (y2 + y4));

# Letter [:]
letter_COLON = (x2 | x3) & (y2 + y3 + y5 + y6);

# Letter [_]
letter_UNDERSCORE = ((x1 | x2 | x3 | x4 | x5) & y7);

# Letter [!]
letter_EXCLAMATION = x3 & (y1 + y2 + y3 + y4 + y5 + y7)

# Letter [?]
letter_QUESTION = (x1 & (y2))
 | (x2 & (y1))
 | (x3 & (y1 + y5 + y7))
 | (x4 & (y1 + y4))
 | (x5 & (y2 + y3));

# Letter [=]
letter_EQUALS = (x1 | x2 | x3 | x4 | x5) & (y3 + y5);

# Letter [+]
letter_PLUS = ((x1 | x2 | x4 | x5) & y4) | (x3 & (y2 + y3 + y4 + y5 + y6));

# Define the time
time_diff = 86400 - time_fake;
time_disp = if(is_finished, 0, time_diff);
    # Hours (all, tens, units)
time_h   = floor( time_disp / 3600 );
time_h_1 = floor( time_h / 10 );
time_h_2 = ( time_h % 10 );
    # Minutes (all, tens, units)
time_m   = floor( time_disp / 60 % 60 );
time_m_1 = floor( time_m / 10 );
time_m_2 = ( time_m % 10 );
    # Seconds (all, tens, units)
time_s   = floor( time_disp % 60 );
time_s_1 = floor( time_s / 10 );
time_s_2 = ( time_s % 10 );
	# Milliseconds
time_d   = floor( ( time_fake % 1 ) * 10 )

# Start rendering the timer
v = 0;

# Minus
v = if( seg == 0 & !is_finished, letter_dash, v);

# Hours -> Tens
v = if( time_h_1 == 0 & seg == 1 & !is_finished, letter_0, v );
v = if( time_h_1 == 1 & seg == 1 & !is_finished, letter_1, v );
v = if( time_h_1 == 2 & seg == 1 & !is_finished, letter_2, v );
v = if( time_h_1 == 3 & seg == 1 & !is_finished, letter_3, v );
v = if( time_h_1 == 4 & seg == 1 & !is_finished, letter_4, v );
v = if( time_h_1 == 5 & seg == 1 & !is_finished, letter_5, v );
v = if( time_h_1 == 6 & seg == 1 & !is_finished, letter_6, v );
v = if( time_h_1 == 7 & seg == 1 & !is_finished, letter_7, v );
v = if( time_h_1 == 8 & seg == 1 & !is_finished, letter_8, v );
v = if( time_h_1 == 9 & seg == 1 & !is_finished, letter_9, v );

# Hours -> Units
v = if( time_h_2 == 0 & seg == 2 & !is_finished, letter_0, v );
v = if( time_h_2 == 1 & seg == 2 & !is_finished, letter_1, v );
v = if( time_h_2 == 2 & seg == 2 & !is_finished, letter_2, v );
v = if( time_h_2 == 3 & seg == 2 & !is_finished, letter_3, v );
v = if( time_h_2 == 4 & seg == 2 & !is_finished, letter_4, v );
v = if( time_h_2 == 5 & seg == 2 & !is_finished, letter_5, v );
v = if( time_h_2 == 6 & seg == 2 & !is_finished, letter_6, v );
v = if( time_h_2 == 7 & seg == 2 & !is_finished, letter_7, v );
v = if( time_h_2 == 8 & seg == 2 & !is_finished, letter_8, v );
v = if( time_h_2 == 9 & seg == 2 & !is_finished, letter_9, v );

# First Colon
v = if( time_d < 5 & seg == 3 & !is_finished, letter_colon, v );

# Minutes -> Tens
v = if( time_m_1 == 0 & seg == 4 & !is_finished, letter_0, v );
v = if( time_m_1 == 1 & seg == 4 & !is_finished, letter_1, v );
v = if( time_m_1 == 2 & seg == 4 & !is_finished, letter_2, v );
v = if( time_m_1 == 3 & seg == 4 & !is_finished, letter_3, v );
v = if( time_m_1 == 4 & seg == 4 & !is_finished, letter_4, v );
v = if( time_m_1 == 5 & seg == 4 & !is_finished, letter_5, v );
v = if( time_m_1 == 6 & seg == 4 & !is_finished, letter_6, v );
v = if( time_m_1 == 7 & seg == 4 & !is_finished, letter_7, v );
v = if( time_m_1 == 8 & seg == 4 & !is_finished, letter_8, v );
v = if( time_m_1 == 9 & seg == 4 & !is_finished, letter_9, v );

# Minutes -> Units
v = if( time_m_2 == 0 & seg == 5 & !is_finished, letter_0, v );
v = if( time_m_2 == 1 & seg == 5 & !is_finished, letter_1, v );
v = if( time_m_2 == 2 & seg == 5 & !is_finished, letter_2, v );
v = if( time_m_2 == 3 & seg == 5 & !is_finished, letter_3, v );
v = if( time_m_2 == 4 & seg == 5 & !is_finished, letter_4, v );
v = if( time_m_2 == 5 & seg == 5 & !is_finished, letter_5, v );
v = if( time_m_2 == 6 & seg == 5 & !is_finished, letter_6, v );
v = if( time_m_2 == 7 & seg == 5 & !is_finished, letter_7, v );
v = if( time_m_2 == 8 & seg == 5 & !is_finished, letter_8, v );
v = if( time_m_2 == 9 & seg == 5 & !is_finished, letter_9, v );

# Second Colon
v = if( time_d < 5 & seg == 6 & !is_finished, letter_colon, v );

# Seconds -> Tens
v = if( time_s_1 == 0 & seg == 7 & !is_finished, letter_0, v );
v = if( time_s_1 == 1 & seg == 7 & !is_finished, letter_1, v );
v = if( time_s_1 == 2 & seg == 7 & !is_finished, letter_2, v );
v = if( time_s_1 == 3 & seg == 7 & !is_finished, letter_3, v );
v = if( time_s_1 == 4 & seg == 7 & !is_finished, letter_4, v );
v = if( time_s_1 == 5 & seg == 7 & !is_finished, letter_5, v );
v = if( time_s_1 == 6 & seg == 7 & !is_finished, letter_6, v );
v = if( time_s_1 == 7 & seg == 7 & !is_finished, letter_7, v );
v = if( time_s_1 == 8 & seg == 7 & !is_finished, letter_8, v );
v = if( time_s_1 == 9 & seg == 7 & !is_finished, letter_9, v );

# Seconds -> Units
v = if( time_s_2 == 0 & seg == 8 & !is_finished, letter_0, v );
v = if( time_s_2 == 1 & seg == 8 & !is_finished, letter_1, v );
v = if( time_s_2 == 2 & seg == 8 & !is_finished, letter_2, v );
v = if( time_s_2 == 3 & seg == 8 & !is_finished, letter_3, v );
v = if( time_s_2 == 4 & seg == 8 & !is_finished, letter_4, v );
v = if( time_s_2 == 5 & seg == 8 & !is_finished, letter_5, v );
v = if( time_s_2 == 6 & seg == 8 & !is_finished, letter_6, v );
v = if( time_s_2 == 7 & seg == 8 & !is_finished, letter_7, v );
v = if( time_s_2 == 8 & seg == 8 & !is_finished, letter_8, v );
v = if( time_s_2 == 9 & seg == 8 & !is_finished, letter_9, v );

# Happy new year
v = if( seg == 0 & is_finished, letter_h, v );
v = if( seg == 1 & is_finished, letter_a, v );
v = if( seg == 2 & is_finished, letter_p, v );
v = if( seg == 3 & is_finished, letter_p, v );
v = if( seg == 4 & is_finished, letter_y, v );

v = if( seg == 6 & is_finished, letter_n, v );
v = if( seg == 7 & is_finished, letter_e, v );
v = if( seg == 8 & is_finished, letter_w, v );

v = if( seg == 10 & is_finished, letter_y, v );
v = if( seg == 11 & is_finished, letter_e, v );
v = if( seg == 12 & is_finished, letter_a, v );
v = if( seg == 13 & is_finished, letter_r, v );
v = if( seg == 14 & is_finished, letter_EXCLAMATION, v );

# Do transparency
v = if( v == 0, var_transparency, v );

# Hide excess pixels
v = if( fake_x >= pixels_wide, 0, v );

# Do colour changes
s = 1;
h = 0;

h = if( !is_finished & colour_type == 1, colour_block, h );
h = if( !is_finished & colour_type == 2, time*colour_speed, h );
h = if( !is_finished & colour_type == 3, time*colour_speed + x'*colour_stretch, h );
h = if( !is_finished & colour_type == 4, time*colour_speed + y'*colour_stretch, h );

h = if( is_finished & colour_type_final == 1, colour_block_final, h );
h = if( is_finished & colour_type_final == 2, time*colour_speed_final, h );
h = if( is_finished & colour_type_final == 3, time*colour_speed_final + x'*colour_stretch_final, h );
h = if( is_finished & colour_type_final == 4, time*colour_speed_final + y'*colour_stretch_final, h );

#####
# Settings are at the top of this file
# You can quickly scroll to the top by holding PAGE UP
# Edit everything there!
#####

Suggestions

If you have any suggestions or would like a version with different “Happy New Year!” text, let me know and I can look into it.

19 Likes

i’ve been patiently awaiting your return, glad to see you back again!

3 Likes