Difference between revisions of "MG/FAQ"

From MegaGlest
Jump to navigation Jump to search
(hint on empty server list added, improved graphics driver instructions, page restructured)
 
(move linux manual install instructions to advanced section)
Line 79: Line 79:
  
  
===Installation===
+
===Advanced topics===
  
 
====On Linux, how do I install into my home directory?====
 
====On Linux, how do I install into my home directory?====
Line 114: Line 114:
  
 
You can, of course, also create a shortcut on your favourite window manager so that you just need to point and click to start the game in the future (and need not play around in a terminal window anymore).
 
You can, of course, also create a shortcut on your favourite window manager so that you just need to point and click to start the game in the future (and need not play around in a terminal window anymore).
 
 
===Advanced topics===
 
  
 
====Which hotkeys are there and how do I redefine them?====
 
====Which hotkeys are there and how do I redefine them?====

Revision as of 17:21, 2 October 2010

Frequently asked questions on MegaGlest

Graphics issues

I get an error stating MegaGlest needs an OpenGL version of at least 1.3 to work - what does this mean?

Answer: You likely need either updated video drivers or your video card. It could also be that your hardware is just too old or you bought hardware which is badly supported on your operating system by its manufacturer (hint: buy something else next time!). But don't give up just yet, read the Where can I get newer video drivers? section below.

Where can I get newer video drivers?

This depends much on your operating system.

Linux users should first check whether their distribution provides 'backported' drivers for their graphics card and if so, try them. For example, if you run Ubuntu, have a look at the X Updates PPA and the 'drivers-only' section of the xorg-edgers PPA. Be aware, though, that these are not fully supported - read the instructions on this page. Another option is to install a vendors binary driver. Those are often available through your Linux distributions' package repositories, too, and are often in better shape than those you could download from your vendors website. In case of Ubuntu, have a look at their BinaryDriverHowto.

If you run Windows, get the latest drivers available from your video card manufacturer. If you have a laptop, get them from your laptop manufacturer instead. If you have legacy hardware the drivers your hardware manufacturer provides have not had recent updates, you can try patched drivers. These are current vendor drivers which have been modified to work with older hardware as well as with laptops where the laptop manufacturer fails to provide driver updates (but the original video card drivers refuse to be installed) and to introduce additional features. For example, patched ATI drivers for [hardware] and for [hardware] are available. Note that these are not official drivers, and that nobody will guarantee you anything when using them (but then, many people use them and it usually works fine for them).

My Frames Per Second (FPS) are horrible, what can i do?

Answer: If you are a Linux user TURN OFF Compiz, as It can drop FPS for 3D games from 500FPS to 70FPS! Also disable synch to vblank:

Otherwise try the following settings by adding or editing them in glestuser.ini

AutoMaxFullScreen=false
CheckGlCaps=true
ColorBits=16
DepthBits=16
Filter=Bilinear
FilterMaxAnisotropy=1
MaxLights=1
PhotoMode=false
RefreshFrequency=75
ScreenHeight=768
ScreenWidth=1024
ShadowTextureSize=256
Shadows=Disabled
StencilBits=0
Textures3D=false
UnitParticles=false

You may (on Linux) also try running these commands from your mega-glest root folder (then retry running MegaGlest):

