It is currently Wed Feb 20, 2019 5:36 pm



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: SOLVED: Linux - Can't move, but mouselook & menus are fine
PostPosted: Tue Nov 04, 2014 7:39 pm 
Offline

Joined: Tue Nov 04, 2014 7:35 pm
Posts: 2
So, this is an odd one - I can't move around at all. WASD? Nothing. Holding C, however, does bring up the "Tilt..." thing, and the mouselook works fine.

Even weirder? The keyboard works fine in the menus - I can even rebind the (useless) keys.

Arch Linux, 64 bit, Kernel 3.17.1

Fullscreen vs. Windowed doesn't make a difference either.


Last edited by Overand on Wed Nov 05, 2014 10:07 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Linux x64 - Can't move, but mouselook & menus are fine
PostPosted: Tue Nov 04, 2014 8:14 pm 
Offline
Site Admin

Joined: Mon May 13, 2013 10:50 am
Posts: 537
hm...that's strange. Perhaps something is going wrong with the initialization scheme. Did this happen on multiple tries?

If you enable the console, hit commit, and then start a new game and use the console (~) to type in the command "Tog_ImLame stupidspeedbug" without the quotes and then hit enter and close the console (~ again), can you move?

Whether or not that works should tell me a bit more about the nature of the problem.


Top
 Profile  
 
 Post subject: Re: Linux x64 - Can't move, but mouselook & menus are fine
PostPosted: Wed Nov 05, 2014 10:04 am 
Offline

Joined: Tue Nov 04, 2014 7:35 pm
Posts: 2
Aha - I've figured out the cause! (Or most of it, anyway). It's a file-permissions issue. Fix first, notes later.

If you've installed the game as root, you need to do the following. (Assume here that you installed the game into /opt/TowerOfGuns)
Code:
sudo chown root:games /opt/TowerOfGuns/Binaries/Linux/*.Bin
sudo chmod 775 /opt/TowerofGuns/Binaries/Linux/*.Bin


There may be more files that need to be changed, but for whatever reason, those files were intially created owned by root, with "700" permissions - meaning the root user can read & write them, but no other users can read OR write them.

So, from a user standpoint, they can do the fix above.

But, from a developer standpoint, here's my suggestion.

In the installer, check to see if you're running as root. If so, offer to install the game to a system-wide location (/opt/TowerOfGuns is probably pretty universally OK). Now, here's the hard part - but this is the case for Windows games *and* Linux games:

Don't write to the program directory! I'm guessing those files have something to do with the game state. (Imagine that!) Any files that would change "per user," that is, by the game at runtime, should go into a user-owned location, not a systemwide, "system" location. On Windows, you'd use %AppData% or similar. On Linux, I'd suggest the following: ~/.local/share/TowerOfGuns

Now, the game framework may handle this itself - or it may do so on Windows but not on Linux. Either way, that's the universal fix, to bring the game in line with host most linux games work.

-------

(The original thought process below, feel free to ignore)

So, first off, trying to start the console? No go. Why? Well, enabling the console doesn't "stick."

So that led me to remember that I'd run the game installer as root, and installed the game to /opt/TowerOfGuns/ - and that maybe, somehow, the game had set its configuration file to be 'hard-coded' to some wacky, root-only-accessible location (or had created a file in a normal-user location that's root-only-writable).

Buuuut...

When I tried to look for the 'hard coded location' in any files, I got the following, leading to my above finding of "permission issue!"


Code:
grep: Binaries/Linux/GameState.Bin: Permission denied
grep: Binaries/Linux/LocalGameState.Bin: Permission denied
grep: Binaries/Linux/OptionsState.Bin: Permission denied


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Theme designed by stylerbb.net © 2008
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All times are UTC - 5 hours