My favorites | Sign in
Project Logo
                
Search
for
Updated Dec 14, 2008 by se...@meowfishies.com
Input_System_Tweaking  
Describes configuration variables for changing the input system

Accelerometer

In the default mode, the accelerometer controls movement. You can reassign it to control the camera by setting the cl_accelLook cvar.

When controlling movement, tilting the phone away and toward yourself (pitch) will move the player forwards and backwards. Tilting the ends of the phone up and down lengthwise (roll) will move the player side to side (strafe). Neither of these motions will change the orientation of the camera while in this mode. To keep the player in one place, you must hold the phone in a neutral position. By default, the neutral position is tilted 35º away from the viewer. You can adjust this using the in_accelPitchBias cvar. See the section Configuration Variable Reference for details.

There is an area around this position, referred to as the "dead zone," so that you can tilt the phone a small amount without moving the player. You can adjust the size of the dead zone, measured as degrees away from the neutral position, using the cl_accelDeadZone cvar. See the section Configuration Variable Reference for details.

Once the accelerometer measures rotation outside of the dead zone, it moves the player in the direction of the rotation, scaling the amount of movement by the value of the cl_accelScale cvar.

Multitouch Interface

The touch interface is used in much the same way as mouse movements and clicks on a desktop machine.

Mouse click events are generated when you tap the screen. Holding down multiple fingers will trigger secondary mouse clicks. You can assign these clicks to different actions using the in-game menus, or by editing the default.cfg file when building Quake 3 from source.

Virtual Buttons

In the future you will be able to assign regions of the screen to actions. They will be exposed to the input system as joystick buttons. Look here soon for more details.

Configuration Variable Reference

The following cvars are available for adjusting the behavior of the input system:

Name Range Default Value Description
in_accelFilter 0.0 - 1.0 0.05 The accelerometer filtering factor. Controls how much of the current reading is incorporated into the overall accelerometer reading. A lower value will result in more smooth movement, where a larger value will result in quicker movement.
in_accelPitchBias ±180 -125 The pitch bias for accelerometer readings in degrees, relative to a reading of 0º when the screen is face up. This affects the neutral pitch of the device, where no movement will occur.
cl_accelDeadZone 0 - 180 3 The degrees of movement away from the neutral position that are considered part of the "dead zone." No movement will occur when the device is rotated fewer than this many degrees away from the neutral position.
cl_accelScale 0 - 127 8 The scaling factor applied to accelerometer movements. Accelerometer readings are measured in degrees away from the neutral position, which are then multiplied by this value. Floating point values are allowed.
cl_accelLook 0 | 1 0 The switch that enables "look mode" for the accelerometer input. When this option is set, the accelerometer controls camera movement instead of player motion.
cl_accelLookScale 0 - 180 0.5 The accelerometer "look mode" scaling factor. This option is only valid when cl_accelLook has a value of 1.


Comment by billysemail, Dec 22, 2008

Top work! My only complaint is with the touch interface. The controls are backwards! For example, If I move my finger to the right, my player will look left and viseversa. For me, that makes it hard to play.... Even when i invert the mouse in the game settings it only inverts directions Up and Down, not Left and Right.... Other then that. Well done.

Comment by mitiEn, Jan 08, 2009

To avoid inverse moving you should to set in /private/var/mobile/Library/Quake3/demoq3/q3config.cfg

seta m_yaw "-0.022" seta m_pitch "-0.022000"

Comment by lordofpandaria, Apr 15, 2009

The way carmack did it in the wolfenstein 3D port was really nice (two virtual joysticks on the screen, essentially). I am personally not a fan of the accelerometer for precise control. It might be useful as a firing mechanism, however.

Comment by Aet...@hotmail.com, Jul 06, 2009

Best control for movement and look: Space Trader Moon Madnesss. Right analog is a minitouch. Analog touch and tilt bad ideas, very bad ideas.

Comment by fidedu, Aug 10, 2009

Dual virtual joysticks so no tilt and would be perfect!!

Comment by raden.m.muaz, Aug 26, 2009

hack volume buttons to shoot. then use dual virtual joysticks to look and move. Anyway tilt IS A BAD IDEA.

Comment by i...@monkeysofdoom.org, Aug 31, 2009

Great project (as far as I can judge;-)

There are several videos of iphone-Q3 around on youtube. This one for example: http://www.youtube.com/watch?v=g64n3DylJfQ Is this your port?

For input/controls: I like the one used in "cube": http://www.fernlightning.com/doku.php?id=iphone:cube:start

Oh, and another project that might be interesting for you is Symbian-Q3: http://www.symbian-freak.com/forum/viewtopic.php?t=28906

Comment by kingoddball, Sep 15, 2009

Is there anything I can do to help?? I cant program software.... But there may be something to help with, no?

Also... Dual joy stick interface with be excellent!!


Sign in to add a comment
Hosted by Google Code