Hosted Projects - Standalone > Diaspora Multiplayer Open Beta

Mission 2 - The Strike

(1/6) > >>

karajorma:
As promised, here is the the first mission I've converted to multiplayer. It might be a little rough around the edges but it should be playable. The mission should support up to 12 players at one time (and I'd be very interested to see if the game can actually handle that many players correctly).

You'll need to have patch 1.1 installed. You'll need to download this 7zip file and extract it to your Diaspora folder. Then run the launcher. Go to the mods tab and activate the Diaspora Multiplayer Beta option. Then go to the Basic Settings tab and make sure you select the FS2 Open 3.7.1 executable (Games will not work with the patch 1.1 exes!).

Once running a multiplayer game, you should now see a new mission called The Strike.

I need people to playtest the mission as much as possible. The kind of feedback I need include.

1) Did the tube launches work correctly? In order to make them work in multiplayer, the tube launch section of the mission was completely rewritten. The game now uses a scripting system designed by m|m and a new SEXP coded by myself in order to work in multiplayer. It's possible that one or the other has bugs still. Especially when it comes to the other players or the AI (it should work for Player 1).

2) Did combat landings work correctly? These have been reported as a source of error since patch 1.1 and again the events to handle combat landings have been rewritten somewhat.

3) Is the mission too hard or too easy for the number of players you played with. What difficulty did you play on? How skilled are the players at Diaspora? Did you change the number of respawns? What would be a good number of respawns to default to?

4) Was there any issues with lag or the underlying netcode?

5) Does the mission perform correctly when played on a standalone? Does it work when a player is also on the server?

6) Any other details you can give me will help.

I'm going to start work on converting the other missions, but the feedback from this one is very important in helping me balance things and get everything working correctly right from the start. More details on the plans for the Open Beta itself can be found here. So can we keep discussion on this thread to this particular mission please.

For any coders trying this out (or anyone on Linux who needs to make their own builds) here is a patch against r10467.


--- Code: ---Index: code/parse/sexp.cpp
===================================================================
--- code/parse/sexp.cpp (revision 10465)
+++ code/parse/sexp.cpp (working copy)
@@ -677,6 +677,7 @@
  { "damaged-escort-priority-all", OP_DAMAGED_ESCORT_LIST_ALL, 1, MAX_COMPLETE_ESCORT_LIST, SEXP_ACTION_OPERATOR, }, // Goober5000
  { "set-support-ship", OP_SET_SUPPORT_SHIP, 6, 7, SEXP_ACTION_OPERATOR, }, // Goober5000
  { "script-eval", OP_SCRIPT_EVAL, 1, INT_MAX, SEXP_ACTION_OPERATOR, },
+ { "multi-eval", OP_SCRIPT_EVAL_MULTI, 2, INT_MAX, SEXP_ACTION_OPERATOR, },
  { "debug", OP_DEBUG, 2, 2, SEXP_ACTION_OPERATOR, }, // Karajorma
  { "do-nothing", OP_NOP, 0, 0, SEXP_ACTION_OPERATOR, },
 
@@ -21269,7 +21270,7 @@
 }
 
 //WMC - This is a bit of a hack, however, it's easier than
-//coding in a whole new SCript_system function.
+//coding in a whole new Script_system function.
 int sexp_script_eval(int node, int return_type)
 {
  int n = node;
@@ -21304,6 +21305,97 @@
  return r;
 }
 
