Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework the matchmaker lobby (autolobby) #6479

Merged
merged 85 commits into from
Nov 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
8bf0529
Update annotations
Garanas Oct 15, 2024
914a3d9
Create a standalone and efficient map preview
Garanas Oct 15, 2024
6a535f3
Initial setup with a working preview
Garanas Oct 17, 2024
5fb02fc
First working setup that actually launches into the game
Garanas Oct 17, 2024
beedc76
Separate file for the controller
Garanas Oct 17, 2024
6924eca
Add documentation
Garanas Oct 18, 2024
2c662e0
Remove test function
Garanas Oct 18, 2024
417eb09
Remove old copyright statement
Garanas Oct 18, 2024
320f9f4
Add documentation
Garanas Oct 18, 2024
5473f88
Document behavior of GpgNetSend
Garanas Oct 18, 2024
10a49a2
Add remaining messages to the server
Garanas Oct 18, 2024
6c3c65a
Remove the old autolobby classes module
Garanas Oct 18, 2024
24a7aa4
Add a connection matrix to visualize the status quo
Garanas Oct 19, 2024
ce10a6b
Check support for up to 8 players
Garanas Oct 19, 2024
2abdc11
Use `~=` instead of `not`
Garanas Oct 19, 2024
9607e7e
Remove the wait for hot reload
Garanas Oct 19, 2024
e57b4e8
Make use of `ReusedLayoutFor`
Garanas Oct 19, 2024
a4f4c09
Clean up code
Garanas Oct 19, 2024
7d2d564
Rework messages
Garanas Oct 19, 2024
d1da9f4
Better document the use of the peer identifier
Garanas Oct 19, 2024
5be5fff
Add support for player colors based on the start position.
Garanas Oct 19, 2024
4d00504
Add a comment
Garanas Oct 19, 2024
fbe4183
Introduce a mapping from the peerId to an index
Garanas Oct 19, 2024
d41177b
Add documentation
Garanas Oct 19, 2024
45a5747
Fix prefetch not working properly
Garanas Oct 19, 2024
fb26d78
Introduce a delayed-joining of the lobby
Garanas Oct 19, 2024
1be791b
Improve management of peer indices
Garanas Oct 20, 2024
dd2613e
Add an initial delay before we populate the connection matrix
Garanas Oct 20, 2024
b67ba7e
Fix for peer to index functionality
Garanas Oct 20, 2024
10877ea
Keep track of the lobby creation/hosting/joining parameters
Garanas Oct 20, 2024
2ca02b3
Move GpgNetSend statement to the controller
Garanas Oct 20, 2024
9d86ee4
Create rejoin functionality
Garanas Oct 20, 2024
f5d430a
Always blip the interface when a message is received
Garanas Oct 20, 2024
07ee763
Do not add the interface to the trashbag of the controller
Garanas Oct 20, 2024
6c865fa
Remove reload testing code
Garanas Oct 20, 2024
19a3fa7
Make it crash-happy for 4z0t
Garanas Oct 20, 2024
5e7b21a
expand the matrix
Garanas Oct 20, 2024
e9670d3
Introduce sharing of local launch status
Garanas Oct 22, 2024
a64bba3
Set depth of `reprsl` to 2 by default
Garanas Oct 22, 2024
360fe25
Rename to 'Ready' instead of 'Ready for launch'
Garanas Oct 22, 2024
5823e21
Setup with working reconnect
Garanas Oct 22, 2024
0acd515
Remove LOG statement
Garanas Oct 22, 2024
e3ca5a9
Various tweaks all over
Garanas Oct 22, 2024
4350d0f
Rewrite test logic
Garanas Oct 22, 2024
fa733a9
Fix annotation issues
Garanas Oct 22, 2024
1482163
Reduce time for rejoin to kick in
Garanas Oct 22, 2024
58cf87b
Reduce the update frequency of the status message
Garanas Oct 23, 2024
7259a1f
Improve documentation of server communication
Garanas Oct 25, 2024
4226f96
Improve documentation
Garanas Oct 25, 2024
2e80516
Re-introduce sending player options to the server
Garanas Oct 25, 2024
879f8a1
Extend launch status messages
Garanas Oct 25, 2024
19bff39
Always log the message we send to the server
Garanas Oct 25, 2024
61a3d7d
Simplify the mapping of a peerId to an index for the UI
Garanas Oct 26, 2024
8c4ce67
Remove code that is not used
Garanas Oct 26, 2024
fa9a3d6
Add message validation to perform basic checks of the format of a mes…
Garanas Oct 26, 2024
24fdbd3
Fix functions not being pure
Garanas Oct 26, 2024
f043921
Cleaning up of logic
Garanas Oct 26, 2024
0e1edb5
Undo changes to the launch script
Garanas Oct 26, 2024
5e0547d
Improve annotations
Garanas Oct 26, 2024
d302a3e
Add annotations for scenario save file
Garanas Oct 26, 2024
e42abe8
Add documentation
Garanas Oct 26, 2024
38844a9
Merge branch 'develop' into feature/autolobby
Garanas Oct 27, 2024
53d8a5a
Apply the map utils pull request
Garanas Oct 27, 2024
179ad59
Fix issue with hot reload
Garanas Oct 27, 2024
bfa9d1d
Process feedback of Askaholic
Garanas Oct 27, 2024
c79983e
Send the disconnect message to the server
Garanas Oct 27, 2024
bd8f664
Fix a typo
Garanas Oct 27, 2024
232660e
Improve documentation
Garanas Oct 27, 2024
f621a31
Remove debug code
Garanas Oct 27, 2024
750e51e
Fix typo
Garanas Oct 27, 2024
1922ac6
Show what row/column is of the local client in connection matrix
Garanas Oct 27, 2024
d36e0a7
Add faction-spawn locations to map preview
Garanas Oct 30, 2024
788db99
Fix issue with hot reload
Garanas Oct 31, 2024
577f2e1
Document `SetColorMask`
Garanas Oct 31, 2024
70d37a5
Improve annotations of `StringSplit`
Garanas Oct 31, 2024
bc3be44
Add additional utility functions
Garanas Oct 31, 2024
92ab7f4
Setup for a panel with brackets
Garanas Oct 31, 2024
8df32fb
Revert "Setup for a panel with brackets"
Garanas Nov 19, 2024
523072b
Add brackets
Garanas Nov 19, 2024
e991a71
Disable the rejoin functionality
Garanas Nov 19, 2024
35d23f7
Remove debug code to not launch the game
Garanas Nov 19, 2024
cca7d0b
Removing logging and the like
Garanas Nov 19, 2024
4a1da1e
Merge branch 'develop' into feature/autolobby
Garanas Nov 19, 2024
b62a26a
Remove debugging code
Garanas Nov 19, 2024
10a916d
Add a snippet
Garanas Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix annotation issues
Garanas committed Oct 22, 2024
commit fa733a96021c28b58898c817d90e3d411330bd54
2 changes: 1 addition & 1 deletion lua/maui/bitmap.lua
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ local ScaleNumber = import("/lua/maui/layouthelpers.lua").ScaleNumber
Bitmap = ClassUI(moho.bitmap_methods, Control) {
---@param self Bitmap
---@param parent Control
---@param filename Lazy<FileName>
---@param filename? Lazy<FileName>
---@param debugname? string
__init = function(self, parent, filename, debugname)
InternalCreateBitmap(self, parent)
2 changes: 1 addition & 1 deletion lua/ui/lobby/autolobby/AutolobbyController.lua
Original file line number Diff line number Diff line change
@@ -166,7 +166,7 @@ AutolobbyCommunications = Class(MohoLobbyMethods, DebugComponent) {

-- retrieve team and start spot
info.Team = tonumber(GetCommandLineArg("/team", 1)[1])
info.StartSpot = tonumber(GetCommandLineArg("/startspot", 1)[1])
info.StartSpot = tonumber(GetCommandLineArg("/startspot", 1)[1]) or -1 -- TODO

-- determine army color based on start location
info.PlayerColor = GameColors.MapToWarmCold(info.StartSpot)
3 changes: 2 additions & 1 deletion lua/ui/lobby/autolobby/AutolobbyInterface.lua
Original file line number Diff line number Diff line change
@@ -68,7 +68,8 @@ local AutolobbyInterface = Class(Group) {
PlayerCount = playerCount
}

self.Background = UIUtil.CreateBitmap(self, self.BackgroundTextures[math.random(1, 5)])
local backgroundTexture = self.BackgroundTextures[math.random(1, 5)] --[[@as FileName]]
self.Background = UIUtil.CreateBitmap(self, backgroundTexture)
self.Preview = AutolobbyMapPreview.GetInstance(self)
self.ConnectionMatrix = AutolobbyConnectionMatrix.Create(self, playerCount) -- TODO: determine this number dynamically
end,