[airstrike] Hi, new to game, didn't find how to play anywhere

Eero Tamminen oak at helsinkinet.fi
Fri Jan 15 14:29:40 EST 2010


Hi,

On Thursday 14 January 2010, bc wrote:
> Is there a file with what keys to use to operate?

The can be configured from the "defaults" config file which content
looks like this:
-----------
player1_control {
  joy_no 2
  joy_threshold 32767
}
-----------

You can configure there also keys (Airstrike accepts both keys and joystick 
at the same time).  From the source you can see which keywords it
accepts in the config file:
      key_conf = conf_section(rc_user_conf(),"player1_control");
      ai->key_accelerate = conf_number(key_conf,"accelerate",SDLK_UP);
      ai->key_break = conf_number(key_conf,"break",SDLK_DOWN);
      ai->key_left = conf_number(key_conf,"left",SDLK_LEFT);
      ai->key_right = conf_number(key_conf,"right",SDLK_RIGHT);
      ai->key_fire = conf_number(key_conf,"fire",SDLK_RSHIFT);
      ai->key_drop = conf_number(key_conf,"drop",SDLK_RCTRL);
      ai->key_suicide = conf_number(key_conf,"suicide",SDLK_BACKSPACE);

You can configure also joystick directions there:
  /* use first joystick for player one, second for player two as default */
  ai->joy_no = conf_number(key_conf,"joy_no",player_nr-1);
  /* default joystick configuration is the same for every player */
  ai->joy_threshold = conf_number(key_conf,"joy_threshold",JOY_THRESHOLD);
  ai->joy_accelerate = conf_number(key_conf,"joy_accelerate",JOY_AXIS1_NEG);
  ai->joy_break = conf_number(key_conf,"joy_break",JOY_AXIS1_POS);
  ai->joy_left = conf_number(key_conf,"joy_left",JOY_AXIS0_NEG);
  ai->joy_right = conf_number(key_conf,"joy_right",JOY_AXIS0_POS);
  ai->joy_fire = conf_number(key_conf,"joy_fire",JOY_BUTTON0);
  ai->joy_drop = conf_number(key_conf,"joy_drop",JOY_BUTTON1);
  ai->joy_suicide = conf_number(key_conf,"joy_suicide",JOY_BUTTON3);

It's many years since I touched airstrike code, but I think the values you
need to use for these things are SDL key values.  Those you can check
from the SDL_keysym.h header which usually resides in /usr/include/SDL/.


	 - Eero


More information about the airstrike mailing list