Can only move down and right.

Help regarding development/scripting, troubleshooting or just general gameplay -- anything that hasn't already been answered in the Wiki or pinned FAQs.

Moderator: Developers

shockhead
Acid Blob (New member)
Acid Blob (New member)
Posts: 5
Joined: Wed Dec 22, 2010 5:31 pm

Can only move down and right.

Post by shockhead »

Hi,

Just found egoboo. Looks fun :-)

But I'm having a bit of a basic problem - I can't move up or left. Pressing either the up arrow or down arrow moves the guy down and pressing either right or left moves him right. Not fun :-(

I'm in Linux, 64 bit. No errors being spat out that I can see anywhere...

Can anyone help?

Thanks!

P.S. Version 2.8.0.
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

It is possible that the problem is due to the camera control mode.

You can get to this value in-game by following the menus to Options->Game Options and clicking on the red button to the right of "Autoturn Camera" to change the setting.

Another option is that your keyboard controls are configured incorrectly. Go to Options->Input Controls. The default input that comes up first is the "Keyboard Player". Check out the "Controls" section and make sure that you have "Left: KEY_LEFT" and "Right: KEY_RIGHT". If not, or if you want to change the settings of these controls click on the red button to the right of the control and then hit the key that you want to use for that control.

Cheers!
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

Try changing from the default controls to use movement through the numpad for example. You could also try if the joystick works correctly.
shockhead
Acid Blob (New member)
Acid Blob (New member)
Posts: 5
Joined: Wed Dec 22, 2010 5:31 pm

Post by shockhead »

Thanks for the suggestions.

I have the keys set correctly - in fact I changed them to a few other things just to check and the same thing happened. Also, not the camera, but thanks. I also don't have a joystick.

I made a little progress though. I noticed that the mouse (well, actually the trackpad - I'm on a laptop) does move around the character correctly, so perhaps there's some interference? Can I disable mouse moving? I don't want to use that anyway.

Thanks again!
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

Try unplugging any joystick, gamepad, mouse or other external devices that might interfere with the input. I think this is a SDL bug.
shockhead
Acid Blob (New member)
Acid Blob (New member)
Posts: 5
Joined: Wed Dec 22, 2010 5:31 pm

Post by shockhead »

Okay - well I have no mouse, joystick or anything else plugged in. But, I do have a trackpad and trackpoint on the laptop - and I can't unplug them. I disabled the trackpad by flicking the hardware switch, but that didn't make any difference. The trackpoint I don't know if I can disable.

I suppose I could stop them from being detected by X (they're using the evdev driver) but then I'd have no mouse at all :-/

Is there some way I can get something useful out to help with debugging?
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

I am releasing 2.8.1 today. I think it works fine on Linux. Maybe you should wait until then.
ismael
Acid Blob (New member)
Acid Blob (New member)
Posts: 2
Joined: Mon Dec 27, 2010 2:05 am

Post by ismael »

after compiling and installing all dependencies .... general fighting for about a few hours....i have the same problem as the one mentioned in this thread using the 2.8.1 version....any recommendations

Also i thought its not best to start a new thread...
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

Maybe it's a general problem in Linux we haven't discovered (the game developers use windows).
ismael
Acid Blob (New member)
Acid Blob (New member)
Posts: 2
Joined: Mon Dec 27, 2010 2:05 am

Post by ismael »

an interesting bug ....any idea as to which file may be the culprit ...
shockhead
Acid Blob (New member)
Acid Blob (New member)
Posts: 5
Joined: Wed Dec 22, 2010 5:31 pm

Post by shockhead »

Zefz wrote:I am releasing 2.8.1 today. I think it works fine on Linux. Maybe you should wait until then.
Thanks, but I get the same behaviour with 2.8.1.
meaninglessidentifier
Acid Blob (New member)
Acid Blob (New member)
Posts: 1
Joined: Fri Jan 07, 2011 3:11 am

Post by meaninglessidentifier »

the problem seems to be with the way in which the keyboard state is translated to joystick positions in void set_one_player_latch( const PLA_REF player ) in game.c

specifically, it's around line 2060 where joy_pos.x and joy_pos.y are assigned.

doing math on bools and expecting floats apparently requires more care.

I just fixed it experimentally by assigning all of the boolean values returned by control_is_pressed to floats before doing any math on them

I'd submit a patch, but I'm sure someone else will be able to come up with a far better solution.
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

thanks for your help, meaninglessidentifier. That sounds like it could be the problem to me. At some time, I'm sure the logic was correct.

This actually might be a gcc-specific problem, since gcc requires enums to be unsigned (which is what btrue and bfalse are). Subtraction of one unsigned from another can give wacky results!
shockhead
Acid Blob (New member)
Acid Blob (New member)
Posts: 5
Joined: Wed Dec 22, 2010 5:31 pm

Post by shockhead »

meaninglessidentifier wrote:I'd submit a patch, but I'm sure someone else will be able to come up with a far better solution.
Thanks for this! If someone can provide a patch, I'm happy to test it :-)
Zommes
Acid Blob (New member)
Acid Blob (New member)
Posts: 2
Joined: Sun Jun 26, 2011 12:37 am

Re: Can only move down and right.

Post by Zommes »

Hello,

I just installed Egoboo succesfully but I'm not able to play because of the same problem TS had.
Is there anyone who can help me out fixing this?
Post Reply