Housekeeping

This commit is contained in:
Luke Hubmayer-Werner 2021-01-09 00:28:56 +10:30
parent 73c774cc73
commit f588a85feb
2 changed files with 12 additions and 26 deletions

View File

@ -22,14 +22,15 @@ shader_param/num_receptors = 8
shader_param/receptor_offset = 0.392699
shader_param/line_color = Color( 0, 0, 1, 1 )
shader_param/dot_color = Color( 0, 0, 1, 1 )
shader_param/shadow_color = Color( 1, 1, 1, 0.568627 )
shader_param/shadow_color = Color( 0, 0, 0, 0.568627 )
shader_param/line_thickness = 0.00434783
shader_param/dot_radius = 0.026087
shader_param/shadow_thickness = 0.0173913
shader_param/px = 0.00108696
shader_param/px2 = 0.00217391
shader_param/alpha = 1.0
[sub_resource type="ArrayMesh" id=6]
[sub_resource type="ArrayMesh" id=2]
surfaces/0 = {
"aabb": AABB( -481.834, -481.834, 0, 963.667, 963.667, 0 ),
"array_data": PoolByteArray( 0, 0, 220, 67, 0, 0, 0, 0, 166, 59, 0, 0, 177, 234, 240, 67, 0, 0, 0, 0, 48, 60, 0, 0, 95, 168, 216, 67, 118, 207, 152, 66, 137, 59, 80, 49, 183, 65, 237, 67, 202, 86, 167, 66, 32, 60, 210, 49, 125, 187, 206, 67, 38, 125, 22, 67, 48, 59, 60, 53, 64, 99, 226, 67, 249, 203, 36, 67, 223, 59, 187, 53, 141, 134, 190, 67, 0, 0, 92, 67, 160, 58, 166, 55, 217, 163, 208, 67, 177, 234, 112, 67, 65, 59, 48, 56, 159, 135, 168, 67, 204, 105, 141, 67, 220, 57, 235, 56, 142, 141, 184, 67, 186, 219, 154, 67, 107, 58, 98, 57, 204, 105, 141, 67, 159, 135, 168, 67, 235, 56, 220, 57, 186, 219, 154, 67, 142, 141, 184, 67, 98, 57, 107, 58, 0, 0, 92, 67, 141, 134, 190, 67, 166, 55, 160, 58, 177, 234, 112, 67, 217, 163, 208, 67, 48, 56, 65, 59, 38, 125, 22, 67, 125, 187, 206, 67, 60, 53, 48, 59, 249, 203, 36, 67, 64, 99, 226, 67, 187, 53, 223, 59, 118, 207, 152, 66, 95, 168, 216, 67, 80, 49, 137, 59, 202, 86, 167, 66, 183, 65, 237, 67, 210, 49, 32, 60, 141, 172, 242, 40, 0, 0, 220, 67, 0, 0, 166, 59, 143, 223, 4, 41, 177, 234, 240, 67, 0, 0, 48, 60, 118, 207, 152, 194, 95, 168, 216, 67, 80, 177, 137, 59, 202, 86, 167, 194, 183, 65, 237, 67, 210, 177, 32, 60, 38, 125, 22, 195, 125, 187, 206, 67, 60, 181, 48, 59, 249, 203, 36, 195, 64, 99, 226, 67, 187, 181, 223, 59, 0, 0, 92, 195, 141, 134, 190, 67, 166, 183, 160, 58, 177, 234, 112, 195, 217, 163, 208, 67, 48, 184, 65, 59, 204, 105, 141, 195, 159, 135, 168, 67, 235, 184, 220, 57, 186, 219, 154, 195, 142, 141, 184, 67, 98, 185, 107, 58, 159, 135, 168, 195, 204, 105, 141, 67, 220, 185, 235, 56, 142, 141, 184, 195, 186, 219, 154, 67, 107, 186, 98, 57, 141, 134, 190, 195, 0, 0, 92, 67, 160, 186, 166, 55, 217, 163, 208, 195, 177, 234, 112, 67, 65, 187, 48, 56, 125, 187, 206, 195, 38, 125, 22, 67, 48, 187, 60, 53, 64, 99, 226, 195, 249, 203, 36, 67, 223, 187, 187, 53, 95, 168, 216, 195, 118, 207, 152, 66, 137, 187, 80, 49, 183, 65, 237, 195, 202, 86, 167, 66, 32, 188, 210, 49, 0, 0, 220, 195, 141, 172, 114, 41, 166, 187, 0, 0, 177, 234, 240, 195, 143, 223, 132, 41, 48, 188, 0, 0, 95, 168, 216, 195, 118, 207, 152, 194, 137, 187, 80, 177, 183, 65, 237, 195, 202, 86, 167, 194, 32, 188, 210, 177, 125, 187, 206, 195, 38, 125, 22, 195, 48, 187, 60, 181, 64, 99, 226, 195, 249, 203, 36, 195, 223, 187, 187, 181, 141, 134, 190, 195, 0, 0, 92, 195, 160, 186, 166, 183, 217, 163, 208, 195, 177, 234, 112, 195, 65, 187, 48, 184, 159, 135, 168, 195, 204, 105, 141, 195, 220, 185, 235, 184, 142, 141, 184, 195, 186, 219, 154, 195, 107, 186, 98, 185, 204, 105, 141, 195, 159, 135, 168, 195, 235, 184, 220, 185, 186, 219, 154, 195, 142, 141, 184, 195, 98, 185, 107, 186, 0, 0, 92, 195, 141, 134, 190, 195, 166, 183, 160, 186, 177, 234, 112, 195, 217, 163, 208, 195, 48, 184, 65, 187, 38, 125, 22, 195, 125, 187, 206, 195, 60, 181, 48, 187, 249, 203, 36, 195, 64, 99, 226, 195, 187, 181, 223, 187, 118, 207, 152, 194, 95, 168, 216, 195, 80, 177, 137, 187, 202, 86, 167, 194, 183, 65, 237, 195, 210, 177, 32, 188, 106, 1, 182, 169, 0, 0, 220, 195, 0, 0, 166, 187, 87, 79, 199, 169, 177, 234, 240, 195, 0, 0, 48, 188, 118, 207, 152, 66, 95, 168, 216, 195, 80, 49, 137, 187, 202, 86, 167, 66, 183, 65, 237, 195, 210, 49, 32, 188, 38, 125, 22, 67, 125, 187, 206, 195, 60, 53, 48, 187, 249, 203, 36, 67, 64, 99, 226, 195, 187, 53, 223, 187, 0, 0, 92, 67, 141, 134, 190, 195, 166, 55, 160, 186, 177, 234, 112, 67, 217, 163, 208, 195, 48, 56, 65, 187, 204, 105, 141, 67, 159, 135, 168, 195, 235, 56, 220, 185, 186, 219, 154, 67, 142, 141, 184, 195, 98, 57, 107, 186, 159, 135, 168, 67, 204, 105, 141, 195, 220, 57, 235, 184, 142, 141, 184, 67, 186, 219, 154, 195, 107, 58, 98, 185, 141, 134, 190, 67, 0, 0, 92, 195, 160, 58, 166, 183, 217, 163, 208, 67, 177, 234, 112, 195, 65, 59, 48, 184, 125, 187, 206, 67, 38, 125, 22, 195, 48, 59, 60, 181, 64, 99, 226, 67, 249, 203, 36, 195, 223, 59, 187, 181, 95, 168, 216, 67, 118, 207, 152, 194, 137, 59, 80, 177, 183, 65, 237, 67, 202, 86, 167, 194, 32, 60, 210, 177, 0, 0, 220, 67, 0, 0, 0, 0, 166, 59, 0, 0, 177, 234, 240, 67, 0, 0, 0, 0, 48, 60, 0, 0 ),
@ -99,9 +100,8 @@ script = ExtResource( 3 )
[node name="Receptors" type="MeshInstance2D" parent="."]
material = SubResource( 1 )
mesh = SubResource( 6 )
mesh = SubResource( 2 )
script = ExtResource( 5 )
shadow_color = Color( 1, 1, 1, 0.568627 )
[node name="Tween" type="Tween" parent="Receptors"]

View File

@ -434,7 +434,7 @@ func _input(event):
else:
return
for i in range(len(active_slide_trails)-1, -1, -1):
for i in range(len(active_slide_trails)-1, -1, -1): # Iterate backwards as we are potentially deleting entries
var note = active_slide_trails[i]
var center = note.get_position(note.progress)
var center2 = note.get_position(min(note.progress+0.06, 1.0))
@ -457,20 +457,6 @@ func set_time(seconds: float):
time = seconds
t = game_time(time)
func make_noteline_mesh_old() -> ArrayMesh:
var rec_scale1 = (float(screen_height)/float(GameTheme.receptor_ring_radius))*0.5
var uv_array_playfield := PoolVector2Array([Vector2(-1.0, -1.0)*rec_scale1, Vector2(-1.0, 1.0)*rec_scale1, Vector2(1.0, -1.0)*rec_scale1, Vector2(1.0, 1.0)*rec_scale1])
var vertex_array_playfield := PoolVector2Array([
Vector2(-screen_height/2.0, screen_height/2.0), Vector2(-screen_height/2.0, -screen_height/2.0),
Vector2(screen_height/2.0, screen_height/2.0), Vector2(screen_height/2.0, -screen_height/2.0)])
var mesh_playfield := ArrayMesh.new()
var arrays = []
arrays.resize(Mesh.ARRAY_MAX)
arrays[Mesh.ARRAY_VERTEX] = vertex_array_playfield
arrays[Mesh.ARRAY_TEX_UV] = uv_array_playfield
mesh_playfield.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLE_STRIP, arrays)
return mesh_playfield
func make_noteline_mesh(vertices := 32) -> ArrayMesh:
assert(vertices > 3)
var rec_scale1 = (float(screen_height)/float(GameTheme.receptor_ring_radius))*0.5
@ -501,7 +487,6 @@ func _ready():
notelines.material.set_shader_param('bps', bpm/60.0)
notelines.material.set_shader_param('array_postmul', arr_div)
noteline_array_image.create(16, 16, false, Image.FORMAT_RGBF)
noteline_array_image.fill(Color(0.0, 0.0, 0.0))
# Format: first 15 rows are for hit events, last row is for releases only (no ring glow)
@ -511,6 +496,12 @@ func _ready():
InputHandler.connect('button_released', self, 'button_released')
InputHandler.connect('touchbutton_released', self, 'touchbutton_released')
meshinstance.material.set_shader_param('star_color', GameTheme.COLOR_STAR)
meshinstance.material.set_shader_param('held_color', GameTheme.COLOR_HOLD_HELD)
meshinstance.material.set_shader_param('bps', bpm/60.0)
meshinstance.material.set_shader_param('screen_size', get_viewport().get_size())
meshinstance.set_texture(GameTheme.tex_notes)
func load_track(song_key: String, difficulty_key: String):
self.song_key = song_key
set_time(-3.0)
@ -535,18 +526,13 @@ func load_track(song_key: String, difficulty_key: String):
if note.type == Note.NOTE_SLIDE:
slide_trail_meshes[note.slide_id] = make_slide_trail_mesh(note)
meshinstance.material.set_shader_param('star_color', GameTheme.COLOR_STAR)
meshinstance.material.set_shader_param('held_color', GameTheme.COLOR_HOLD_HELD)
meshinstance.material.set_shader_param('bps', bpm/60.0)
meshinstance.material.set_shader_param('screen_size', get_viewport().get_size())
meshinstance.set_texture(GameTheme.tex_notes)
initialise_scores() # Remove old score
func stop():
MusicPlayer.stop()
VideoPlayer.stop()
# running = false
next_note_to_load = 1000000 # Hacky but whatever
next_note_to_load = 10000000 # Hacky but whatever
func intro_click():
SFXPlayer.play(SFXPlayer.Type.NON_POSITIONAL, self, GameTheme.snd_count_in)