From 102f46e34ab68b1fb3fec6832c9a332557766039 Mon Sep 17 00:00:00 2001 From: milesthenerd Date: Wed, 6 Jan 2021 13:20:57 -0600 Subject: [PATCH 1/9] Readme update (again) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0ed9b09..fed28ed 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,13 @@ ## Co-op Changes The source code here has the same requirements as the original repo in order for it to work. Only the code and my changes have been included. Also, the string compression scripts are by Homunculus: https://marketplace.yoyogames.com/assets/4560/strict . + Currently syncs all items, metroids, events, and power-ups. + Currently, pressing F1 will make an attempt to connect to the server. F2 will disconnect from the server. DO NOT try to connect on the menu because the game will crash as the script that shows the connect/disconnect prompt can not run until you are in-game. + Put the ip of the server you want to connect to into the ipaddress.txt. The server operates on port 64198 and cannot be changed at the moment. + The server can be found here: https://github.com/lassiterm/AM2R-Server ## What is this? From 8cc5918275b2362227f325d49dcec6c5227ec84c Mon Sep 17 00:00:00 2001 From: milesthenerd Date: Wed, 6 Jan 2021 13:35:13 -0600 Subject: [PATCH 2/9] Update to oClient to comment out F3 code --- README.md | 2 +- objects/oClient.object.gmx | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fed28ed..78e0b9d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # AM2R-Community-Updates ## Co-op Changes -The source code here has the same requirements as the original repo in order for it to work. Only the code and my changes have been included. Also, the string compression scripts are by Homunculus: https://marketplace.yoyogames.com/assets/4560/strict . +The source code here has the same requirements as the original repo in order for it to work. Only the code and my changes have been included. Also, the string compression scripts are by Homunculus: https://marketplace.yoyogames.com/assets/4560/strict Currently syncs all items, metroids, events, and power-ups. diff --git a/objects/oClient.object.gmx b/objects/oClient.object.gmx index 0fd2c2c..665d7f1 100644 --- a/objects/oClient.object.gmx +++ b/objects/oClient.object.gmx @@ -25,8 +25,10 @@ 1 - strict_init("dictionary.json"); + network_set_config(network_config_connect_timeout, 5000); +strict_init("dictionary.json"); canSend = false; +connected = false; alarm[1] = 300; var type; type = network_socket_tcp; @@ -85,6 +87,9 @@ alarm[0] = 5; buffer_delete(buffer); ds_grid_destroy(global.onlineList); ds_grid_destroy(global.onlineSend); +if(connected){ + display_itemmsg("Disconnected", "", "", ""); +} @@ -228,7 +233,17 @@ if(!canSend){ 1 - if(keyboard_check_pressed(vk_f2)){ + if(!connected){ + if(isConnected >= 0){ + connected = true; + display_itemmsg("Connected", "", "", ""); + } else { + instance_destroy(); + display_itemmsg("Failed to connect", "Please try again", "", ""); + } +} + +if(keyboard_check_pressed(vk_f2)){ instance_destroy(); } @@ -313,6 +328,9 @@ switch(type_event){ buffer_delete(buffer); ds_grid_destroy(global.onlineList); ds_grid_destroy(global.onlineSend); +if(connected){ + display_itemmsg("Disconnected", "", "", ""); +} From 3e1bcd98a14afc48a7ec0252176ac5c8bc7356fc Mon Sep 17 00:00:00 2001 From: milesthenerd Date: Wed, 6 Jan 2021 13:42:48 -0600 Subject: [PATCH 3/9] Update to oClient to comment out F3 code --- objects/oClient.object.gmx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/objects/oClient.object.gmx b/objects/oClient.object.gmx index 665d7f1..94a9c11 100644 --- a/objects/oClient.object.gmx +++ b/objects/oClient.object.gmx @@ -247,6 +247,7 @@ if(keyboard_check_pressed(vk_f2)){ instance_destroy(); } +/* if(keyboard_check_pressed(vk_f3)){ var f = 0; repeat(41){ @@ -254,6 +255,7 @@ if(keyboard_check_pressed(vk_f3)){ f++; } } +*/ From e25400feeeeda929086630de549952cbea4d856e Mon Sep 17 00:00:00 2001 From: milesthenerd Date: Fri, 8 Jan 2021 13:07:30 -0600 Subject: [PATCH 4/9] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 78e0b9d..ac4f108 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,14 @@ Put the ip of the server you want to connect to into the ipaddress.txt. The serv The server can be found here: https://github.com/lassiterm/AM2R-Server +## To-do List + - Handle item and metroid updates if players are in the same room + - Sync player deaths + - Save syncing + - Message that tells you what power-up has been obtained + - More definitive player data tracking by the server + - Other things I haven't thought of yet, so if you have any ideas or suggestions, let me know in the AM2R Discord Server + ## What is this? The source code for the AM2R Community Updates 1.5.x branch, free of copyrighted assets and trademarks. If you have not played the AM2R Community Updates before, this will be of no use to you! From 869037eca6ec517e7f1d95e9b74e18bc2e6c1d3c Mon Sep 17 00:00:00 2001 From: milesthenerd Date: Fri, 8 Jan 2021 15:32:24 -0600 Subject: [PATCH 5/9] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ac4f108..8ad0622 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ Put the ip of the server you want to connect to into the ipaddress.txt. The serv The server can be found here: https://github.com/lassiterm/AM2R-Server +The adjusted patcher for the AM2R mod can be found here: https://github.com/lassiterm/AM2R-Autopatcher + ## To-do List - Handle item and metroid updates if players are in the same room - Sync player deaths From 810ddd21d09b1dda3e14ae0dd9605e04b10eda65 Mon Sep 17 00:00:00 2001 From: milesthenerd Date: Mon, 11 Jan 2021 12:08:19 -0600 Subject: [PATCH 6/9] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 8ad0622..777d4ea 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,6 @@ The server can be found here: https://github.com/lassiterm/AM2R-Server The adjusted patcher for the AM2R mod can be found here: https://github.com/lassiterm/AM2R-Autopatcher ## To-do List - - Handle item and metroid updates if players are in the same room - - Sync player deaths - Save syncing - Message that tells you what power-up has been obtained - More definitive player data tracking by the server From 14dcbb309ba6d8f9697207c1dd475307b7341ecc Mon Sep 17 00:00:00 2001 From: milesthenerd Date: Mon, 11 Jan 2021 12:20:36 -0600 Subject: [PATCH 7/9] Gitignore update --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 811a598..84441e0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,10 @@ scripts/pal_swap_* *.shader \#backups help.rtf +datafiles/lang/* +datafiles/mods/* +datafiles/modifiers.ini +exports extensions AM2R.exe data.win From 5fe4409e628e56c7c9b322150ad409b37f7eb339 Mon Sep 17 00:00:00 2001 From: milesthenerd Date: Mon, 11 Jan 2021 19:51:09 -0600 Subject: [PATCH 8/9] Added F3 to show seed --- AM2R.project.gmx | 1 + objects/oClient.object.gmx | 8 +------- scripts/popup_text_ext.gml | 5 +++++ scripts/send_seed.gml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 scripts/popup_text_ext.gml diff --git a/AM2R.project.gmx b/AM2R.project.gmx index a375c74..25f9d9a 100644 --- a/AM2R.project.gmx +++ b/AM2R.project.gmx @@ -4374,6 +4374,7 @@ + diff --git a/objects/oClient.object.gmx b/objects/oClient.object.gmx index 2215897..ef5c1b6 100644 --- a/objects/oClient.object.gmx +++ b/objects/oClient.object.gmx @@ -367,15 +367,9 @@ if(keyboard_check_pressed(vk_f2)){ instance_destroy(); } -/* if(keyboard_check_pressed(vk_f3)){ - var f = 0; - repeat(41){ - global.metdead[f] = 1; - f++; - } + popup_text_ext(string(oControl.seed), 300); } -*/ diff --git a/scripts/popup_text_ext.gml b/scripts/popup_text_ext.gml new file mode 100644 index 0000000..db8536a --- /dev/null +++ b/scripts/popup_text_ext.gml @@ -0,0 +1,5 @@ +/// popup_text_ext +with (oPopupText) instance_destroy(); +var t = instance_create(0, 0, oPopupText); +t.text = argument0; +t.alarm[0] = argument1; \ No newline at end of file diff --git a/scripts/send_seed.gml b/scripts/send_seed.gml index f02eb87..8f5f33f 100644 --- a/scripts/send_seed.gml +++ b/scripts/send_seed.gml @@ -9,4 +9,4 @@ buffer_write(seedBuffer, buffer_u8, 3); buffer_write(seedBuffer, buffer_f64, oControl.seed); buffer_write(seedBuffer, buffer_u8, global.clientID); var result = network_send_packet(oClient.socket, seedBuffer, buffer_tell(seedBuffer)); -popup_text("Seed sent"); \ No newline at end of file +popup_text("Seed sent"); From 7663074340aef494a9e17244b7a76aebd9fd199f Mon Sep 17 00:00:00 2001 From: milesthenerd Date: Mon, 11 Jan 2021 19:52:31 -0600 Subject: [PATCH 9/9] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0716ab6..2558dc0 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The source code here has the same requirements as the original repo in order for Currently syncs all items, metroids, events, and power-ups. -Currently, pressing F1 will make an attempt to connect to the server. F2 will disconnect from the server. +Currently, pressing F1 will make an attempt to connect to the server. F2 will disconnect from the server. F3 will show the current random seed. Put the ip of the server you want to connect to into the ipaddress.txt. The server operates on port 64198 and cannot be changed at the moment.