Compile ArenaServer from the source code

Results 1 to 10 of 10
  1. #1
    Ultimate Member ttlove9 is offline
    MemberRank
    Dec 2012 Join Date
    Hải Dương (Location
    161Posts

    idea Compile ArenaServer from the source code


    RaGEZONE Recommends

    RaGEZONE Recommends

    Hello everyone! I hope this tut will help you easy to compile the ArenaServer from the MainServer source.
    I will take this source code: http://forum.ragezone.com/f613/sourc...-4-3-a-1107099
    as an example.

    1. DB for ArenaServer:
    You need copy db atum2_db_1 and restore as atum2_db_arena (2 databases are the same)



    2. Build Arena Bin:
    Goto folder ProjectsServer\GameServer in the source, copy and rename:
    - IMServer -> AIMServer
    - LogServer -> ALogServer
    - NPCServer -> ANPCServer
    - FieldServer -> ArenaServer


    Goto AIMServer folder, rename IMServer.vcxproj to AIMServer.vcxproj
    in ALogServer folder, rename LogServer.vcxproj to ALogServer.vcxproj
    in ANPCServer folder, rename NPCServer.vcxproj to ANPCServer.vcxproj
    in ArenaServer folder, rename FieldServer.vcxproj to ArenaServer.vcxproj


    Backto GameServer folder, open GameServer.sln with Microsoft Visual C++ 2013, right click on Solution > select Add > Existing Project...



    And select AIMServer.vcxproj, do repeat with ALogServer.vcxproj, ANPCServer.vcxproj and ArenaServer.vcxproj



    - Open Contents.h in ProjectsServer\GameServer\CommonGameServer, add code
    Code:
    #define ARENA

    - Right click on AIMServer, ALogServer, ANPCServer, ArenaServer > select Build Selection (Solutions Configurations R_WikiGames_Eng)



    Waiting for build start, after build complete, you can see bin file in BuildResult folder
    rename IMServer.exe to IMServer.exe
    - LogServer.exe to ALogServer.exe
    - NPCServer.exe to ANPCServer.exe
    - FieldServer.exe to ArenaServer.exe
    Copy its to yourServer/Bin


    3. Config:
    a, Global config: open GlobalGameServer.h in ProjectsServer\GameServer\CommonGameServer, you can see global config file path:


    - Create ArenaGlobal.cfg in yourServer/config (same global.cfg), put IP, server name and set
    Code:
    $ARENA_SERVER_FLAG=TRUE
    like this:


    b, Map config: open NPCIOCP.cpp in ProjectsServer\GameServer\ANPCServer\Main to see Arena map config file path:


    - Crete ArenaMap.cfg in yourServer/config to load arena map, like this:
    Code:
    ### CAUTION: Refer to "global.cfg"! ###
    
    ################################################################################
    # User Defined Variables
    ################################################################################
    
    ################################################################################
    
    	ServerGroupDefaultMap		$SERVER_GROUP_DEFAULT_MAP
    
    ######################################################################################################################
    2001		1		FALSE		$FIELD_SERVER_IP		$FIELD_SERVER_PORT		6021		$NPC_SERVER_IP		$NPC_SERVER_PORT		6026		256		256		FALSE			
    2002		1		FALSE		$FIELD_SERVER_IP		$FIELD_SERVER_PORT		6031		$NPC_SERVER_IP		$NPC_SERVER_PORT		6036		256		256		FALSE			
    9101		30		TRUE		$FIELD_SERVER_IP		$FIELD_SERVER_PORT		7870		$NPC_SERVER_IP		$NPC_SERVER_PORT		7875		256		256		TRUE			
    9102		30		TRUE		$FIELD_SERVER_IP		$FIELD_SERVER_PORT		7872		$NPC_SERVER_IP		$NPC_SERVER_PORT		7873		256		256		TRUE			
    9200		30		TRUE		$FIELD_SERVER_IP		$FIELD_SERVER_PORT		7880		$NPC_SERVER_IP		$NPC_SERVER_PORT		7885		256		256		TRUE			
    9201		30		TRUE		$FIELD_SERVER_IP		$FIELD_SERVER_PORT		7890		$NPC_SERVER_IP		$NPC_SERVER_PORT		7895		256		256		TRUE			
    9202		30		TRUE		$FIELD_SERVER_IP		$FIELD_SERVER_PORT		7900		$NPC_SERVER_IP		$NPC_SERVER_PORT		7905		256		256		TRUE
    - Done, run both MainServer and ArenaServer, check SystemLog to know ArenaServer load ok:


    ArenaFieldSystem log:
    Code:
    08-13 11:14:22|  [Notify] Open all UDP Socket for NPCServer!! Count(  7)
    08-13 11:14:24|Socket Connect SocketIndex[201] PeerIP[  192.168.1.100] Port[49740]
    08-13 11:14:24|  [Notify] ArenaServer, MainFieldServer is registered. MFSID(10061) MFSName(                ROFL) MFSIP(192.168.1.100) PeerSocketIP(192.168.1.100) 
    08-13 11:14:27|  [Notify] UDP Socket ready for NPC Server!! MapIndex(2001) SockIdx(   0) 
    08-13 11:14:27|  [Notify] UDP Socket ready for NPC Server!! MapIndex(2002) SockIdx(   1) 
    08-13 11:14:27|  [Notify] UDP Socket ready for NPC Server!! MapIndex(9101) SockIdx(   2) 
    08-13 11:14:28|  [Notify] UDP Socket ready for NPC Server!! MapIndex(9102) SockIdx(   3) 
    08-13 11:14:28|  [Notify] UDP Socket ready for NPC Server!! MapIndex(9200) SockIdx(   4) 
    08-13 11:14:28|  [Notify] UDP Socket ready for NPC Server!! MapIndex(9201) SockIdx(   5) 
    08-13 11:14:28|  [Notify] UDP Socket ready for NPC Server!! MapIndex(9202) SockIdx(   6)
    Good luck! ;)

    Some files in the tut: https://mega.nz/#!hJhSxD6L!TjL0aezbH...VQq_f7H9Sr_6Sc
    Last edited by ttlove9; 13-08-16 at 06:58 PM.

    AceOnline is my life


  2. #2
    Compile ArenaServer from the source code St34lth4ng3l is online now
    True MemberRank
    Apr 2013 Join Date
    __FILE__Location
    820Posts

    Re: Compile ArenaServer from the source code

    Nice tutorial, it's good to see that you are back ;)
    But you don't need necessarily copy the projects, just add a arena config for them

  3. #3
    Retired (Goddamn idiots) DragonLord is offline
    True MemberRank
    Dec 2003 Join Date
    /dev/urandomLocation
    553Posts

    Re: Compile ArenaServer from the source code

    Cute, but seems like an unnecessary hassle.

    You're better off just adding a custom build step and just making a copy of the executable under a different name.
    At the target location, just move it in it's own folder with configs and the like, shouldn't cause too much of an issue if at all.
    (If the server is in \path\server\bin, you can simply move it to \path\arenaserver\bin)
    Insanity - Doing the same thing over and over again, expecting different results - Albert Einstein


    R.I.P. Akaruz - We miss ya buddy

  4. #4
    Compile ArenaServer from the source code Future is online now
    SupervisorRank
    Dec 2011 Join Date
    1,906Posts

    Re: Compile ArenaServer from the source code

    Great efforts put into this tutorial!

    However I also agree with @DragonLord. Copying the projects just for the definition seem an unnecessary hassle. And it comes with further problems.
    What if you change one of the project source files? Like, add new feature functionality to the Sockets? You'd have to do everything twice, as you have the same projects twice but with a different ARENA flag.

    I'd suggest making a new configuration for Field, IM, Log, NPC server that defines the preprocessor definition "ARENA" instead.



    Then you can customize your build steps like Dragon mentioned to get the other config built together with the normal one if you need to.


    Quote Originally Posted by A Wise Man
    P-Servers are NOT dead. Bugs need squishing. Quests need fixing. Unfortunately, majority of people don't know the difference between a computer and a toaster so...

  5. #5
    Ultimate Member ttlove9 is offline
    MemberRank
    Dec 2012 Join Date
    Hải Dương (Location
    161Posts

    Re: Compile ArenaServer from the source code

    That my guide are redundant, thanks for your feedback. :)

    AceOnline is my life

  6. #6
    Retired (Goddamn idiots) DragonLord is offline
    True MemberRank
    Dec 2003 Join Date
    /dev/urandomLocation
    553Posts

    Re: Compile ArenaServer from the source code

    Not redundant, no.
    You've simply learned a better method :)

    Learn something new every day.
    Insanity - Doing the same thing over and over again, expecting different results - Albert Einstein


    R.I.P. Akaruz - We miss ya buddy

  7. #7
    struct { int:-!!(1); } Aesir is offline
    SubscriberRank
    May 2015 Join Date
    MadnessLocation
    262Posts

    Re: Compile ArenaServer from the source code

    Or rather execute the cl.exe by a post build event, but in that case you'll recompile the arena server each time you compile the main server.

  8. #8
    Retired (Goddamn idiots) DragonLord is offline
    True MemberRank
    Dec 2003 Join Date
    /dev/urandomLocation
    553Posts

    Re: Compile ArenaServer from the source code

    Quote Originally Posted by Aesir View Post
    Or rather execute the cl.exe by a post build event, but in that case you'll recompile the arena server each time you compile the main server.
    ... There's no difference between the arena and normal servers executables.
    Your reply has been pointless, I'm afraid.
    Insanity - Doing the same thing over and over again, expecting different results - Albert Einstein


    R.I.P. Akaruz - We miss ya buddy

  9. #9
    RoRivals gaby001 is offline
    True MemberRank
    Aug 2011 Join Date
    RomaniaLocation
    376Posts

    Re: Compile ArenaServer from the source code

    in last source what was relase al you ned its to change only the config on build and all wil be ok all god
    - - -™®GaßYºº¹_25® - - -

  10. #10
    struct { int:-!!(1); } Aesir is offline
    SubscriberRank
    May 2015 Join Date
    MadnessLocation
    262Posts

    Re: Compile ArenaServer from the source code

    Quote Originally Posted by DragonLord View Post
    ... There's no difference between the arena and normal servers executables.
    Your reply has been pointless, I'm afraid.
    As long as ttlove in this tutorial used a preprocessor defined macro for build arena bins, i would say that rather the build process is slightly different.
    Thats why i would use a post build event ;)




Advertisement