Old Wiki:Category The EVEmu Guide

From EVEmu Wiki
Jump to navigation Jump to search
NAVIGATION HOME / EVEmu Development / Getting Started / The EVEmu Guide (you are here)

Contents



Purpose and Status

Okay, so the idea of this is to give people an understanding of how the evemu solution as a whole functions, all the way down to the individual components of the source code. I plan on breaking it down by project, then by source code files, and eventually by functions (but don’t hold your breath). Also, I will probably complete these out of order as the section I write about depends completely up how much work I feel like doing at the time, my amount of free time, and most importantly, which section I am currently applying fixes to. So far, though, we have executive summaries of the top blocks of the code base and these are presented below.

At a glance

When you first open the solution, you are immediately bombarded with a huge number of source code files, many of which functions are not quickly discernible. Their general function may be apparent, such as LookupService?.cpp, which handles calls to the server that request a database query from the player, such as ‘Find all characters of xyz name’ or ‘Find station named ‘abc’'. However, how it actually performs this, and what other functions and files it calls upon to do this may not be as easy to determine.

The EVEmu solution is broken into 6 parts as listed below.

Each one of these parts handles various functions and, when compiled together, they form the evemu server. The solution is essentially organized as follows. Everything except the eve-server project is compiled for the explicit reason of compiling the eve-server. The eve-server project is the only one that produces an actual executable file. All of the others contain service and function dependencies that are used by the eve-server.

eve-core

The eve-core project handles parsing and executing database queries, logging system events, all packet collection and dissemination, the actual server connection, and resource locking, also known as mutex (short for mutual exclusion).

While you may not realize it at first, the eve-core project is vital for the ability of this project to compile cross platform. Besides containing most of the include files necessary for compilation like ctime, cassert, etc, it includes a large number of custom type definitions that allow the same code to compile on both platforms. For example, uint32 is not a recognized identifier in Visual Studio. Instead you have to use unsigned _int32. To simplify this, a typedef is used, so that Visual Studio interprets uint32 as unsigned _in32. The same is done for linux systems, but instead of unsigned _in32, its uint32_t typedef'd to uint32. Though this, and many other definitions and preprocessor directives, the entire solution is able to compile on both unix based and windows systems. The eve-core project also contains the utility functions and classes that are used many times in the other projects, such as classes for string manipulation (found in utils_string.h)

eve-common

The eve-common project handles, among many things, object caching, query result formation, Client Connection Sessions, Packet encoding, Packet Typecasting, and a multitude of error reporting.

The eve-common project is necessary for the eve-server project to function as a server. It contains almost all of the support functions that allow the eve-server project to handle calls from the client, along with how to format responses, manage cached objects, and talk with the database. As explained in the previous section, the eve-server receives a call from the client, and from that call sends the arguments off to the correct service manager which calls the appropriate service, does whatever it needs to do, and returns the response to the client. However, there is a lot that goes on between the call being received and the arguments being sent to the appropriate service manager. See the main article for more information.

eve-server

The eve-server is the primary executable. This project contains the actual program loop during which all server functions are performed. It also contains the code to create those services, that handle everything from docking, to warping, to the market. Probably the most integral part of the evemu source code, the eve-server is where those of you who decide to add to the source code will spend the majority of your time.

First off, this is the only one of the projects that actually compiles into anything that we actually use. Some may say that makes it the most important, but all I'll say about it is that it makes it the easiest to work with, because all of the framework necessary to code in it is already in place in the other projects.

eve-test

Our unit testing framework.

eve-xmlpktgen

The XML Packet Generator (eve-xmlpktgen) project handles all of the XML packets (decoding, constructing, encoding etc…) used by the server. It takes xml-like structures in xmlp files underneath src/eve-common/packets/xmlp and creates C++ classes for each of the structures. Those classes are then used by eve-server internal classes and functions for decoding packets received by the server and encoding packets sent by the server.

EVEmu Server Support Tools

The last few projects are much smaller than eve-server, but no less important. Both of these two projects fall under the ones that you shouldn’t mess with unless you really know what your doing.

EVEmu Control Panel

At this point, it has been strongly suggested that functions for this EVEmu Control Panel be implemented inside DB Editor.

The EVEmu Control Panel is currently an idea that has not started development, but would be a tool that provides EVEmu server administrators the capabilities of controlling many various aspects of how their EVEmu server runs. To mention but a few, these could be how asteroid belts spawn, how rats spawn, what kinds and where, how wormholes spawn, what kinds and where, and even more specific interesting changes to the game that the official EVE Online live server will NEVER do, such as make Local chat in ALL solar systems act just as it does inside a wormhole: you can't know who's in-system unless they dock at a station you are currently inside, or they start chatting in Local. Check out the link in the heading to access the main wiki page for this tool and start contributing ideas toward this tool.

eve-tool

Eve-tool is a fairly small project that contains internal server commands and functions used by the server to interact with the database and other files (log, config etc..). It is useful for decoding packets and other information gathered from the live server.

This category currently contains no pages or media.