[Development]Gunz GameServer

Mako is insane.
Decennium
Joined
Sep 10, 2007
Messages
968
Reaction score
815


That link is the current SVN I have setup for my emulator. As of right now I have login and character list done. Just a bit busy with family in town, I'll try to make it to channels by tonight.

Edit:
DB.sql
Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Character]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Character](
	[CID] [int] IDENTITY(1,1) NOT NULL,
	[AID] [int] NOT NULL,
	[Name] [varchar](16) NOT NULL,
	[Level] [int] NOT NULL DEFAULT ((1)),
	[Sex] [int] NOT NULL DEFAULT ((0)),
	[Head] [int] NULL DEFAULT ((0)),
	[Body] [int] NULL DEFAULT ((0)),
	[Hands] [int] NULL DEFAULT ((0)),
	[Legs] [int] NULL DEFAULT ((0)),
	[Feet] [int] NULL DEFAULT ((0)),
	[WeaponPrimary] [int] NULL DEFAULT ((0)),
	[WeaponSecondary] [int] NULL DEFAULT ((0)),
	[Melee] [int] NULL DEFAULT ((0)),
	[ItemPrimary] [int] NULL DEFAULT ((0)),
	[ItemSecondary] [int] NULL DEFAULT ((0)),
	[RingPrimary] [int] NULL DEFAULT ((0)),
	[RingSecondary] [int] NULL DEFAULT ((0)),
	[CLID] [int] NULL DEFAULT ((0)),
	[Kills] [int] NULL DEFAULT ((0)),
	[Deaths] [int] NULL DEFAULT ((0)),
	[TimePlayed] [bigint] NULL DEFAULT ((0)),
	[MatchesWon] [int] NULL DEFAULT ((0)),
	[Index] [int] NULL DEFAULT ((0)),
	[Face] [int] NULL DEFAULT(0),
	[Hair] [int] NULL DEFAULT(0),
	[BP]	[int] NULL DEFAULT(0),
	[XP]	[int] NULL DEFAULT(0)
 CONSTRAINT [PK_Character] PRIMARY KEY CLUSTERED 
(
	[CID] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Account]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Account](
	[AID] [int] NOT NULL IDENTITY(1,1),
	[UserID] [varchar](32) NOT NULL,
	[Password] [varchar](64) NOT NULL,
	[UGradeID] [int] NOT NULL,
	[PGradeID] [int] NOT NULL,
	[Name] [varchar](20) NULL,
	[Email] [varchar](50) NULL,
	[LastIP] [varchar](20) NULL,
	[LastConnectDate] [datetime] NULL,
 CONSTRAINT [PK_Account] PRIMARY KEY CLUSTERED 
(
	[AID] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
 
SVN Commit Log:

5/14/2009 7:22 PM - Updated Networking Code.
5/14/2009 11:21 PM - Finished Character Info Response Packet
5/15/2009 9:01 AM - Fixed character list & info. Added character creation & deletion.
5/15/2009 2:36 PM - Huge update. Added database, character select, channel recommend, channel join, channel player list, channel chat.
 
Last edited:
Uhh, it's an emulator? Go compare my code to RoA's I make sure you send a legit packet and my networking code is actually good. Also, my SQLManagment is thread safe unlike his x=
 
After 1 1/2 days. Wat.
ThePhailure772 - [Development]Gunz GameServer - RaGEZONE Forums
 
Testing Channel Chat, Still Tying to fix lobby list QQ

[mod]
Screenshot removed due the content of racism text on it. [/mod]
 
Last edited by a moderator:
Great ... and whats an advantage in having this ?

It can actually support multiple Client connections, RoA's can't, lol.

How to Obtain the SourceCode


GZGameServer SVN:

Step 1: Installing a Subversion client

To checkout (download) the source code you must first have a SVN client. Install one of the following:

- is a GUI client for Windows. Recommended for Windows users. It integrates into Windows Explorer, however, will not do so on any server edition. It's recommended to use one of the below clients instead.
- is a GUI client built into Visual Studio.
- is a GUI client similar to TortoiseSVN for Mac OS X. Recommended for Mac OS X users.
- is a GUI client which has both a Windows and Linux version.
is the official client. It does not have a GUI. Recommended for all other operating systems.


Step 2: Checking out

TortoiseSVN
Create a new folder at C:\GZGameServer (or any other folder name). Go there, right click and choose SVN Checkout. Enter the URL above and leave the revision box blank (unless you want to download an older version). Press OK to checkout the source code.

SCPlugin
Create a new folder wherever you want then enter the folder, right click, select subversion then check out basically like TortoiseSVN.

RapidSVN
Select Repository -> Checkout... or press Ctrl + O. Enter the URL above in the first textbox, and either type in or browse to the folder to checkout the source to in the second textbox. It is recommended to leave checkboxes at their default settings. Click OK.
To update in the future, select the entry under the Bookmarks tree, right-click and select Update... or press Ctrl + U.

Subversion
svn checkout --username anonymous <repository URL from above> and press enter. Press enter again if you are prompted for a password.

Ankh for Visual Studio 2008
Tools -> Checkout repository -> fill in head (you have to select it), source = enter your repository URL -> give it a nice spot on your hard drive -> login in with username anonymous and it should work (no password).

Step 3: Compiling

You'll need Microsoft Visual C# to be able to compile the SourceCode. Refer to another manual for that, it'll take ages to teach you C#.
 
You did all that in 1 1/2 days?!
Wow, that is good!
Was kinda hopeing for a c++ emu. ;-(

@pirit, I think RoA's emu. does allow more than 1 client. paulbub fixed it I belive.
 
You did all that in 1 1/2 days?!
Wow, that is good!
Was kinda hopeing for a c++ emu. ;-(

@pirit, I think RoA's emu. does allow more than 1 client. paulbub fixed it I belive.


A CPP Emu isn't in any bit easy, and could take weeks of work, most likely more. Jacob's been patching this Emu in just barely 5 minutes with me on MSN, C# is just perfect for the GunZ Emulator job.
However, C# code can be translated to CPP, but it needs an experienced Developer and it mot likely would be in GNU C since that would be the only reason to make a CPP Emulator, lol.

And RoA's emulator didn't allow more than 1 client before paulbub fixed it, lol.
 
PaulBub didn't fix anything in mine as far as I know. And I honestly don't mind if Jacob's is better than mine. He has a lot more experience than I do and I doubt I'll make much progress on mine as it is. I'm not motivated. I haven't played this crappy game in well over 2 years. It's just been a fun little distraction. But I'm gonna be working 40 hours a week this summer and getting ready for college. Not to say I won't work on mine, but if he follows through on his then there's no point in keeping mine public.

Also, keep in mind that he's making fast progress because this is just a rewrite of his old one. He's implemented the protocol before in many forms, this is my first time dealing with Gunz's protocol, I had a lot of stuff to learn.

But whatever, competition in Gunz isn't my thing. Looks good, congrats.

Uhh, it's an emulator? Go compare my code to RoA's I make sure you send a legit packet and my networking code is actually good. Also, my SQLManagment is thread safe unlike his x=

And I will admit that my networking code sucks, it was a hackjob and I suck with networking. But I do check if the packets are legit, UID checks are in place on everything that sends a UID.
 
PaulBub didn't fix anything in mine as far as I know. And I honestly don't mind if Jacob's is better than mine. He has a lot more experience than I do and I doubt I'll make much progress on mine as it is. I'm not motivated. I haven't played this crappy game in well over 2 years. It's just been a fun little distraction. But I'm gonna be working 40 hours a week this summer and getting ready for college. Not to say I won't work on mine, but if he follows through on his then there's no point in keeping mine public.

Also, keep in mind that he's making fast progress because this is just a rewrite of his old one. He's implemented the protocol before in many forms, this is my first time dealing with Gunz's protocol, I had a lot of stuff to learn.

But whatever, competition in Gunz isn't my thing. Looks good, congrats.



And I will admit that my networking code sucks, it was a hackjob and I suck with networking. But I do check if the packets are legit, UID checks are in place on everything that sends a UID.

Server wise I've only done a bit. Client I understand like 90% of it. I just figured the UDP out actually.
 
A CPP Emu isn't in any bit easy, and could take weeks of work, most likely more. Jacob's been patching this Emu in just barely 5 minutes with me on MSN, C# is just perfect for the GunZ Emulator job.
However, C# code can be translated to CPP, but it needs an experienced Developer and it mot likely would be in GNU C since that would be the only reason to make a CPP Emulator, lol.

And RoA's emulator didn't allow more than 1 client before paulbub fixed it, lol.

C# is not perfect for GunZ Emulator job nor is it perfect for any emulator.

Networking wise, the best language to choose to code any emulator in, no matter what it is, is C or C++. Take my word for it.
 
Back