mkdir lib_bkp
mv lib/* lib_bkp/
cp lib_bkp/libcurl* lib/
cp lib_bkp/libgnu* lib/
cp lib_bkp/libicu* lib/
cp lib_bkp/liblua* lib/
cp lib_bkp/libxerces* lib/

My mouse seems to move sluggish, too slow or too fast

Answer: This could be for many reasons. (see references to DGAMOUSE on libsdl.org). Alternately, you may edit glestuser.ini and add this entry (or change it if it already exists but is currently set to 'false' or '0'):

No2DMouseRendering=true


Network gaming

How can I host a MegaGlest game?

Answer: Most domestic Internet connections are setup (for security reasons) to require port forwarding to make a service, such as MegaGlest, available on the Internet. Port forwarding is usually configured on your Internet router/modem/access device. How to do this is explained on a separate web page.

What network ports must be open for network play? How do I configure my firewall?

The network game interface window displays the actual port number used by MegaGlest. The default port number is specified in glest.ini:

ServerPort=61357

If you need to change it, do it by adding the same setting to glestuser.ini but customize the port number as needed. If a user who will be hosting a game changes this port number, then all users wanting to join this server must also change their port numbers. TCP is used for all game communication. In a LAN setup the server will use UDP to broadcast to clients on the same network that it is waiting for clients to connect.

Since v3.3.5 it is possible to seperate the 'External' port from the 'Internal' port. The 'External' port is the port exposed to the outside world (Internet) and is usually the entry point into your network via a router. This 'External' port is the port that other users will see, and require to connect into your network. When you create a network game by selecting a 'Network' slot in the custom game menu you will see the 'External Port #' option at the top of the screen. By default we use TCP port 61357 but users may pick from a list of various port numbers (the one you pick must be setup on your router / firewall to 'Port Forward' incoming connections from the Internet to your computer). This list of External Port numbers is configurable as a property in glestuser.ini, e.g.:

MasterServerExternalPortList=61357,80,143,587,21,110,25,443,993,995

The 'Internal' Port is the port that Mega-Glest itself will listen on for connections. This Internal Port # is set via a property in glestuser.ini (overwriting the default value contained in glest.ini):

ServerPort=61357

For LAN Games clients will look for servers using this port #. For Internet Games, Clients will ask the Master Server for the 'External Port' sent to it by a Mega-Glest User who will be hosting a Game.

Users should therefore configure their router / firewall to 'Port Forward' The External Port they will use in the Custom Game Menu (default is 61357) to their Internal Port (configured in glest.ini or glestusers.ini, default is 61357).

Why is the list of game servers mostly empty?

Answer: There's several reasons to this:

  • To date, MegaGlest games are only displayed on this list as long as players can join it. This means that currently running games are not listed, nor are servers listed which have all their network slots filled already. We are considering to change this behaviour to also list games which have already started, so that you can join this game as an observer.
  • MegaGlest is pretty new (Glest is much older but didn't have this feature), so not so many people know this game, yet. You can change this! Tell your friends about it and host a game for them and for others.
  • There is not currently a dedicated/headless game server version of MegaGlest, yet. As such, it's not currently possible to just install MegaGlest on an Internet server and have it host random or pre-programmed games automatically. This may change some day, too, but it involves quite a bit of engineering, so it can take a while to happen.

Using Windows 7, I cannot connect to a server that is hosting a game on my LAN, help!

Answer: This may be caused by the Windows Firewall be turned on for Private Networks. Disable the Windows firewall for private networks and you should be able to click Find games to find a hosted server on your LAN.

Can I play MegaGlest with friends who run a different operating system?

Answer: Yes, you can. To date, you can play cross-architecture on Linux (tested: Debian 5.0, Ubuntu 10.04, Fedora Core 13, OpenSuSE 11.3, Mandriva 2010) and Windows (tested: XP/7, both 32 and 64 bit), and there is experimental support for Mac OS X and FreeBSD.


Advanced topics

On Linux, how do I install into my home directory?

Answer: The Linux installer always installs into your home directory, not system-wide. But if you don't like to rely on the installer to set things up for you then you're welcome to do your own installation instead. Here's how:

You'll want to ensure you have 7-zip installed so that you can unpack the data package. On Debian and its derivates (Ubuntu etc.) you can use:

sudo apt-get update && sudo apt-get install p7zip-full

Then create a new directory the game will be placed in (for MegaGlest version 3.3.5 in this example):

cd
mkdir megaglest-3.3.5
cd megaglest-3.3.5

Now you need to download the "Linux XX bit x86 binaries" and the "full data package". What XX is depends on the architecture your Liux distribution is optimized for. On Debian and its derivates (Ubuntu etc.) you can use the arch command to determine what you have. If the arch command doesn't work for you, try uname -m instead. If it says x86_64 then you want the 64 bit version of the game, otherwise use the 32 bit version.

For example, to download the 64 bit Linux version:

wget 'http://sourceforge.net/projects/megaglest/files/current_release/megaglest3.3.5_i386_64_linux_bin.tar.bz2/download'
wget 'http://sourceforge.net/projects/megaglest/files/current_release/megaglest-data-3.3.5.7z/download'

Now extract the archives (I'm using the 64 bit file names again in this example) in the directory you are in:

7z x megaglest-data-3.3.5.7z
tar xjvf megaglest3.3.5_i386_64_linux_bin.tar.bz2

...and play!

./glest

Next time you want to play, you just need to:

cd ~/megaglest-3.3.5
./glest

You can, of course, also create a shortcut on your favourite window manager so that you just need to point and click to start the game in the future (and need not play around in a terminal window anymore).

Which hotkeys are there and how do I redefine them?

Answer: Look at glestkeys.ini (you may override these defaults by making override changes to glestuserkys.ini).

What optional command line options exist?

Answer: There are several command line options to date and more will likely be added in the future.

An example for a command line option is:

--version

This command gives you the version of MegaGlest you have installed. To be able to execute this command you will need to open a command line windows/terminal window first. To do this on Windows, click 'Start'->'Run'/'Search'-> cmd.exe, then use the 'cd' command to change to the directory MegaGlest is installed in. You can then run the game with command line options:

C:\Code\megaglest\branches\release-3.3.5.1\data\glest_game>glest_game --version
v3.3.5.1-alpha3 built: Jul 19 2010 10:52:07 Compiled with VC++: 1500, STREFLOP enabled.
--opengl-info


Another example:

--opengl-info

gives you information on your video card driver:

C:\Code\megaglest\branches\release-3.3.5.1\data\glest_game>glest_game --opengl-info
OpenGL Info:
   OpenGL Version: 2.1 Chromium 1.9
   OpenGL Renderer: 2.1 Chromium 1.9
   OpenGL Vendor: Humper
   OpenGL Max Lights: 8
   OpenGL Max Texture Size: 8192
   OpenGL Max Texture Units: 4
   OpenGL Modelview Stack: 32
   OpenGL Projection Stack: 4

Starting with 3.3.5.1 beta1 we will allow you to run with a special command line parameter to test your techtrees for known misconfigurations. Example (this time run on Linux) shown below:

./glest.bin --validate-techtrees
...
Errors were detected:
=====================
The Unit [archer] in Faction [norsemen] has the command [hold_position]
which has upgrade requirement [training_field] but there are no units able to perform the upgrade!
...

Many more command line options exist. You can always use

--help

to list them all.

How can I install my own master server?

Answer: First of all, please think about whether it actually makes sense to do so. The MegaGlest project provides a freely usable, well-connected default masterserver setup for the community to use for network games played over the Internet. As such, we can think of very few, if any, good reasons why anyone would want to setup their own masterserver. MegaGlest is still a young project and there are not that many players, yet. Setting up a new MegaGlest masterserver will just divide an already small community, so we think this is neither fun for you nor for anybody else.

Nevertheless, in the virtue of free software, we want to make the master server source code available, too. Please understand, however, that we will not support your use of it beyond this FAQ entry unless you can provide convincing reasons why we should.

The PHP / MySQL masterserver source code can be found in the subversion repository in the source/masterserver directory. The masterserver currently only facilitates clients and servers so that they may find one another, it does not create a dedicated server for network games. This means that users who 'host' a network game may choose to 'publish' their game to the masterserver where other users may 'join' published network games (thus connecting directly to the hosted server player).

If for some reason a person wanted to setup their own masterserver you require:

  • a webserver that handles PHP (like Apache or IIS)
  • a MySQL database.

To set things up,

Edit config.php and edit the database values to match your server.

  1. FTP all the files in the masterserver folder in SVN to your webserver
  1. Create a MySQL database and import the createDB.sql scheme to create the appropriate database tables (you can use phpmyadmin or something similar to do so).
  1. Ensure all clients that will use your masterserver have the correct root URL to point to your server. Have them modify this setting in glestuser.ini so that it points to your master server:
Masterserver=http://megaglest.pepper.freeit.org/masterserver/

What are all the configurable game settings?

Answer: There are two categories of game settings, a) 'visible' settings which can also be changed by options in the game itself and b) 'invisible' settings which are typcially intended to be changed by more knowledgable users who understand the consequences of changing them and can only be changed by editing the glestuser.ini configuration file in the main MegaGlest directory.


a) Visible settings:

Property Name Default Value Description
AutoMaxFullScreen false When set to true this tells the game to set the video mode to the maximum fullscreen resolution (spanning all monitors)
ColorBits 16
DepthBits 16
FactorySound OpenAL The sound API to use, for Windows this includes: DirectSound8, OpenAL or None, for all other platforms: OpenAL or None
Filter Bilinear
FilterMaxAnisotropy 1
FontSizeAdjustment 0 This makes font sizes larger (+) or smaller (-)
Lang english The default language to display game text
MaxLights 3
NetPlayerName newbie Your Player name for network games
RefreshFrequency 75
ScreenHeight 768
ScreenWidth 1024
ServerIp This is the last Server IP Address that you connected to
Shadows Projected
SoundVolumeAmbient 80
SoundVolumeFx 80
SoundVolumeMusic 90
StencilBits 0
Textures3D 1
UnitParticles true When set to true this enables special graphical eye-candy particles for Units that support them
Windowed false When set to false the game runs fullscreen, otherwise it is a Window on your desktop


b) Invisible settings:

Property Name Default Value Description
AiLog 0 The log level when logging AI (CPU Player) activity
AiRedir false Redirect AI activity to the conole
AllowDownloadDataSynch false Do not use, untested download of network game content
AllowAltEnterFullscreenToggle false When true this allows players to press Alt-Enter to toggle between fullscreen and window mode
AllowGameDataSynchCheck false When true this will check map, tileset and techtree between client and server (for network games) to determine in the lobby if the xml's match or not and display the synch status in the lobby
AutoTest false
CheckGlCaps true
ConsoleMaxLines 7 The maximum # text lines to display in the game text console
ConsoleMaxLinesStored 20 The maximum # text lines to store for recall in the text console
ConsoleTimeout 20 # seconds before text disappears from the Text Console
DayTime 1000
DebugLogFile debug.log This is where normal game debug data will be logged
DebugLogFileNetwork This is where network game debug data will be logged
DebugLogFilePerformance This is where performance game debug data will be logged
DebugLogFileWorldSynch This is where network world synch game debug data will be logged
DebugMode false When true this enables normal debug logging
DebugNetwork false When true this enables network debug logging
DebugPerformance false When true this enables performance debug logging
DebugWorldSynch false When true this enables network world synch debug logging
DEFAULT_HTTP_TIMEOUT 10 This is the # seconds before HTTP requests will timeout
FactoryGraphics OpenGL
FastSpeedLoops 2
FirstTime false
FocusArrows true
FogOfWarSmoothing true
FogOfWarSmoothingFrameSkip 3
FONT_CHARCOUNT 256 This is the # characters expected for the selected font type
FONT_TYPENAME Times New Roman This is the Font Type to use
FontConsoleBaseSize 18
FontConsolePostfix -*-*-*-*-*-*-*
FontConsolePrefix -*-helvetica-*-r-*-*-
FontDisplayBaseSize 12
FontDisplayPostfix -*-*-*-*-*-*-*
FontDisplayPrefix -*-helvetica-*-r-*-*-
FontDisplaySmallBaseSize 12
FontMenuBigBaseSize 20
FontMenuBigPostfix -*-*-*-*-*-*-*
FontMenuBigPrefix -*-helvetica-*-r-*-*-
FontMenuNormalBaseSize 14
FontMenuNormalPostfix -*-*-*-*-*-*-*
FontMenuNormalPrefix -*-helvetica-*-r-*-*-
FontMenuVeryBigBaseSize 25
FullScreenAntiAliasing false When true this enables OpenGL full screen anti-aliasing
HardwareAcceleration false When true this enables OpenGL hardware acceleration
Masterserver http://megaglest.pepper.freeit.org/masterserver/ This is the path to the root of the master server URL's
MasterServerExternalPortList 61357,80,143,587,21,110,25,443,993,995 This is a comma seperated list of allowed External Network ports supported
MaxExploredCellsLookupItemCache 5000 This is the maximum cache size for cell explorered / visible lookup (0 disables)
MaxFrameCountLagAllowed 30 This is the maximum # of network frames that a client is allowed to fall behind before action is taken
MaxClientLagTimeAllowed 20 This is the maximum # seconds that a client is allowed to fall behind before action is taken
WarnFrameCountLagPercent 0.65 This is the % of the maximum threshold of the above reached when a client is warned they are falling too far behind
MaxUnitSelectCount 16 This is the maximum # of units that can be selected at one time
NetworkConsistencyChecks true When true this enforces client and server to have the same data for network games
NetworkFramePeriod 20 This is the # of frames that commands are sent out for network games
No2DMouseRendering false When true this forces the use of ONLY the operating system mosue (no mouse rendering is done in game)
PhotoMode false When true this disables things like the minimap so that nice screenshots can be taken
PlatformConsistencyChecks true When true it enforces the same version to be used for all platforms for network play
ServerPort 61357 The port to use when hosting games
ShadowAlpha 0.2
ShadowFrameSkip 2
ShadowTextureSize 512
SoundStaticBuffers 16
SoundStreamingBuffers 4
ThreadedSoundStream false When true this enables sound handling in a seperate thread (offloading some of the work from main game processing)
UserData_Root mydata/ This is the folder where user created maps, tilesets, techtrees, scenarios and tutorials are to be stored. This is the folder where user created content should go meaning game data that does not come with the Mega-Glest install packages. It is very important to keep user data seperate so that users making changes to their user data do not affect their ability to play network games with other players. Each time a network game is played a CRC check is done to ensure all players have the same data so that the game is fair and does not go "out of synch" with each other. User data should use UNIQUE naming and not use duplicate names that are already used in the main Maga-Glest folders. For example the main Mega-Glest folders contain a faction in the megapack techtree called tech. This same techtree and faction combination should NOT be reproduced in the mydata folder.
UserOverrideFile This optional parameter specifies the path and location of the glestuser.ini and glestuserkeys.ini files (if different than the default)