Frequently Asked Questions (FAQ)
Contents
1. How do I compile and Install Hedgewars
a. Debian specifics
2. How do I...(in-game key bindings)?
3. CMake can not find my Qt installation
4. How can I watch demos I downloaded from 'Demos'?
5. Network game does not work for me!
6. Why Qt4?
7. I'm experiencing resolution issues with my dual monitor setup and an nVidia card under Linux, what should I do?
1. How do I compile and install Hedgewars?
To compile and install you need:
-
Qt >= 4.4
-
FreePascal >= 2.2.0
-
SDL >= 1.2.5
-
SDL_net >= 1.2.5
-
SDL_mixer >= 1.2
-
SDL_image >= 1.2
-
SDL_ttf >= 2.0
-
CMake >= 2.6.0
- cmake
- qt4-qmake
- libqt4-dev
- libsdl1.2-dev
- libsdl-net1.2-dev
- libsdl-mixer1.2-dev
- libsdl-image1.2-dev
- libsdl-ttf2.0-dev
- fpc
( aptitude install cmake qt4-qmake libqt4-dev libsdl1.2-dev libsdl-net1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev fpc )
1. Configure:
$ cmake .
or
$ cmake -DCMAKE_CXX_FLAGS="flags" -DCMAKE_INSTALL_PREFIX="install prefix" -DDATA_INSTALL_DIR="data dir" -DWITH_SERVER=1
2. Compile:
$ make
3. Install:
# make install
That's all! Enjoy!
2. How do I... (in-game key bindings)?
Switch between fullscreen and windowed mode:
Press 'F12' key
Pause the game:
Press 'P' key
Move camera to current hedgehog:
Press 'H' key
Make a screenshot:
Press 'C' key
Switch weapon:
Press 'F1'-'F9' keys, or use menu, accessible via right mouse button click
Sound volume up/down:
'0' key is for volume up, and '9' key is for volume down
Aim precisely:
Press left shift key
Set grenade timer:
Press '1'-'5' keys
Control the direction of Air Attack:
Press 'left arrow' or 'right arrow' key
Construct different girders:
Press 'left arrow' or 'right arrow' key when using construction tool
Speed up demo playing:
Press 'S' key
Enter chat message:
Press 'T' key
View chat history:
Press '`' key
3. CMake can not find my Qt installation
tell cmake a path to Qt manually:
$ export QTDIR=<qt dir>
or
$ cmake -DQT_QMAKE_EXECUTABLE=<path to qmake>
4. How can I watch demos I downloaded from 'Demos'?
Copy the .hwd_12 file to: ~/.hedgewars/Demos/ in *nix,
or %USERPROFILE%\.hedgewars\Demos\ in Windows
5. Network game does not work for me!
Check your firewall configuration before reporting a bug. Hedgewars needs 46631 TCP port opened at the server side. LAN must also provide UDP datagrams broadcasting for automatic server discovery
6. Why Qt4?
Because we need a portable and easy to maintain GUI widgets for game and options setup.It would be unreasonable to maintain self written GUI. Currently we have no time and manpower for it. We are interested in developing a game and game features, not to implement our own crossplatform GUI library/framework.
7. I'm experiencing resolution issues with my dual monitor setup and an nVidia card under Linux, what should I do?
X.org supports something called "MetaModes" which lets you define different resolutions in X that you can instantly switch to without having to restart the X server or log out.
This example is only tested on a computer with an integrated nvidia chip, but should work with different graphic devices as well.
Find the resolution of your two monitors.
If you're using nvidia, run nvidia-settings, then click the X Server Display Configuration item in the tree view to the right.
Your screens will show the correct resolutions in the left part of the configuration window.
Note down the resolutions.
Open your xorg.conf file (usually located in /etc/X11/xorg.conf), and scroll down to the "Screen" section.
Comment out any "Option MetaModes ..." lines you may have there already, by putting a # in front of the line (should look something like "#Option MetaModes ..." after commenting it out).
Now, paste the following line in, under the line you commented out:
Option "MetaModes" "1680x1050,1600x1200;NULL,1600x1200;1680x1050,NULL"
The "MetaModes" setting is a semicolon-separated list of resolution combinations, defined like this:
"screen1,screen2". The first resolution should be whatever your currently running.
The second one in this example says that "screen1" should be off (NULL), and screen2 should run with 1600x1200 resolution. Use whatever you had in your nvidia-settings for your screen2.
The third one is similar, just the other way around, with the second monitor (screen2) turned off, and the first monitor running with maximum resolution.
The fourth one in my example has the first monitor running with max resolution (because it is the one that provides the *tallest* resolution (1050)), and the second one running the highest resolution that gives me the same height (1050).
Now, save this file, log out and log back in. (You may have to restart your X server - if so, just log out, press CTRL+ALT+Backspace, and then log in).
In hedgewars, in the screen section, you should now have several resolutions to choose from!
As an added bonus, you can also change the resolution on the fly in your Desktop Environment (GNOME or KDE), by running the screen resolution configuration tool (krandrtray in KDE, "Screen Resolution" in GNOME), and switch to any of the metamodes you defined earlier.