![]() |
l2c# [dev] team
Hi ppl...
More and more ppl post in this section. More ppl work on c# server. And i have an idea to found dev team. Together we'll make it faster and more powerful! If each person will do special work - we'll make it in 3-4 monthes... If you want to participate - PM me or contact via ICQ 203833915. |
I join!
So what we have (from my changelog): 20xx.xx.15 + World model: items and characters. + Game server: client packets - ProtocolVersion, AuthLogin. + Game server: server packets - KeyPacket, AuthLoginFail, CharSelectInfo. + Game server: finished network packet transfer and processing implementation. Many major optimizations in network layer: few threads per entire server, not per client, full asynchronious packet receiving, sending and processing. * Login server: some optimization in session handling. * Login server: now can determine if account in use or banned. 20xx.xx.13 * Work on game server started. 20xx.xx.13 * Login server now supports 530-555 and 560-... protocols. Use config parameters to define old or new auth method. + Login server: RSA crypting for protocol 560. + Login server: checksum for protocol 560. + Login server: terminating on Ctrl+Break pressed. What we need next: - Object world model (high accurate!) - Geodata and movement/shuting control (fast!) - NPC/mob server - Quests/events engine (very fast, but flexible!) Let's do it together, join as! We have many ideas to make this server better than official. |
So, what i have now:
complete LoginServer, ported from l2j part of GameServe to communicate with login configs, MySQL database engine, support of C# scripts |
20xx.xx.16
* All code ported to .NET 2.0 and VS 2005. * Login server: network model, now it is used thread pool, as in game server. * Login server: packet handler implementation now as in game server. |
Mb someone esle want to join?
|
pm me if youd like another dev. I have alot of experience with C# while working with my UO server ran on Runuo's UO emulator ( wich is written in C# ).
|
dota-allstars:)
|
I whant to join. What i know in c# - hard question for me :) That will be necessary - that and I shall make.
|
seems good so far...
but it's better to get it off with an organization model probably 1 person to head it... and manage all the people as well as allocation work to the rest of the programmers and keep track on everybody's progress and the code merging management. 1~2 designers to layout the framework and architecture of the program (it's better to keep this small, too many ideas, too little work done ;) n~ programmers, as long as they could program, they could probably come out with something n~ testers and debuggers, people who could test the system and relatively come out with solutions or even code fixes for them 1~2 documenter, people who document the code so that it is neat, tidy and has the same look, so as to let the rest of the people who use this (maybe API in the future) to understand the code and use it. wish u guys luck! as long as it's open source.. i'm sure there'll be massive amt of ppl who'd fill up those positions :) |
Ty digital:)
|
I can help, but really i never code in C#. Only Java,(i work in L2J a while). But, i can learn, and learn fast.
|
oh yeah...
maybe a slight change in the design might be good? 1~5 code implementors, people who would implement all the code for everyone that'll free all the programmers to come out with various solution (well we have to give credit who might come out with truely inspiration stuff ;) then on deciding the best solution then implement it :) more options = better solution on another note... how i wished i had time for this :| |
Quote:
|
|
Hi!
First, thanks who wants to join as! Work goes on. Now I'm working on world model with orientation to C4, and in few days I'll try to write requirements specifications for you. What was done: 20xx.xx.20 + Login server: new GGAuth packet to fake Game Guard authentication in C4. + World model: using persistent objects to read/write objects in world model. 20xx.xx.17 * Fixed: in some cases it is not properly determined if client disconnects. * Login server: send "access failed" to client, when selected game server is down. * Game server: when starts, it adds itself to available game server list sent by login server to client. ------------------- You can download current compilable sources from web page http://antonr.zakamsk.net/l2csharp/ |
jesus... not that i wanna spoil anything...
just some personal feelings... i wanna put out (aka bitching) :X the fact is... i have mssql2k5, mysql and even oracle installed on my desktop not to mention mssql2k, mysql on my laptop as well... and u had to choose firebird :S (pulls hair out) hopefully someone would write a universal version for multiple db support :p otherwise... in whatever free time i have i'd write a mssql version for it (sorry but imo i prefer using mssql ado.net is really fast and simple to use :\) |
Why not Pure C/C++ instead of C#?
It would be faster and would consume less resources IMHO... |
No, Megatron... C# has else way to work with memory...
But in general... No matter in what language u progging, c++ or c#... As for me... C# is easy... For me:) |
C# from what I've seen is Java.. ripped off. Nothing new from MS..
|
Quote:
|
doing it in c# is 10x faster then in c++
(programming wise, u think i'm kidding? i kid u not...) i cant uninstall them, i'm using them. :\ and furthermore.. y do i want open source for my database for? :? |
Digital, you can change file DBAdapter.cs to port it for database you like. I hope it will not take much time.
|
So, here is my source, i think it would usefull :) as I said I use MySQL, and now it works with existing l2j DB :) And it almost copy of l2j
BTW karioth, you're using standart ThreadPool... better use SonicNet lib :) I planed modify it for change threadpool priority :) |
Today I have added web scripts, currently they can view server status and register new accounts.
See http://antonr.zakamsk.net/l2csharp/ navy, thanks a lot, I'll try to use your code, if you allow :) |
Of cource ^_^
Think about SonicNet, cause .Net ThreadPool is low level priority threads |
Quote:
|
Quote:
Please contact the domain provider with questions. :shock: Sup with that? |
Quote:
Using ThreadPool.QueueUserWorkItem will still cause the ThreadPool to use the old .Net 1.0 and 1.1 lower level priority worker thread, which is fine for everything but mission critical operations that could take a long time. But using the new ThreadPool.UnsafeQueueNativeOverlapped will now use high performance I/O complete port threads, also all .Net asynchronous methods such as those that start with Begin or End (ie BeginReceive, EndDisconnect) now default to using the higher performance I/O CP threads for their workload. Furthermore .Net 2.0 introduced the SetMaxThreads and SetMinThreads methods to the ThreadPool which let you set the min or max number of both worker threads and I/O CP threads of the ThreadPool, thus breaking the limit of 25 available threads found in .Net 1.0 and 1.1. Unless for some reason you're using an insanely large amount of QueueUserWorkItem calls, I'd stick to using the default ThreadPool. |
Quote:
karioth, here the link http://www.codeproject.com/csharp/Ma.../Sonic_Net.zip Here the lib |
actually... the original database design n stored procedures from l2...
is really well thought out... if we could use it... it could really save us alot of time on designing and testing... since it's already a proven system. we probably just need to modify it abit to include the new stuff that's all. as for caching, logging and multi-auth/server handling... would have to spend time time thinking about it... but a simple prototype first would probably be very valuable and pull more developers into this area. (seriously we have alot of great people here, hopefully we could use back whatever we've build on l2off, hopefully by then we have fully working geodata and pathnodes ;) -out |
Quote:
I have another place to upload. |
well.. seriously didnt have time to design n code this up properly... :S
i'll attach the current file i have n an example of how to use ent lib in different situations... including transactions i could also provide an alternative logging code if u guys think it's needed. -out LINK HERE [Edit] i've so far only edited DBAdapter n the mssql version is in DBAdapterMSSQL.cs enjoy |
nice
nice work di :) thanks i go to help i whit for thats ;)
|
ops.. forgot to give examples :p
here we go... some simple uses of ent lib using System; using System.Data; using System.Globalization; using System.Text; using System.Xml; using Microsoft.Practices.EnterpriseLibrary.Data; using Microsoft.Practices.EnterpriseLibrary.Data.Sql; using System.Data.Common; namespace DataAccessQuickStart { /// <summary> /// Encapulsates access to the database. /// </summary> public class SalesData { public SalesData() { } /// <summary> /// Retreives a list of customers from the database. /// </summary> /// <returns>List of customers in a string.</returns> /// <remarks>Demonstrates retrieving multiple rows of data using /// a DataReader</remarks> public string GetCustomerList() { // DataReader that will hold the returned results // Create the Database object, using the default database service. The // default database service is determined through configuration. Database db = DatabaseFactory.CreateDatabase(); string sqlCommand = "Select CustomerID, Name, Address, City, Country, PostalCode " + "From Customers"; DbCommand dbCommand = db.GetSqlStringCommand(sqlCommand); StringBuilder readerData = new StringBuilder(); // The ExecuteReader call will request the connection to be closed upon // the closing of the DataReader. The DataReader will be closed // automatically when it is disposed. using (IDataReader dataReader = db.ExecuteReader(dbCommand)) { // Iterate through DataReader and put results to the text box. // DataReaders cannot be bound to Windows Form controls (e.g. the // resultsDataGrid), but may be bound to Web Form controls. while (dataReader.Read()) { // Get the value of the 'Name' column in the DataReader readerData.Append(dataReader["Name"]); readerData.Append(Environment.NewLine); } } return readerData.ToString(); } /// <summary> /// Retreives all products in the specified category. /// </summary> /// <param name="Category">The category containing the products.</param> /// <returns>DataSet containing the products.</returns> /// <remarks>Demonstrates retrieving multiple rows using a DataSet.</remarks> public DataSet GetProductsInCategory(int Category) { // Create the Database object, using the default database service. The // default database service is determined through configuration. Database db = DatabaseFactory.CreateDatabase(); string sqlCommand = "GetProductsByCategory"; DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand); // Retrieve products from the specified category. db.AddInParameter(dbCommand, "CategoryID", DbType.Int32, Category); // DataSet that will hold the returned results DataSet productsDataSet = null; productsDataSet = db.ExecuteDataSet(dbCommand); // Note: connection was closed by ExecuteDataSet method call return productsDataSet; } /// <summary> /// Updates the product database. /// </summary> /// <returns>The number of rows affected by the update.</returns> /// <remarks>Demonstrates updating a database using a DataSet.</remarks> public int UpdateProducts() { // Create the Database object, using the default database service. The // default database service is determined through configuration. Database db = DatabaseFactory.CreateDatabase(); DataSet productsDataSet = new DataSet(); string sqlCommand = "Select ProductID, ProductName, CategoryID, UnitPrice, LastUpdate " + "From Products"; DbCommand dbCommand = db.GetSqlStringCommand(sqlCommand); string productsTable = "Products"; // Retrieve the initial data db.LoadDataSet(dbCommand, productsDataSet, productsTable); // Get the table that will be modified DataTable table = productsDataSet.Tables[productsTable]; // Add a new product to existing DataSet DataRow addedRow = table.Rows.Add(new object[] {DBNull.Value, "New product", 11, 25}); // Modify an existing product table.Rows[0]["ProductName"] = "Modified product"; // Establish our Insert, Delete, and Update commands DbCommand insertCommand = db.GetStoredProcCommand("AddProduct"); db.AddInParameter(insertCommand, "ProductName", DbType.String, "ProductName", DataRowVersion.Current); db.AddInParameter(insertCommand, "CategoryID", DbType.Int32, "CategoryID", DataRowVersion.Current); db.AddInParameter(insertCommand, "UnitPrice", DbType.Currency, "UnitPrice", DataRowVersion.Current); DbCommand deleteCommand = db.GetStoredProcCommand("DeleteProduct"); db.AddInParameter(deleteCommand, "ProductID", DbType.Int32, "ProductID", DataRowVersion.Current); DbCommand updateCommand = db.GetStoredProcCommand("UpdateProduct"); db.AddInParameter(updateCommand, "ProductID", DbType.Int32, "ProductID", DataRowVersion.Current); db.AddInParameter(updateCommand, "ProductName", DbType.String, "ProductName", DataRowVersion.Current); db.AddInParameter(updateCommand, "LastUpdate", DbType.DateTime, "LastUpdate", DataRowVersion.Current); // Submit the DataSet, capturing the number of rows that were affected int rowsAffected = db.UpdateDataSet(productsDataSet, "Products", insertCommand, updateCommand, deleteCommand, UpdateBehavior.Standard); return rowsAffected; } /// <summary> /// Retrieves details about the specified product. /// </summary> /// <param name="productID">The ID of the product used to retrieve details.</param> /// <returns>The product details as a string.</returns> /// <remarks>Demonstrates retrieving a single row of data using output parameters.</remarks> public string GetProductDetails(int productID) { // Create the Database object, using the default database service. The // default database service is determined through configuration. Database db = DatabaseFactory.CreateDatabase(); string sqlCommand = "GetProductDetails"; DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand); // Add paramters // Input parameters can specify the input value db.AddInParameter(dbCommand, "ProductID", DbType.Int32, productID); // Output parameters specify the size of the return data db.AddOutParameter(dbCommand, "ProductName", DbType.String, 50); db.AddOutParameter(dbCommand, "UnitPrice", DbType.Currency, 8); db.ExecuteNonQuery(dbCommand); // Row of data is captured via output parameters string results = string.Format(CultureInfo.CurrentCulture, "{0}, {1}, {2:C} ", db.GetParameterValue(dbCommand, "ProductID"), db.GetParameterValue(dbCommand, "ProductName"), db.GetParameterValue(dbCommand, "UnitPrice")); return results; } /// <summary> /// Retrieves the specified product's name. /// </summary> /// <param name="productID">The ID of the product.</param> /// <returns>The name of the product.</returns> /// <remarks>Demonstrates retrieving a single item. Parameter discovery /// is used for determining the properties of the productID parameter.</remarks> public string GetProductName(int productID) { // Create the Database object, using the default database service. The // default database service is determined through configuration. Database db = DatabaseFactory.CreateDatabase(); // Passing the productID value to the GetStoredProcCommand // results in parameter discovery being used to correctly establish the parameter // information for the productID. Subsequent calls to this method will // cause the block to retrieve the parameter information from the // cache, and not require rediscovery. string sqlCommand = "GetProductName"; DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand, productID); // Retrieve ProdcutName. ExecuteScalar returns an object, so // we cast to the correct type (string). string productName = (string) db.ExecuteScalar(dbCommand); return productName; } /// <summary> /// Retrieves a list of products. /// </summary> /// <returns>A list of products as an XML string.</returns> /// <remarks>Demonstrates retrieving multiple rows of data as XML. This /// method is not portable across database providers, but is /// specific to the SqlDatabase.</remarks> public string GetProductList() { // Use a named database instance that refers to a SQL Server database. SqlDatabase dbSQL = DatabaseFactory.CreateDatabase() as SqlDatabase; // Use "FOR XML AUTO" to have SQL return XML data string sqlCommand = "Select ProductID, ProductName, CategoryID, UnitPrice, LastUpdate " + "From Products FOR XML AUTO"; DbCommand dbCommand = dbSQL.GetSqlStringCommand(sqlCommand); XmlReader productsReader = null; StringBuilder productList = new StringBuilder(); try { productsReader = dbSQL.ExecuteXmlReader(dbCommand); // Iterate through the XmlReader and put the data into our results. while (!productsReader.EOF) { if (productsReader.IsStartElement()) { productList.Append(productsReader.ReadOuterXml()); productList.Append(Environment.NewLine); } } } finally { // Close the Reader. if (productsReader != null) { productsReader.Close(); } // Explicitly close the connection. The connection is not closed // when the XmlReader is closed. if (dbCommand.Connection != null) { dbCommand.Connection.Close(); } } return productList.ToString(); } /// <summary> /// Transfers an amount between two accounts. /// </summary> /// <param name="transactionAmount">Amount to transfer.</param> /// <param name="sourceAccount">Account to be credited.</param> /// <param name="destinationAccount">Account to be debited.</param> /// <returns>true if sucessful; otherwise false.</returns> /// <remarks>Demonstrates executing multiple updates within the /// context of a transaction.</remarks> public bool Transfer(int transactionAmount, int sourceAccount, int destinationAccount) { bool result = false; // Create the Database object, using the default database service. The // default database service is determined through configuration. Database db = DatabaseFactory.CreateDatabase(); // Two operations, one to credit an account, and one to debit another // account. string sqlCommand = "CreditAccount"; DbCommand creditCommand = db.GetStoredProcCommand(sqlCommand); db.AddInParameter(creditCommand, "AccountID", DbType.Int32, sourceAccount); db.AddInParameter(creditCommand, "Amount", DbType.Int32, transactionAmount); sqlCommand = "DebitAccount"; DbCommand debitCommand = db.GetStoredProcCommand(sqlCommand); db.AddInParameter(debitCommand, "AccountID", DbType.Int32, destinationAccount); db.AddInParameter(debitCommand, "Amount", DbType.Int32, transactionAmount); using (DbConnection connection = db.CreateConnection()) { connection.Open(); DbTransaction transaction = connection.BeginTransaction(); try { // Credit the first account db.ExecuteNonQuery(creditCommand, transaction); // Debit the second account db.ExecuteNonQuery(debitCommand, transaction); // Commit the transaction transaction.Commit(); result = true; } catch { // Rollback transaction transaction.Rollback(); } connection.Close(); return result; } } } } |
Digital, will be better if u attach your file:)
|
i've my codes attached in the link above..
as for the example, it's taken from enterprise library jan 2006 quick start block -> data access block -> c# good luck to all ;) |
Hi, every1,
server in process, need any help how to use geodata from client files. |
hmm...
something like l2j's system? |
I think, using client geo is bad idea... I know how this work in l2j, blocked movement with keyboard arrow keys are bad a lot! And now some peoples starts making geodata for l2j for fix it.
Not need to repeat another's mistakes... |
if possible it'd be good to use back whatever we have for l2 off...
geodata, scripts, etc? as this will all could well be reused when we move on to c6 (massive reducation of redoing work that's already done?) and this will be where our jumping board would be... (at least that's what i hoped) karioth's already doing with the basic gameserver? :) (at least that's what i think? lol) |
| All times are GMT. The time now is 16:25. |