A team game with an emphasis on movement (with no shooting), inspired by Overwatch and Zineth
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
2.9 KiB

[WIP] Split up lobby -> menu, lobby, custom_game lobby.gd had gotten big, bloated, ugly, and hard to read. It needed a refactor. The first thing I did is split up the *GUI* into the logical steps it should be. So the new flow is: - Start the game - Click "Quick Play" - Matchmaking begins on my dedicated server - Start the game - Click "Custom Game" - *Only now* am I presented with server / client options - Start the game - Click "Singleplayer" - Singleplayer NOW, and only now, and NO MATTER WHAT PATH I TAKE, I am taken to the *lobby*, which now is where I: - Choose my name - Choose hero - See list of players - Get my team assigned - Anything else that I might like to put in The point here is that this has *nothing* to do with handshaking / matchmaking / etc! This is just part of the game! At this point I have *already been connected* to the server. I've already been aquainted with my other players. The game has begun. I put the things that don't belong in any of these flows in networking.gd, a sort of model-view sorta thing. All of these flows use some sort of networking thing like `init_server` that tbh should be *completely* abstracted from the UI. It's totally a WIP!!! Above is the IDEA, but below is what I've actually *done*: - Made the scenes, made a passable UI for each one that at least indicates ~what they'll do - Made the corresponding scripts, and split up the lobby script into ABOUT where I think it'll end up, but no promises It still errors all over the place, and it's nowhere near properly organized. PLUS, I'd also like to rewrite a lot of the code / rename things as part of the initial refactor goal of making me able to actually think about networking.
7 years ago
  1. [gd_scene load_steps=5 format=2]
  2. [ext_resource path="res://assets/theme.tres" type="Theme" id=1]
  3. [ext_resource path="res://scripts/menu.gd" type="Script" id=2]
  4. [sub_resource type="DynamicFontData" id=1]
  5. font_path = "res://assets/DejaVuSansMono.ttf"
  6. [sub_resource type="DynamicFont" id=2]
  7. size = 30
  8. use_mipmaps = false
  9. use_filter = false
  10. font_data = SubResource( 1 )
  11. [node name="Menu" type="Control"]
  12. anchor_left = 0.0
  13. anchor_top = 0.0
  14. anchor_right = 0.0
  15. anchor_bottom = 0.0
  16. margin_right = 1024.0
  17. margin_bottom = 600.0
  18. rect_pivot_offset = Vector2( 0, 0 )
  19. mouse_filter = 0
  20. mouse_default_cursor_shape = 0
  21. size_flags_horizontal = 1
  22. size_flags_vertical = 1
  23. theme = ExtResource( 1 )
  24. script = ExtResource( 2 )
  25. [node name="Title" type="Label" parent="." index="0"]
  26. anchor_left = 0.0
  27. anchor_top = 0.0
  28. anchor_right = 0.0
  29. anchor_bottom = 0.0
  30. margin_left = 60.0
  31. margin_top = 50.0
  32. margin_right = 248.0
  33. margin_bottom = 90.0
  34. rect_pivot_offset = Vector2( 0, 0 )
  35. mouse_filter = 2
  36. mouse_default_cursor_shape = 0
  37. size_flags_horizontal = 1
  38. size_flags_vertical = 4
  39. custom_fonts/font = SubResource( 2 )
  40. text = "VANAGLORIA"
  41. percent_visible = 1.0
  42. lines_skipped = 0
  43. max_lines_visible = -1
  44. [node name="Center" type="Control" parent="." index="1"]
  45. anchor_left = 0.5
  46. anchor_top = 0.5
  47. anchor_right = 0.5
  48. anchor_bottom = 0.5
  49. margin_left = -20.0
  50. margin_top = -20.0
  51. margin_right = 20.0
  52. margin_bottom = 20.0
  53. rect_pivot_offset = Vector2( 0, 0 )
  54. mouse_filter = 0
  55. mouse_default_cursor_shape = 0
  56. size_flags_horizontal = 1
  57. size_flags_vertical = 1
  58. [node name="Play" type="Button" parent="Center" index="0"]
  59. anchor_left = 0.0
  60. anchor_top = 0.0
  61. anchor_right = 0.0
  62. anchor_bottom = 0.0
  63. margin_left = -250.0
  64. margin_top = -70.0
  65. margin_right = 298.0
  66. margin_bottom = -10.0
  67. rect_pivot_offset = Vector2( 0, 0 )
  68. focus_mode = 2
  69. mouse_filter = 0
  70. mouse_default_cursor_shape = 0
  71. size_flags_horizontal = 1
  72. size_flags_vertical = 1
  73. toggle_mode = false
  74. enabled_focus_mode = 2
  75. shortcut = null
  76. group = null
  77. text = "Quick Play"
  78. flat = false
  79. align = 1
  80. [node name="CustomGame" type="Button" parent="Center" index="1"]
  81. anchor_left = 0.0
  82. anchor_top = 0.0
  83. anchor_right = 0.0
  84. anchor_bottom = 0.0
  85. margin_left = -252.0
  86. margin_top = 14.0
  87. margin_right = 300.0
  88. margin_bottom = 75.0
  89. rect_pivot_offset = Vector2( 0, 0 )
  90. focus_mode = 2
  91. mouse_filter = 0
  92. mouse_default_cursor_shape = 0
  93. size_flags_horizontal = 1
  94. size_flags_vertical = 1
  95. toggle_mode = false
  96. enabled_focus_mode = 2
  97. shortcut = null
  98. group = null
  99. text = "Custom Game"
  100. flat = false
  101. align = 1
  102. [node name="Singleplayer" type="Button" parent="Center" index="2"]
  103. anchor_left = 0.0
  104. anchor_top = 0.0
  105. anchor_right = 0.0
  106. anchor_bottom = 0.0
  107. margin_left = -251.0
  108. margin_top = 104.0
  109. margin_right = 299.0
  110. margin_bottom = 170.0
  111. rect_pivot_offset = Vector2( 0, 0 )
  112. focus_mode = 2
  113. mouse_filter = 0
  114. mouse_default_cursor_shape = 0
  115. size_flags_horizontal = 1
  116. size_flags_vertical = 1
  117. toggle_mode = false
  118. enabled_focus_mode = 2
  119. shortcut = null
  120. group = null
  121. text = "Singleplayer"
  122. flat = false
  123. align = 1