+void sexp_script_eval_multi(int node)
+{
+ char s[TOKEN_LENGTH];
+ bool success = true;
+ int execute_on_server;
+ int sindex;
+ player *p;
+
+ strcpy_s(s, CTEXT(node));
+
+ node = CDR(node);
+
+ execute_on_server = is_sexp_true(node);
+
+ node = CDR(node);
+
+ multi_start_callback();
+ multi_send_string(s);
+ // evalutate on all clients
+ if (node == -1) {
+ multi_send_bool(true);
+ execute_on_server = 1;
+ }
+ // we have to send to all clients but we need to send a list of ships so that they know if they evaluate or not
+ else {
+ multi_send_bool(false);
+
+ do {
+ p = get_player_from_ship_node(node, true);
+
+ // not a player ship so skip it
+ if (p == NULL ){
+ node = CDR(node);
+ continue;
+ }
+ else {
+ // if this is me, flag that we should execute the script
+ if (p == Player) {
+ execute_on_server = 1;
+ }
+ // otherwise notify the clients
+ else {
+ sindex = ship_name_lookup(CTEXT(node));
+ multi_send_ship(sindex);
+ }
+ }
+
+ node = CDR(node);
+ } while (node != -1);
+ }
+
+ multi_end_callback();
+
+ if (execute_on_server) {
+ success = Script_system.EvalString(s, NULL, NULL, s);
+ }
+
+ if(!success) {
+ Warning(LOCATION, "sexp-script-eval failed to evaluate string \"%s\"; check your syntax", s);
+ }
+}
+
+void multi_sexp_script_eval_multi()
+{
+ int sindex;
+ char s[TOKEN_LENGTH];
+ bool sent_to_all = false;
+ bool success = true;
+
+ multi_get_string(s);
+ multi_get_bool(sent_to_all);
+
+ if (sent_to_all) {
+ success = Script_system.EvalString(s, NULL, NULL, s);
+ }
+ // go through all the ships that were sent and see if any of them match this client.
+ else {
+ while (multi_get_ship(sindex)) {
+ Assertion(sindex >= 0, "Illegal value for the ship index sent in multi_sexp_script_eval_multi()! Ship %d does not exist!", sindex);
+ if (Player->objnum == Ships[sindex].objnum) {
+ success = Script_system.EvalString(s, NULL, NULL, s);
+ }
+ }
+ }
+
+ if(!success) {
+ Warning(LOCATION, "sexp-script-eval failed to evaluate string \"%s\"; check your syntax", s);
+ }
+}
+
+
 void sexp_force_glide(int node)
 {
  ship *shipp;
@@ -23987,6 +24079,11 @@
  case OP_SCRIPT_EVAL:
  sexp_val = sexp_script_eval(node, OPR_NULL);
  break;
+
+ case OP_SCRIPT_EVAL_MULTI:
+ sexp_script_eval_multi(node);
+ sexp_val = SEXP_TRUE;
+ break;
 
  case OP_CHANGE_IFF_COLOR:
  sexp_change_iff_color(node);
@@ -24407,6 +24504,10 @@
  multi_sexp_set_ets_values();
  break;
 
+ case OP_SCRIPT_EVAL_MULTI:
+ multi_sexp_script_eval_multi();
+ break;
+
  // bad sexp in the packet
  default:
  // probably just a version error where the host supports a SEXP but a client does not
@@ -25010,6 +25111,7 @@
  case OP_SET_SECONDARY_WEAPON:
  case OP_SET_NUM_COUNTERMEASURES:
  case OP_SCRIPT_EVAL:
+ case OP_SCRIPT_EVAL_MULTI:
  case OP_ENABLE_BUILTIN_MESSAGES:
  case OP_DISABLE_BUILTIN_MESSAGES:
  case OP_LOCK_PRIMARY_WEAPON:
@@ -27037,6 +27139,14 @@
  case OP_SCRIPT_EVAL:
  return OPF_STRING;
 
+ case OP_SCRIPT_EVAL_MULTI:
+ if (argnum == 0)
+ return OPF_STRING;
+ else if (argnum == 1)
+ return OPF_BOOL;
+ else
+ return OPF_SHIP;
+
  case OP_CHANGE_IFF_COLOR:
  if ((argnum == 0) || (argnum == 1))
  return OPF_IFF;
@@ -28796,6 +28906,7 @@
  case OP_DAMAGED_ESCORT_LIST_ALL:
  case OP_SET_SUPPORT_SHIP:
  case OP_SCRIPT_EVAL:
+ case OP_SCRIPT_EVAL_MULTI:
  return CHANGE_SUBCATEGORY_OTHER;
 
  case OP_NUM_SHIPS_IN_BATTLE:
@@ -32392,17 +32503,25 @@
  },
 
  {OP_SCRIPT_EVAL_STRING, "script-eval-string\r\n"
- "\tEvaluates script to return a string"
+ "\tEvaluates script to return a string\r\n\r\n"
  "Takes 1 argument...\r\n"
  "\t1:\tScript\r\n"
  },
 
  {OP_SCRIPT_EVAL, "script-eval\r\n"
- "\tEvaluates script"
+ "\tEvaluates script\r\n\r\n"
  "Takes at least 1 argument...\r\n"
  "\t1:\tScript to evaluate\r\n"
  },
 
+ {OP_SCRIPT_EVAL_MULTI, "multi-eval\r\n"
+ "\tEvaluates script\r\n\r\n"
+ "Takes at least 2 arguments...\r\n"
+ "\t1:\tScript to evaluate\r\n"
+ "\t2:\tTrue/False - Should the script evaluate on the server?\r\n"
+ "\t(rest):\tList of players who should evaluate this script. If no player is given, all clients will execute the script\r\n"
+ },
+
  {OP_FORCE_GLIDE, "force-glide\r\n"
  "\tForces a given ship into glide mode, provided it is capable of gliding. Note that the player will not be able to leave glide mode on his own,, and that a ship in glide mode cannot warp out or enter autopilot."
  "Takes 2 Arguments...\r\n"
Index: code/parse/sexp.h
===================================================================
--- code/parse/sexp.h (revision 10465)
+++ code/parse/sexp.h (working copy)
@@ -719,6 +719,7 @@
 #define OP_SET_ETS_VALUES (0x0023 | OP_CATEGORY_CHANGE2 | OP_NONCAMPAIGN_FLAG) // niffiwan
 #define OP_CALL_SSM_STRIKE (0x0024 | OP_CATEGORY_CHANGE2 | OP_NONCAMPAIGN_FLAG) // X3N0-Life-Form
 #define OP_SET_MOTION_DEBRIS (0x0025 | OP_CATEGORY_CHANGE2 | OP_NONCAMPAIGN_FLAG)    // The E
+#define OP_SCRIPT_EVAL_MULTI (0x0026 | OP_CATEGORY_CHANGE2 | OP_NONCAMPAIGN_FLAG) // Karajorma
 
 // defined for AI goals
 #define OP_AI_CHASE (0x0000 | OP_CATEGORY_AI | OP_NONCAMPAIGN_FLAG)

--- End code ---




[attachment deleted by an evil time traveler]

bunik:
hi! with my friend up standalone server. starting dogfight mission(v3.7.1) - its OK! but if launch any coop-mission - server is dawn or game crash!

karajorma:
Try running the standalone in debug mode and tell me what kind of error message you get. You may get a few warnings you can click through by choosing No first.

Echelon9:
Yes, we'd be very interested in any detailed error reports from the standalone server with this mission.

bunik:

--- Quote from: karajorma on March 07, 2014, 06:22:35 am ---Try running the standalone in debug mode

--- End quote ---
you have little manual for this?

Navigation

[0] Message Index

[#] Next page

Go to full version