Announcement

Collapse
No announcement yet.

GENERAL: Integration of Other ANET P2P MPlayer Games

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GENERAL: Integration of Other ANET P2P MPlayer Games

    This is the only game for which Activision, Inc. has released source code and the Open Source Project is a true achievement and example to what I would like to accomplish with an ealier Activision, Inc. game, called Battlezone.

    We have 50-60 dedicated players of which most have played since 1998. We now have a dedicated server that supports the game which runs on Redhat Enterprise Linux and we just compiled the new servers.dat.

    We also recently discovered something that enabled most of our players to start playing again, and that was a fix for Windows XP while playing BZ. I made the current patch that allows us to play on Windows XP and it uses the winets2.dll file from C2P Open Source.

    Our club is a non-profit organization dedicated to improving the ability to play Battlezone and we would like to request help in approaching Activision, Inc. for the rights to the source code. If Battlezone were released, our club will dedicate resources to sponsor development which might be beneficial to your source code project as well, since all the ANET server-based P2P games use the same platform.

    I will check the forum and continue learning more about the work here as well as answer all emails.

    Thank you very much,
    Warren Whitlock
    /€ëwÎ-1

  • #2
    Hmm we CtP1/2 players have problems with Windows XP/2k too, I've seen the fix mentioned before on the yahoo anet group but not sure what we can do about it ourselves. Can you explain what you did in this fix exactly?

    With CtP1/2 its XP/2k players not able to join another XP/2k players game, the strange thing is if a Win98 player hosts and launches the game, then drops out and the host switches to one of the XP/2k players, the game will continue fine with the XP/2k players.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

    Comment


    • #3
      The current ANET comm dll's are
      win\dll\wmodem2.dll - modem driver
      win\dll\wmodem2d.dll - debugging modem driver
      win\dll\wserial2.dll
      win\dll\wserial2d.dll
      win\dll\winets2.dll
      win\dll\winets2d.dll
      win\dll\wipx2.dll
      win\dll\wipx2d.dll
      win\dll\wloop2.dll - the loopback dummy driver. Works without any network installed.
      win\dll\wloop2d.dll

      When ANET was developed, P2P connections were through telephone modems, so that a Win98 or WinXP over a telephone line will be more stable than WinXP over a broadband connection. The calls for crash reports inside of the winets2.dll are what cause the loss of connection. (I think). In the yahoo group for ANET set up by Dan Kegal is a link to download a modified winets2.dll which I used for the BZ XP fix and it works! If you look at our web page in "Who's online" it will show that our number of players is increasing now that many who could not run partitions with Win98 can now run the game again. I will find the link to download the couple of dll's that I obtained and post here for you.

      I simply replaced files and tested to determine what would work. There is another fix as well......which if you block the IP address where the crash reports go for ANET games, sometimes this provides an XP fix. That address is 128.127.50.1, but some1 smarter than I am would need to explain this in more technical detail.

      I think the fix for ANET games lies in re-writing how the client connects to the server and then to the peers and how the calls for reports are handled.
      /€ëwÎ-1

      Comment


      • #4
        Currently the ANET games supported on our server under the 911 Alink server are:

        Civilization: Call To Power
        Civilization: Call To Power
        Civilization: Call To Power World Editor Preview
        Civilization: Call To Power 1.1
        Civilization: Call To Power 1.2
        Zork Grand Inquisitor 1.0 English
        Zork Grand Inquisitor 1.0 French
        Zork Grand Inquisitor 1.0 Spanish
        Zork Grand Inquisitor 1.0 German
        Zork Grand Inquisitor 1.01
        Interstate '76
        Battlezone Beta
        Battlezone 1.0
        Battlezone 1.01
        Battlezone 1.1
        Battlezone 1.2
        Battlezone Japanese
        Battlezone 1.3
        Battlezone 1.4
        Battlezone Odyssey
        Fighter Squadron
        Fighter Squadron 1.5
        Fighter Squadron 1.5.1
        Heavy Gear 2 Demo
        Heavy Gear 2 Beta
        Heavy Gear 2 Gamma
        Heavy Gear 2
        I'76 Nitro Pack
        Dark Reign 1.0
        Dark Reign Demo
        Dark Reign Downloadable Demo
        Dark Reign
        Shanghai: Second Dynasty
        Second Dynasty 1.1
        Interstate 82
        Shanghai Dynasty
        Shanghai Dynasty Demo
        Shanghai Dynasty 1.1
        Shanghai Dynasty 1.1 Japanese
        MechWarrior 2 BattlePack
        Titanium Netmech
        MechWarrior 2: Mercenaries 1.10
        Titanium Mercnet
        Heavy Gear 1.0
        Heavy Gear 1.1
        Heavy Gear 1.2
        Call To Power 2
        Call To Power 2 v1.1

        You can view any active game on the 911 server here:
        /€ëwÎ-1

        Comment


        • #5
          The three files that I initially used for our anet XP fix are:

          MD5 (anet.zip) = df9f7ba271926ef9b4e785c512864ada
          MD5 (winets2.dll) = aaf48b4511a88d8f7a0ab04074691938
          MD5 (wudplan.dll) = 4512f8b54d38d9d6e598c1878d8cdc6a

          You can download them directly from here:


          I believe the winets2.dll is the same one which is contained in ur source code project that I downloaded.
          /€ëwÎ-1

          Comment


          • #6
            AFAIK, we have not modified any anet code. The original source code installer contains 2 versions of winets2.dll.
            The version in ctp2_code\ctp\dll\net is from 2000-07-19. It looks like this is the same file as the one in ctp2_program\ctp\dll\net from the official game distribution.
            The version in ctp2_code\libs\anet\win\dll is from 1999-02-09.

            Unfortunately, the original source code installer does not contain the anet sources - just a minimum set of comment-stripped headers to enable compilation. I guess Activision is not bound by the anet LGPL license . But it looks very much like the 0.10 version. The only difference I could find was that anet.h in ctp2_code\libs\anet\h contains a declaration of an unused function dpPkt2a that is not present in the 0.10 version.

            Your mention of crash report problems is interesting. In the release notes of anet, you can find:
            12 Feb 1999

            * Crashes are no longer written to disk in atvilog.bin; instead, they are passed to the program sendcrsh.exe.
            So, you may be right that this is the problem, and it could be a reason for the 1999-02-09 file to work where a newer one would not.

            I found only one reference to a bug (wrong address stored in gethostaddr_connect) at the yahoo forum, but that one has not been fixed in the 0.10 version. It should be something like
            Code:
            #if defined(ANET_ORIGINAL)
            				addr.addr = stRmtAddr.sin_addr.s_addr;
            				addr.port = stRmtAddr.sin_port;
            #else
            				/* From tchu at yahoo anet group */
            				addr.addr = stLclAddr.sin_addr.s_addr;
            #endif
            So the question is: which version are you distributing? The date of your file is 2004-06-15, so it might also be a newly compiled one, and completely unrelated. In that case, we would like to have a look at the changes in your source.

            Comment


            • #7
              Originally posted by Fromafar
              So the question is: which version are you distributing? The date of your file is 2004-06-15, so it might also be a newly compiled one, and completely unrelated. In that case, we would like to have a look at the changes in your source.
              Yes that is a very good question. And another question is where we could find a newer version of this source code. I can imagine that someone already has/had started to work on. And I think we should add at least the anet source code to our project, as it is documented and commented in comparision to ours. And if we want to modify the anet code we should use the commented version.

              -Martin
              Civ2 military advisor: "No complaints, Sir!"

              Comment


              • #8
                The Winets2.dll, which works in the xp fix/patch, is the 32Kb size version. It function the same as the winets2.dll in your source code, when I use it inside of Battlezone’s dll folder. But I am unable to do a comparison of the contents - only the function/outcome. The earlier versions of winets2.dll from Heavy Gear (16Kb) and Battlezone Antilag patches (9Kb and 16Kb) files cause disconnection when two or more players using WinXP are in the lobby, or when one with WinXP joins a game.

                I believe that we could use the ANET communications system which can automatically add new servers, provide information about peer and server connections and perhaps allow a much larger forum/platform for all ANET players to interact. A drastic change to the ANET server code will need to be performed in tandem with the game source code, since it may disconnect legacy versions. In one way, it is in all of our interests to devote some time to studying ANET communications and to improve the ability of everyday players to host a Linux server, as well as improve communication between players.

                I know what I am suggesting is very different from perhaps how games have been developed in the past, but I think this is one of ur groups unique qualities to help accomplish.
                /€ëwÎ-1

                Comment


                • #9
                  OK. The 1999 version is 16kB, while the 2000 version is 32kB. And, when I compile the 0.10 version, it is 32kb as well. If the server is using the 0.10 version, it would make sense that older client versions could have problems.

                  Did you try compiling the 0.10 version to see if it works for your game? I think it is preferable to have a compiled 0.10 version, of which we have the code available, so we can use the LGPL license and make modifications. Distributing the "possibly-0.10" version from the Call to Power 2 source (or from the original game) may not be quite as legal.

                  Comment


                  • #10
                    I have compiled html, but that is about the extent of my compiling experience, but your information makes perfect sense to me and I greatly appreciate your help. There are two other guys (Eddy and Woody) who compiled the server, however the server source code is available under a GNU/GPL. The only ANET game for which the rights to the source code have been released is Ct2P, so I am now using two dll files from your source code which I downloaded, inside of Battlezone. Inside of the members section of the Battlezone Club's web site, you can order a CD-ROM that will up install the game with all major updates, maps, patches and new servers.dat file. Without this CD, the installation is too complicated and takes several hours to complete. The purpose of our club as a non-profit organization is to address problems and insure that our members can continue to play the game. Since Activision no longer supports the our game in any fashion, the Battlezone Club now supports the game to include seeking the rights to the source code.

                    Our current installation CD-ROM winets2.dll from your source code and it also contains one other dll file " wipx2.dll." This file is larger than the original wipx2.dll inside of Battlezone. During my testing, it seems to work better, although, I am not sure of its function. However, from my reading in the ANET forum, it seems that most ANET files function without respect to the game they carry (although I am sure there are some limits to this general concept).

                    Considering that we might be able to get the rights to Battlezone source code, I agree, it makes sense to use as many of the same files inside of “BZ-Second Edition” and Ct2P. In addition, future development of both games and insuring compatibility of their files is even more important if we make significant changes to both the games and eventually the server code. I hope that we will be able to obtain an agreement with Activision, Inc., similar to what you guys have accomplished, so that we can insure that we meet all terms and requirements, but in the meantime, we are just struggling to keep our game alive.
                    /€ëwÎ-1

                    Comment


                    • #11
                      The version would be whatever one is on Dan's site. I'm not sure if there is more than one version of the anet server code, which you can download from the site below:



                      The current 911 server was compiled on RedHat 7.3, but it is now running well on Redhat Enterprise Linux.

                      I hope this might answer part of your question.
                      /€ëwÎ-1

                      Comment


                      • #12
                        The first link at that page (anet-0.10.tar.gz) contains the source code of both server and client. This is the 0.10 version I mentioned. I would suggest distributing this version, and not the one from the CtP2 source code. Actually, the EULA even forbids this, unless you have written permission from Activision.

                        The 0.10 DLLs can be generated without problems with MSVC6 - just modify the TOP variable in src\build.bat to point to the proper location and execute it.
                        So far, I have made only minor changes to the code. Just added a few missing return statements the compiler was complaining about, and applied the gethostaddr_connect fix.

                        I intend to make the modified source and DLLs available, but will wait until the code archive is fully operational - to prevent having to do it twice.

                        Comment


                        • #13
                          Below are some ideas that I had for reprogramming the ANET DLL and re-building Battlezone either as a completely new "mod" as a source code project or from Activision source code, under the name “Battlezone Second Edition.” If we obtain the rights the the original source code it would be preferred, but we can completely re-write the entire as a mod as well.

                          My comments are in parenthesis as: (W-comment...) Feel free to add your own comments and I will post on our forum.



                          "The Anet API, like Microsoft's DirectPlay, takes care of the dirty part of writing networked games (e.g. dialing the modem or connecting over the 'Net), and lets you concentrate on writing the game."

                          "It supports many kinds of connections: LAN, Internet, modem, direct serial connection, and proprietary gaming networks such as Heat."

                          (W-We need to plan on building a user log-n to the server with an interface similar to what HEAT used)

                          “A transport DLL is a simple library that provides an unreliable packet delivery service. These can be wrappers around existing API's (as in the
                          case of IPX, DOS Dwango, and Win95 Internet transports), or they can actually implement a packet protocol and talk to hardware (as in the
                          Modem, Null-Modem, and DOS Internet transports). It's not too hard to develop new transport DLL's; if an API exists, and you just need to wrap it into a DLL, you might be able to get it up and running in two days, and
                          finished in a week. “

                          (W-The major transport DLL in ANET are Winets2.dll and Winpx2.dll)


                          Server Login
                          If the user wishes his score to be used to update his skill rating on the game vendor web site, he or she needs to log in after connecting to the game server.
                          Before logging in, the player must have obtained a username and password from the game vendor web site. API functions have been written to allow
                          account creation within games, but it was not settled whether to use these or a web interface for user account management, and development was never quite completed.

                          (W-Player Specific Log In to the ANET Server is described below, the user name and password can be assigned by the BZ Club to all players as a free
                          service)

                          The function dpAccountLogin accepts a username and password, and sends them to the server; the server replies with a message of type dp_ACCOUNT_PACKET_ID explaining whether the login was successful. A login might be unsuccessful for two reasons: the account might still need to be activated, in which case the user needs to visit the account signup web page again, or the username or password might not be valid.

                          Once the first game using score reporting is deployed, we will add additional functionality that takes advantage of the user's login status, e.g. buddy tracking and user-to-user messaging.

                          (W-All uses can be allowed to message each other in the master server lobby)

                          Currently (9/98), the lower 16 bits of the player's userid are available in dp_playerId_t.karma. This can be used to tell whether remote players have logged in. Only if all players in a session are logged in will scores be reported. The field containing the userid will be renamed and will hold the full 32 bits of the userid before the first game using this feature is
                          released.

                          There are two versions of dpAccountLogin - one for Unicode, and one for the default system character set. If you use the latter, the username and password will be converted to Unicode for you.

                          Player Management (W-becomes the role of BZ Club for Battlezone games/players)

                          Anet keeps track of the players in each session, and assigns each player a unique id which will not be reused for any other player during the session. Player id's are 16 bit numbers which tend to start near zero, and
                          tend to increase as players are added. Their most important use is with dpSend and dpReceive, where they indicate destination and source of the message. After opening a session, a player needs to be created by calling dpCreatePlayer(dp, callback, context, name). The callback dpEnumPlayersCallback_t(id, name, flags, context) is called when the operation completes; save the value of id, this is the id of the new
                          player.

                          To get the name of a particular player, call dpGetPlayerName(dp, id, buf, buflen).

                          To get the number of players in the currently open session, call dpNumPlayers(dp).

                          To get a list of the players in the currently open session, call dpEnumPlayers(dp, NULL, callback, context, timeout). The callback dpEnumPlayersCallback_t(id, name, flags, context) returns a description of each player. (To get a list of the players in some other session, call dpEnumPlayers(dp, s, ...), using one of the session descriptions returned by dpEnumSessions.)

                          When a player wants to leave the session, call dpDestroyPlayer(dp, id). You can omit this if you're about to call dpClose(), which destroys all the locally created players anyway.

                          To prevent new players from seeing or joining a session in progress, call dpEnableNewPlayers(dp, FALSE). Call it again with TRUE to re-enable new
                          players.

                          Score Reporting
                          Score reporting is an interesting and challenging aspect of producing a successful computer game, since it involves linking the game to a database
                          of very sensitive (at least to the players!) data, and because each game may have very different ideas of what kinds of data it wants to report.
                          Early game networks such as Heat and Dwango tended to let the game report a single number, or possibly several numbers, as a player's score; the format of the number is more or less rigidly defined by the game network. This was initially supported with the dpReportScore() (for Dwango) and pReportScoreStart/dpReportScore2/dpReportScoreEnd (for Heat) interfaces, which immediately transmitted score data via a special call to the transport DLL. These interfaces are now deprecated.

                          More recent networks such as WON prefer to let the game report a blob of
                          data; it is up to the game programmer to describe the blob's format to the
                          WON database programmer so he or she can interpret the score data and display it on the WON web site. This style is supported with the dpReportScoreBuf() interface.

                          dpReportScoreBuf() takes a player id and a buffer of game-defined score data. It is called whenever a significant change in any player's score occurs (e.g. when a player kills somebody or is killed, or completes a game objective). The Anet library will then use that data to report a full set of score buffers to the game server when appropriate; currently, this is done whenever any player leaves the game.

                          (W-I have some specific ideas on how this might function much better, currently rankings are done based on the ratio of Killseaths. Totals: Other aspects to different forms of the game play are the player with the highest number of kills, where deaths do not exceed kills; and where a
                          player has the LEAST number of deaths, where their kills still exceed their deaths. Rates: Number of Kills and Deaths per unit of time - since games operate with a timing capability built into them.)

                          In order for this interface to support the older game networks, the first
                          three bytes of the score buffer must follow a standard format; see the
                          comment for dpReportScoreBuf(). The rest of the score buffer may be formatted any way the game likes, but should be kept compact; the format of the buffer will need to be documented so the score server database
                          programmer can decode the buffer.

                          When connected to an Anet game server, scores will only be reported if all
                          players in the session have logged in to the game server.

                          Group Management (W-we need a group id for beginners, intermediate and
                          advanced players so that skill levels become part of the game play)

                          If a program wants to send messages often to a particular group of players, a player group can be created by calling dpCreateGroup(dp, &idGroup, name). The new group's id will be placed in idGroup. This
                          function call is currently allowed only on the master.
                          When the group is no longer needed, call pDestroyGroup(dp, id).

                          To get a list of the groups in the current session, call dpEnumGroups(dp,
                          NULL, callback, context, timeout). The callback
                          dpEnumPlayersCallback_t(id, name, flags, context) returns a description of
                          each group. (Only groups in the current session can currently be listed.)

                          To add a player to a group, call dpAddPlayerToGroup(dp, idGroup, idPlayer).

                          To delete a player from a group, call DeletePlayerFromGroup(dp, idGroup,
                          idPlayer).

                          To get a list of the players in a particular group, call
                          dpEnumGroupPlayers(dp, idGroup, NULL, callback, context, timeout). The callback dpEnumPlayersCallback_t(id, name, flags, context) returns a description of each player. (Only players in groups in the current session
                          can currently be listed.)

                          "The battlezone club is looking for volunteer programmers interested in building a 'Battlezone Second Edition' an open source ANET version."

                          Warren
                          /€ëwÎ-1

                          Comment


                          • #14
                            This all sounds very interesting and very good news for CTP2 player.

                            In Call To power, how exactly to conect with this server?

                            Also, I use a Router (Roteador in portuguese, not sure the word in english). Explaining: I´m not directly conected to the internet, instead I´m part of a inner net that has access to the internet. Will I have problems connecting?

                            thanks,

                            Felipe

                            Comment


                            • #15
                              You shouldnt have problems sekel, I have a router too.

                              Youll need to download the latest servers.dat file though which is here:



                              Put it in your ...\Call To Power 2\ctp2_program\ctp folder.
                              Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                              CtP2 AE Wiki & Modding Reference
                              One way to compile the CtP2 Source Code.

                              Comment

                              Working...
                              X